Sign in to follow this  
Followers 0
cerix

Mouse move

13 posts in this topic

how can we move mouse from unknowpoint to for example 2 cm high?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Share this post


Link to post
Share on other sites

how can we move mouse from unknowpoint to for example 2 cm high?

take a look

#region --- ScriptWriter generated code Start ---
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
Run('mspaint.exe')
WinWait("untitled - Paint","")
If Not WinActive("untitled - Paint","") Then WinActivate("untitled - Paint","")
WinWaitActive("untitled - Paint","")
MouseMove(231,13)
MouseDown("left")
MouseUp("left")
MouseMove(148,97)
MouseDown("left")
MouseMove(137,147)
MouseUp("left")
MouseMove(175,100)
MouseDown("left")
MouseMove(157,148)
MouseUp("left")
MouseMove(138,128)
MouseDown("left")
MouseMove(176,129)
MouseUp("left")
MouseMove(205,123)
MouseDown("left")
MouseMove(200,152)
MouseUp("left")
MouseMove(205,109)
MouseDown("left")
MouseUp("left")
#endregion --- ScriptWriter generated code End ---

Share this post


Link to post
Share on other sites

take a look

#region --- ScriptWriter generated code Start ---
Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
Run('mspaint.exe')
WinWait("untitled - Paint","")
If Not WinActive("untitled - Paint","") Then WinActivate("untitled - Paint","")
WinWaitActive("untitled - Paint","")
MouseMove(231,13)
MouseDown("left")
MouseUp("left")
MouseMove(148,97)
MouseDown("left")
MouseMove(137,147)
MouseUp("left")
MouseMove(175,100)
MouseDown("left")
MouseMove(157,148)
MouseUp("left")
MouseMove(138,128)
MouseDown("left")
MouseMove(176,129)
MouseUp("left")
MouseMove(205,123)
MouseDown("left")
MouseMove(200,152)
MouseUp("left")
MouseMove(205,109)
MouseDown("left")
MouseUp("left")
#endregion --- ScriptWriter generated code End ---
What this???

Share this post


Link to post
Share on other sites

how can we move mouse from unknowpoint to for example 2 cm high?

Here you go:

:D

$pos = MouseGetPos()
$new_y = $pos[1] + cm_to_pix(2) 
MouseMove($pos[0],$new_y)


Func cm_to_pix($iCm) 
Return $iCm*37.795275591
EndFunc

Share this post


Link to post
Share on other sites

What this???

from unknow point....

for example 20 pixel high

but we dont know which point is mouse...

Share this post


Link to post
Share on other sites

Here you go:

:D

$pos = MouseGetPos()
$new_y = $pos[1] + cm_to_pix(2) 
MouseMove($pos[0],$new_y)


Func cm_to_pix($iCm) 
Return $iCm*37.795275591
EndFunc
Are you measured with a ruler to your monitor? :D This is wrong, all the different screen resolutions.

from unknow point....

for example 20 pixel high

but we dont know which point is mouse...

$Pos = MouseGetPos()
MouseMove($Pos[0], $Pos[1] - 20, 0)

Share this post


Link to post
Share on other sites

What was I thinking? xD

Share this post


Link to post
Share on other sites

what do you think? ,just nothing!!! :D

Hi

Your script assumes that there was an area to write in when Paint first opens :-)

Posted Image

...and there probably is for most people...

I liked your script/example, but that might not be a good endorsement :-)


[size="1"][font="Arial"].[u].[/u][/font][/size]

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