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 

Need a quick and easy script that includes a toggle

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Fri Apr 29, 2005 9:54 am    Post subject: Need a quick and easy script that includes a toggle Reply with quote

Okay, it's 5 in the morning now. I just need a quick script that makes it so Right Ctrl is a toggle switch or even scroll lock. When I hit it once, it makes my right mouse button bound to F6 and when I hit it again it makes right mouse button = right mouse button. So sorry to bother you guys with this but I can't come up with a solution after reverse engineering for hours.

Thank you
Back to top
BoBo
Guest





PostPosted: Fri Apr 29, 2005 10:01 am    Post subject: Reply with quote

To have a better chance to get support you should drop that request in the Support section ... Wink
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Fri Apr 29, 2005 12:02 pm    Post subject: Reply with quote

(I've moved it to support)

This first example sends one F6 keystroke for each mouse click:
Code:
RButton::Send {F6}
RControl::Hotkey, RButton, Toggle  ; Set to opposite (Enable/Disable)


This second one holds down F6 while you're holding down the right button:
Code:
RButton::Send {F6 down}
RButton up::Send {F6 up}

RControl::
Hotkey, RButton, Toggle
Hotkey, RButton up, Toggle
return

You could also make it send F6 repeatedly while you're holding down the right button, but that is rarely needed.
Back to top
View user's profile Send private message Send e-mail
Guest






PostPosted: Fri Apr 29, 2005 7:31 pm    Post subject: Reply with quote

Whoops, I started a new topic on this because I didn't realize it got moved. It was late last night and I thought I didn't get submitted or something.

Sorry. You can delete the other post "Quick Script Toggle Help".

Thanks so much Chris, your awesome!
Back to top
Guest






PostPosted: Fri Apr 29, 2005 7:34 pm    Post subject: Reply with quote

The first one works great but the second one gives me:

"RButton Up" is not a valid key name within a hotkey label
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Sat Apr 30, 2005 12:34 pm    Post subject: Reply with quote

Just update to a newer version of AutoHotkey at http://www.autohotkey.com/download/
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   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