Page 1 of 2 12 LastLast
Results 1 to 40 of 49

Thread: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto line 1

  1. #1

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,922

    If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto line 1

    Dear Members of this forum.

    I am working on a loop to work just like this:
    Code:
    IF LOF=End then play state media file
    IF LOF=Not End then goto 1
    !! Thanks in advance !!
    Attached Files Attached Files
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  2. #2
    Hyperactive Member
    Join Date
    Aug 2011
    Location
    Palm Coast, FL
    Posts
    508

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    What's your question? What part of this do you need help with?

  3. #3

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,922

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    When LOF is finished loading in the data, then either goto 1 or goto 2, line numbers of source code...
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  4. #4
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,544

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    Quote Originally Posted by ThEiMp View Post
    Dear Members of this forum.

    I am working on a loop to work just like this:
    Code:
    IF LOF=End then play state media file
    IF LOF=Not End then goto 1
    !! Thanks in advance !!
    You should know this by now, but please just post the relevant code and not a zip of the entire project.

    Is LOF the same as this https://learn.microsoft.com/en-us/of...p/lof-function function? If so the two lines you have posted make no sense. In fact those two lines aren't anything like a loop. What on earth are lines 1 and 2 anyway?

  5. #5

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,922

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    -- Sorry for not making sense, like...

    I am trying to make it like this:
    I am looking for the code to loop through then LOF until it has been fully loaded into the String. Then if the LOF isn't fully loaded, it then goto 1. Back to the beginning of the routine. Then if and only when the LOF is fully loaded it goto 2. If LOF isn't fully loaded and still it is loading into the String. Then it will exit the routine, as what i am looking to work with here, like so.
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  6. #6
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,544

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    Quote Originally Posted by ThEiMp View Post
    -- Sorry for not making sense, like...

    I am trying to make it like this:
    I am looking for the code to loop through then LOF until it has been fully loaded into the String. Then if the LOF isn't fully loaded, it then goto 1. Back to the beginning of the routine. Then if and only when the LOF is fully loaded it goto 2. If LOF isn't fully loaded and still it is loading into the String. Then it will exit the routine, as what i am looking to work with here, like so.
    So you want to read the contents of a file into a string variable?

  7. #7
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,979

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    Sounds like a basic File IO loop?
    Code:
      Dim fID As Integer
      Dim sLine As String
      
      fID = FreeFile
      Open "c:\myfile.txt" For Input As fID
      Do Until EOF(fID)
        ' No need for goto 1, do your "1" thing here
        Line Input #fID, sLine
      Loop
      Close fID
      ' The file has been processed, not need for goto 2
      ' Do your "2" thing

  8. #8

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,922

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    Actually i am already reading the file contents, but not sure how to check for file operations of begin, running and stopping reading processes
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  9. #9
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,544

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    Quote Originally Posted by ThEiMp View Post
    Actually i am already reading the file contents, but not sure how to check for file operations of begin, running and stopping reading processes
    So you are already reading file contents, but you don't know when you are starting, reading, and stopping this process?

    Could you explain what you want the end result to be, rather than this convoluted goto 1 / goto 2 idea you have?

  10. #10
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,979

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    Code:
      Dim fID As Integer
      Dim sLine As String
      Dim lLineCnt As Long 
    
      fID = FreeFile
    
      ' The beginning, opening the file
      Open "c:\myfile.txt" For Input As fID
    
      ' Check if we reached the end of the file, if not then read the next line
      Do Until EOF(fID)
        ' The processing of the file content is in the Do .. Loop
    
        ' Read the next line
        Line Input #fID, sLine
    
        ' Increase a line counter
        lLineCnt = lLineCnt + 1
    
        If lLineCnt = 1 Then 
          ' The first line of the file has been read
        End If
      Loop
      ' The file has been processed, now close the file
      Close fID
      ' Check if the last line was empty, if it is then substract 1 from the line counter
      If Len(sLine) = 0 Then lLineCnt = lLineCnt - 1

  11. #11
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,261

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    If LOL then?
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  12. #12

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,922

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    Would this source code snippet work, right like this:
    Code:
    Dim a As Integer
    
      Do Until EOF(a)
               WMP.PlayState = True
      Loop
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  13. #13
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,979

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    No need to set the PlayState for every file IO statement
    Just set once before and after the the file IO.
    Code:
     Dim fID As Integer
      Dim sLine As String
      Dim lLineCnt As Long 
    
      fID = FreeFile
    
      ' The beginning, opening the file
      Open "c:\myfile.txt" For Input As fID
    
      ' Set the PlayState to True during the File reading
      WMP.PlayState = True
      ' Check if we reached the end of the file, if not then read the next line
      Do Until EOF(fID)
        ' The processing of the file content is in the Do .. Loop
    
        ' Read the next line
        Line Input #fID, sLine
    
        ' Increase a line counter
        lLineCnt = lLineCnt + 1
    
        If lLineCnt = 1 Then 
          ' The first line of the file has been read
        End If
      Loop
      ' The file has been processed, now close the file
      Close fID
      ' Check if the last line was empty, if it is then substract 1 from the line counter
      If Len(sLine) = 0 Then lLineCnt = lLineCnt - 1
      ' Set the PlayState to False, because we finished the file reading
      WMP.PlayState = False

  14. #14

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,922

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    I forgot to add the loadfile location process, like so
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  15. #15
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,979

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    I don't understand what you mean.
    English is not my native language and maybe not yours either, so please rephrase your reply.

  16. #16

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,922

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    Code:
    WMP.URL = "C:\Video-1234567890.flv"
    WMP.PlayState = True
    Is this correct or not so, even???
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  17. #17
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,979

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    Looks okay to me.
    But I don't see how this is related to your File IO question..
    Can you explain?

  18. #18
    Fanatic Member Peter Porter's Avatar
    Join Date
    Jul 2013
    Location
    Germany
    Posts
    539

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    I'm not into VB6. Just here because ThEiMp posted.

  19. #19

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,922

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    Thanks dude
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  20. #20
    Fanatic Member Peter Porter's Avatar
    Join Date
    Jul 2013
    Location
    Germany
    Posts
    539

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    ThEiMp, have you ever coded in VB.NET?

  21. #21

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,922

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    sure, but then it's not my slice of cake, as per say
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  22. #22

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,922

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    Right, this is what my source code looks like, now so:
    Code:
    Private Sub UserControl_Initialize()
    On Error Resume Next
    
    Dim a As Integer
    Dim Item1 As String
    
        a = 0
    
        With UserControl
            .lstPlay.Selected(0) = True
        End With
        
        a = a + 1
        Item1 = UserControl.CustomDialog1.Data
        
        With UserControl
            .SSTab.Tab = 0
        End With
        
        With UserControl.CustomDialog1
            .Action = 2
            .Data = (StrConv(LoadResData("SEASON1", "EP" & a), vbUnicode))
            .FileName = "Video1234567890.flv"
            .Path = "C:\"
        End With
        
        With UserControl
            Item1 = .CustomDialog1.Data
        End With
    
        Open ("C:\Video1234567890.flv") For Input As #1
            Do Until EOF(a)
                Line Input #1, Item1
            Loop
        Close #1
        
        Open ("C:\Video1234567890.flv") For Output As #1
            Do Until EOF(a)
                Print #1, Item1
            Loop
        Close #1
    
        With UserControl
            .WMP.openPlayer ("C:\Video1234567890.flv")
            .picBox.Visible = False
        End With
        
        Item1 = ""
    End Sub
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  23. #23
    PowerPoster
    Join Date
    Nov 2017
    Posts
    3,200

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    The indentation in your code looks good.

    Beyond that, not sure what you want from us. That code is like someone saying they want to build a house, so they do jazz hands for 10 minutes and then wonder why the house isn't built.

  24. #24

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,922

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    The Visual Basic IDE is hanging when i add the OCX to the Project1 of mine. I am just testing the OCX out in VB6, not sure what is going on here. But it looks good, because it's using about: 28.6Mb memory and about: 54.6% CPU, not much else to report there, so like now. Where am I going wrong in the source code, as to where the OCX is hanging, like???
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  25. #25
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,979

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    Almost everything is wrong in the UserControl_Initialize..
    But because of your On Error Resume Next it's all ignored

    Code:
    Private Sub UserControl_Initialize()
    '------------ Remove this line to get a lot of errors when running
    On Error Resume Next
    
    Dim a As Integer
    Dim Item1 As String
    
        a = 0
    
        With UserControl
            .lstPlay.Selected(0) = True
        End With
        
        a = a + 1
        Item1 = UserControl.CustomDialog1.Data
        
        With UserControl
            .SSTab.Tab = 0
        End With
        
        With UserControl.CustomDialog1
            .Action = 2
    
    '------------ What type of variable is .Data ? And what is stored in it?
            .Data = (StrConv(LoadResData("SEASON1", "EP" & a), vbUnicode))
    '------------
            .FileName = "Video1234567890.flv"
            .Path = "C:\"
        End With
        
        With UserControl
    '------------ Now you assign the CD content to the string variable Item1
            Item1 = .CustomDialog1.Data
    '------------
        End With
    
    
        Open ("C:\Video1234567890.flv") For Input As #1
    '------------ In this loop you read the content of a BINARY file to a string
    '------------ You are again using Item1, which you just filled with content of de CD
    '------------ The content of Item1 is also overwritten by each Line Input
            Do Until EOF(a)
                Line Input #1, Item1
            Loop
        Close #1
    
    '------------ By opening the same file for Output you open the file in text mode and it will be overwritten with new data
    '------------ You can't write a file with a EOF loop! That's only for reading
        Open ("C:\Video1234567890.flv") For Output As #1
            Do Until EOF(a)
                Print #1, Item1
            Loop
        Close #1
    
        With UserControl
    '------------ This will fail because you ruined the file
            .WMP.openPlayer ("C:\Video1234567890.flv")
            .picBox.Visible = False
        End With
        
        Item1 = ""
    End Sub
    So you are filling Item1 with content from the CD.
    Then you open an existing FLV file (which is a binary file, not a text file) and you assign a part of the content again to Item1
    Which will be overwritten in the loop
    Then you open the FLV file again and write the content of Item1 to it.

    Don't change your code, but first answer the main question:
    Why would you open a file, read the file to some variable and the write the content back to the same file???

  26. #26
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,544

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    Quote Originally Posted by ThEiMp View Post
    Right, this is what my source code looks like, now so:
    Code:
        With UserControl.CustomDialog1
            .Action = 2
            .Data = (StrConv(LoadResData("SEASON1", "EP" & a), vbUnicode))
            .FileName = "Video1234567890.flv"
            .Path = "C:\"
        End With
    Why are you trying to convert the presumably binary data into a string before putting it into the .Data property? Why are you trying to save directly to the root of the C: drive?

    Quote Originally Posted by ThEiMp View Post
    Right, this is what my source code looks like, now so:
    Code:
        With UserControl
            Item1 = .CustomDialog1.Data
        End With
    
        Open ("C:\Video1234567890.flv") For Input As #1
            Do Until EOF(a)
                Line Input #1, Item1
            Loop
        Close #1
        
        Open ("C:\Video1234567890.flv") For Output As #1
            Do Until EOF(a)
                Print #1, Item1
            Loop
        Close #1
    Think about what is going on in these bits of code....
    1. Why use a With ... End With to set a single property?
    2. You are assigning the .Data property to item1
    3. You are immediately trying to read the flv file, a line at a time and overwriting item1 in a loop. But you are using EOF(a) to detect the end of the file, but the variable a isn't the file handle you are using to read from.
    4. Assuming step 3 actually works you now have item1 containing only the last line of the .flv file.
    5. You are now opening the same file you tried to read in step 3 and attempting to write the contents of the item1 variable to the file. Think about this, why try to read the file contents into a variable and then immediate write the variable back into the same file? Again you are using EOF(a) when a isn't the file handle, plus EOF only makes sense when reading a file.

    Have you even tried to debug this code? Put a breakpoint at the start of the routine and step through it line by line to see what happens.

    Writing code isn't a matter of just typing stuff and hoping for the best, you need to figure out what you are trying to do and the steps to achieve this.

    Could you try to explain what you are attempting to achieve, and more importantly how the code you have written is fitting in with your aims?
    Last edited by PlausiblyDamp; Apr 16th, 2024 at 03:23 AM.

  27. #27

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,922

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    Well actually i have to pass over the data from the CustomDialogBox to be read, then Saved as a Binary file. This part is working, it took me about Forty-Five hours last night to work out ten bytes from the string data file. So then it works, just very damn slowly, then so
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  28. #28
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,979

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    Glad you fixed it, but I can't see how it can be very slow


    i have to pass over the data from the CustomDialogBox to be read, then Saved as a Binary file
    You mean selecting a file with the CustomDialogBox and then copying it to a different location?

  29. #29

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,922

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    Not quite so, like that. But it interpreters a file from binary to ambra sequencing
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  30. #30
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,979

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    Sorry , but the logic you use is completely incorrect.
    I’ve been trying to help you with your videoplayer for a few years, but you really don’t have a clue what you’re doing .

  31. #31

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,922

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    Actually it's a hard thread of a time. because of the problem of rehashing the data files, which i have been able to rehash. but takes like many hours to work through it, so. then the problem that i have no so, is the command to load and play the video file. the video extension that i have chosen to work with is: FLV. Can someone please help me with the command to load and play the video using WindowsMediaPlayer???
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  32. #32
    PowerPoster
    Join Date
    Nov 2017
    Posts
    3,200

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    Quote Originally Posted by ThEiMp View Post
    Not quite so, like that. But it interpreters a file from binary to ambra sequencing
    I'll take the bait. What is Ambra sequencing?

  33. #33

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,922

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    I named the type of processing sequencing after my surname, LOL. I wasn't sure on what to name it, so???
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  34. #34
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,979

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    @TS is convinced that a basic hash algorithm he used on a movie file can be used to recreate the original file.

    https://www.vbforums.com/showthread....-of-some-sorts
    https://www.vbforums.com/showthread....hEiMp-has-done
    Last edited by Arnoutdv; Apr 20th, 2024 at 04:36 AM.

  35. #35
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,544

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    Quote Originally Posted by ThEiMp View Post
    Actually it's a hard thread of a time. because of the problem of rehashing the data files, which i have been able to rehash. but takes like many hours to work through it, so. then the problem that i have no so, is the command to load and play the video file. the video extension that i have chosen to work with is: FLV. Can someone please help me with the command to load and play the video using WindowsMediaPlayer???
    Nothing in your posted code is doing anything other than reading and writing to the same file and reusing the same variable to do it.

    At no point do you ever attempt to either explain what you think your code is doing, or how it relates to what you want it to do. You have repeatedly posted this same pointless snippet in multiple threads and ignored just about all the advice or comments made.

  36. #36
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,225

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    This is not even funny anymore.

    Some people decide they are better nowadays and stop taking their medications for whatever mental illness they suffer from and so things quickly explode after some point of no return.

    Don't laugh, don't mock and don't reply. It's sad but there is nothing you can do. I'm deeply sorry seeing this repeat pattern in vbforums after months of relapse.

    cheers,
    </wqw>

  37. #37

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,922

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    Here is my source code on my hash ActiveX Control Object:
    Attached Files Attached Files
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  38. #38

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,922

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    Right then and there we go. I have been able to write the finishing details of my app, using: Visual Basic 6.00, then here it is in the attachment section of this post, then so...
    Attached Files Attached Files
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  39. #39
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,979

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    This was already discussed in 2018:
    https://www.vbforums.com/showthread....=1#post5331577

    The old thread mention is from 2010...
    Quote Originally Posted by Arnoutdv
    I downloaded the project, read the source code and there is no compression or whatsoever, only basic encryption.

    The encryption is a one-to-one copy of this old thread where you were asking for encryption source samples:
    http://www.vbforums.com/showthread.p...=1#post3825485

    Code:
    Option Explicit
     
    Private baLUT(255) As Byte, backLUT(255) As Byte '0 to 255, aka ANSI/ASCII
     
     
    Private Sub InitLUT()
    Dim X As Long, Y As Long, bChr As Byte
     
    'initialize LUT array with unique values
    For X = 0 To 255
      baLUT(X) = X
    Next X
     
    'randomly shuffle array
    Rnd -1 'reset the rnd generator
    Randomize 1234 'use a number here for the random seed, ensuring repeatable output
    'these two random calls ensure that the follow sequence of RNDs will be the same
    For X = 1 To 255
      Y = Int(X * Rnd)
      If X <> Y Then
        bChr = baLUT(X)
        baLUT(X) = baLUT(Y)
        baLUT(Y) = bChr
      End If
    Next X
     
    For X = 0 To 255
      backLUT(baLUT(X)) = X
    Next X
    End Sub
     
    Private Sub FXInCipher(strIn As String, bOutString() As Byte)
    Dim X As Long
    Dim bString() As Byte
    bString = strIn
    ReDim bOutString(UBound(bString))
    For X = 0 To UBound(bString)
      bOutString(X) = baLUT(bString(X))
      Debug.Print bString(X) & ">" & bOutString(X) & ",";
    Next X
    End Sub
     
    Private Function FXDeCipher(strIn() As Byte) As String
    Dim X As Long
    Dim bString() As Byte
    Dim bOutString() As Byte
    bString = strIn
     
    ReDim bOutString(UBound(bString))
    For X = 0 To UBound(bString)
      bOutString(X) = backLUT(bString(X))
      Debug.Print bString(X) & "<" & bOutString(X) & ",";
    Next X
    FXDeCipher = bOutString
    End Function
    This code is 4 of the 5 forms.

  40. #40

    Thread Starter
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,922

    Re: If LOF = Finshed input into box, then exit sub, if LOF not Finished then goto lin

    I know that
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Event's Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Bar | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width