robotronick Posted May 15, 2007 Share Posted May 15, 2007 (edited) Hi, The code I was working on was based on the original X,Y getter file, where u get the coordinates in a msg box when u press the 'g' key, Now I wanted to add an extra feature to it and instead of showing it into a msgbox I want it to write the coordinates in a txt file so it looks like this : Mousemove (X,Y) . Everything seems to work fine but I get this Mousemove ($pos[0] & & $pos[1]) in my txt file and not the coordinates :S. Can someone clear this out for me pls, what am I doing wrong? Thx In Advance, Robo Source code : ; X,y position getter Hotkeyset("g", "getmouse") While 1 Sleep (500) WEnd Func getmouse() $pos = MouseGetPos() MsgBox(0, "Mouse x,y:", $pos[0] & "," & $pos[1]) filewrite("coordinates.txt", "Mousemove ($pos[0] & & $pos[1])") Endfunc Edited May 15, 2007 by robotronick Link to comment Share on other sites More sharing options...
Xenobiologist Posted May 15, 2007 Share Posted May 15, 2007 Hi, filewrite("coordinates.txt", "Mousemove: " & $pos[0] & $pos[1] & @crlf) So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
November Posted May 15, 2007 Share Posted May 15, 2007 Hi, The code I was working on was based on the original X,Y getter file, where u get the coordinates in a msg box when u press the 'g' key, Now I wanted to add an extra feature to it and instead of showing it into a msgbox I want it to write the coordinates in a txt file so it looks like this : Mousemove (X,Y) . Everything seems to work fine but I get this Mousemove ($pos[0] & & $pos[1]) in my txt file and not the coordinates :S. Can someone clear this out for me pls, what am I doing wrong? Thx In Advance, Robo Source code : ; X,y position getter Hotkeyset("g", "getmouse") While 1 Sleep (500) WEnd Func getmouse() $pos = MouseGetPos() MsgBox(0, "Mouse x,y:", $pos[0] & "," & $pos[1]) filewrite("coordinates.txt", "Mousemove ($pos[0] & & $pos[1])") Endfunc Hi, Hotkeyset("g", "getmouse") While 1 Sleep (500) WEnd Func getmouse() $pos = MouseGetPos() MsgBox(0, "Mouse x,y:", $pos[0] & "," & $pos[1]) filewrite("coordinates.txt", "Mousemove :" & $pos[0] & ":" & $pos[1] & @CRLF) Endfunc Cheers Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font] Link to comment Share on other sites More sharing options...
robotronick Posted May 15, 2007 Author Share Posted May 15, 2007 thx guys, just what I was looking for , now back to coding . Link to comment Share on other sites More sharing options...
robotronick Posted May 15, 2007 Author Share Posted May 15, 2007 Is there a way that the message box closes automatically without me having to click ok all the time?. Link to comment Share on other sites More sharing options...
November Posted May 15, 2007 Share Posted May 15, 2007 Is there a way that the message box closes automatically without me having to click ok all the time?. Hi again, MsgBox ( flag, "title", "text" [, timeout] ) in your case : MsgBox(0, "Mouse x,y:", $pos[0] & "," & $pos[1], 5) ; 5 secs to vanish Cheers Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font] Link to comment Share on other sites More sharing options...
robotronick Posted May 15, 2007 Author Share Posted May 15, 2007 U rock ! thx! Link to comment Share on other sites More sharing options...
November Posted May 15, 2007 Share Posted May 15, 2007 U rock ! thx!You welcome m8.Keep up with the scripting Cheers Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font] Link to comment Share on other sites More sharing options...
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