Jump to content
Sign in to follow this  
robotronick

Coordinates writer

Recommended Posts

robotronick

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

Share this post


Link to post
Share on other sites
Xenobiologist

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

Share this post


Link to post
Share on other sites
November

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]

Share this post


Link to post
Share on other sites
robotronick

thx guys, just what I was looking for :) , now back to coding .:D

Share this post


Link to post
Share on other sites
robotronick

Is there a way that the message box closes automatically without me having to click ok all the time?.

Share this post


Link to post
Share on other sites
November

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]

Share this post


Link to post
Share on other sites
robotronick

U rock ! thx!

Share this post


Link to post
Share on other sites
November

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]

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  

×