wazze Posted June 10, 2009 Posted June 10, 2009 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?
Developers Jos Posted June 10, 2009 Developers Posted June 10, 2009 Open for Write and then trying to read? $file = FileOpen("coords.txt", 1) Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
wazze Posted June 10, 2009 Author Posted June 10, 2009 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.
Developers Jos Posted June 10, 2009 Developers Posted June 10, 2009 Your FileReadLine() statements are also wrong. Check the Helpfile for proper syntax. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now