Sign in to follow this  
Followers 0
wazze

Read numbers from file

5 posts in this topic

I have a txt named coords.txt, theres some number in it, 1 number in every line like:

600
800

My program read this 2 coords then write it back to the file and bring the cursor to this pixels:

If FileExists("coords.txt") Then
$file = FileOpen("coords.txt", 1)
FileReadLine($file, $mapx)
FileReadLine($file, $mapy)
FileWriteLine($file, GUICtrlRead($mapx))
FileWriteLine($file, GUICtrlRead($mapy))
FileClose($file)
MouseMove($mapx,$mapy, 0)

But after the program ends the file contains:

600
800
0
0

and the mouse at the 0,0 pixel, any idea why?

Share this post


Link to post
Share on other sites



First time, I try it to open to read, (and i'm not write the coords back to the file) but i get the same problem, the mouse go to 0,0.

Share this post


Link to post
Share on other sites

Not small wrong xD Thank you

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