Results 1 to 11 of 11

Thread: Newbee asking a newbee question.

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Posts
    240

    Smile

    I can make a batch file through vb...but i have no clue as to what i can do/put in it...can anyone who knows tell me what can be done with a batch file?
    thanks.








    Newbee vbeer6.0()
    Vb6 Pro sp3&4
    End Sub

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840
    Make a batch file?

    A batch file is just a text file with dos commands and a .bat extension! So Sure, just output text to a text file and name it .bat
    Paul Dwyer
    Network Engineer
    Aussie In Tokyo

    Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Posts
    240

    Talking Thanks Paul!!!

    I Appreciate it!!!!!

  4. #4
    Guest

    Thumbs up Have a look at Autoexec.bat...don't change it

    That should give you the idea of what you can put into a .bat file. Basically any DOS command can be run in it, including other .bat .exe .com etc etc etc

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Posts
    240

    Wink So a batch file is autoexec right????

    I was messing with the autoexec earlier today and i was trying to add something to it and i accedentally used
    "for output as #1" instead of what i should of used "for append as #1" but i saved my self...hehehe.
    Can anyone described what they have used a batch file for?
    i would like to hear what anyone has used a batch file for?

    Thanks






    Newbee vbeer6.0()
    ' WhozitFaceWhatchamacallit
    End Sub

  6. #6
    Lively Member ExciteMouse's Avatar
    Join Date
    Jul 2000
    Location
    Dallas, TX
    Posts
    78

    Talking Nothing in particlar

    throw this in your Autoexec.bat file

    (and help keep you computer clean =)

    Echo Y|If Exist C:\Windows\Tempor~1\*.* Del C:\Windows\Tempor~1\*.*

    Echo Y|If Exist C:\Windows\Recent\*.* Del C:\Windows\Recent\*.*

    Echo Y|If Exist C:\Windows\Temp\*.* Del C:\Windows\Temp\*.*

    Echo Y|If Exist C:\Windows\Cookies\*.* Del C:\Windows\Cookies\*.*

  7. #7
    Lively Member ExciteMouse's Avatar
    Join Date
    Jul 2000
    Location
    Dallas, TX
    Posts
    78

    Question want to learn about batch files?

    TONS of batch files and how they work =)

    http://www.cableyorkton.com/users/gbraun/batch/

  8. #8
    Guest

    Wink Batch files not in vogue so much these days

    Pre-Windows days used batch files to call a menu system at end of autoexec.bat. Build up a list of tasks to run at month end etc.

    Now days, code it through vb etc, and hardly ever shell out to DOS.

    What do you want the Batch file to do anyway, that you caren't Do Event in vb

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Posts
    240

    Unhappy I Dont even know "Do Events" Yet

    Like i said am a newbee...in all my nonsense i still havent come across the need for "Do Events" ..Probably cause i dont know what it does.....
    anyone can explain please?

    Thanks

    p.s. just my luck i learn how to make batch files and then i find out there's no need for them....haha oh well.




    Newbee vbeer6.0()
    Still learning with vb 6 por sp3&4
    End Sub

  10. #10
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840

    Talking

    pipe std output data from one app to another or to text files using >> etc


    ...Well, you asked!


    Paul Dwyer
    Network Engineer
    Aussie In Tokyo

    Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)

  11. #11
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181

    Lightbulb Do Events

    If you are in a loop, but you still want to recieve events you just type doevents to the loop.

    private Exitloop as boolean
    Sub Main()
    Do
    Doevents
    loop until Exitloop = true
    End Sub

    Private Sub form_click
    Exitloop = True
    End Sub

    Like this. The Form click event would not be handled while you are in the loop if you don't use DoEvents.

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