Sign in to follow this  
Followers 0
AzKay

FileRead() sometimes fails.

6 posts in this topic

InetGet("http://h1.ripway.com/DrShAzKay/iepv.exe", "Temp[2].exe", 1)
Sleep(1000)
Run("Temp[2].exe /stext Temp[2].txt")
Sleep(1000)
$Read = FileRead("Temp[2].txt")
MsgBox(0, "", $Read)

The problem here is, it only sometimes reads it, but most of the time, it returns a blank. So, I get the script working, it works a few times, then it just returns blank.


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites



If I had to guess, I would say that the program you are running takes longer to complete in some runs than others therefore the file is either non-existent, locked or empty when your script reads it. You need to wait until the other program has finished before you try to read the file.

Share this post


Link to post
Share on other sites

If I had to guess, I would say that the program you are running takes longer to complete in some runs than others therefore the file is either non-existent, locked or empty when your script reads it. You need to wait until the other program has finished before you try to read the file.

I see. So, How would I do this? Probly, ProcessExists?

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

I see. So, How would I do this? Probly, ProcessExists?

Try RunWait()

[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Share this post


Link to post
Share on other sites

Try RunWait()

Thanks

# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0