Jump to content

Coordinates writer


Recommended Posts

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 by robotronick
Link to comment
Share on other sites

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

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

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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...