| View previous topic :: View next topic |
| Author |
Message |
The.Yield
Joined: 08 Jul 2009 Posts: 10
|
Posted: Fri Jul 31, 2009 5:41 am Post subject: MouseClick-Fu, need help! |
|
|
Hello all. Simply' trying to make a script that will automatically save an image when I right click on it. I wish to do this by holding CTRL and right clicking...
This is what I have so far:
| Code: | ^RButton::
CoordMode, Mouse
BlockInput, On
MouseGetPos, xpos, ypos
|
I assume getting the mouse position will work, but I then need to move the mouse down and to the right a certain number of pixels from the gathered coordinates as to hover over the "Save Image as..." prompt in the right-click menu in Chrome. Then send a left click, sleep for half a second and hit Enter... That's it.
For the life of me I can't figure out how that can be done. Many thanks to anyone who can help me out with this. |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Jul 31, 2009 5:44 am Post subject: |
|
|
u can send arrow keys and press enter
for example:
| Code: | ^rbutton::
send {down}{enter}
return |
|
|
| Back to top |
|
 |
The.Yield
Joined: 08 Jul 2009 Posts: 10
|
Posted: Fri Jul 31, 2009 6:00 am Post subject: |
|
|
I would never have thought to try that, lol. THANK YOU!
Here's what I got, seems to work perfectly!
| Code: |
^RButton::
BlockInput, On
Send {RButton}
Sleep 100
Send {down}{enter}
Sleep 500
Send {enter}
BlockInput, Off
return
|
|
|
| Back to top |
|
 |
UGh Guest
|
Posted: Fri Jul 31, 2009 7:42 pm Post subject: |
|
|
Also dont forget...
| Code: | | MouseMove,10,5,1,R ;Mousemoves 10 pixels right down 5 pixels the R means in relation to current mouse position |
|
|
| Back to top |
|
 |
The.Yield
Joined: 08 Jul 2009 Posts: 10
|
Posted: Fri Jul 31, 2009 11:07 pm Post subject: |
|
|
Very interesting! I'll be sure to remember that in the future!
However here is the final script I've settled on (The previous was breaking things it would seem - would have to right click and then right click again to get my right clicks back):
| Code: |
#NoEnv
SendMode Input
^RButton::
BlockInput On
Send {RButton}
Sleep 100
Send {down}{enter}
Sleep 500
Send {enter}
Sleep 200
WinActivate, Chrome
Send {Control Up}
Click
BlockInput Off
Reload
|
|
|
| Back to top |
|
 |
|