Results 1 to 2 of 2

Thread: Program wont work with Sleep()

  1. #1

    Thread Starter
    Frenzied Member Jmacp's Avatar
    Join Date
    Jul 2003
    Location
    UK
    Posts
    1,959

    Program wont work with Sleep()

    I have this app that kills a file thats been copyied to the desktop, it reads the path of the file fom text.txt then kills myapp.exe, only problem is that it only work if i have the msgbx before kill "" etc.. i have tried a sleep but that doesnt work, get file access error, i'm thinking you need a delay there because it takes a bit of time to read in the file then send it to step1 etc... but a msgbox is no use for me. Well this maybe be tricky to understand but any suggestions would be geat.

    Code:
    Open "F:\Documents and Settings\mine\Desktop\text.txt" For Input As #1
    Input #1, step1
    Close #1
    
    MsgBox "FINE"
    
       Kill "" & step1 & "myapp.exe"

  2. #2
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629
    What were the attributes of the target file?

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