AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MouseClick-Fu, need help!

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
The.Yield



Joined: 08 Jul 2009
Posts: 10

PostPosted: Fri Jul 31, 2009 5:41 am    Post subject: MouseClick-Fu, need help! Reply with quote

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
View user's profile Send private message
Guest






PostPosted: Fri Jul 31, 2009 5:44 am    Post subject: Reply with quote

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

PostPosted: Fri Jul 31, 2009 6:00 am    Post subject: Reply with quote

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
View user's profile Send private message
UGh
Guest





PostPosted: Fri Jul 31, 2009 7:42 pm    Post subject: Reply with quote

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

PostPosted: Fri Jul 31, 2009 11:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group