Tab send Tab problem?? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
jkmgme
Posts: 3
Joined: 07 Jul 2019, 21:30

Tab send Tab problem??

08 Jul 2019, 00:39

I didn't see a welcome thread, so I figured I'd post here. Howdy, Y'all! Nice to be on a forum. It's been a minute.

I'm running into an issue where the following script (both) will repetitively and quickly press {tab} like it's in a loop... I have no idea what's going on or how to fix it. It'll throw a max memory error after pressing tab and allowing the script to run so many times. Help??

The goal is just to have caps lock turned off when I press tab.

Code: Select all

#Persistent
Tab::
send {tab down}
send {tab up}
SetCapsLockState, Off
return

Code: Select all

#Persistent
Tab::
send {tab}
SetCapsLockState, Off
return
~LWin::
TrayTip, Toodaloo, Have a good day. (: lol
Sleep 1000
Run, shutdown /s
return
gregster
Posts: 9114
Joined: 30 Sep 2013, 06:48

Re: Tab send Tab problem??  Topic is solved

08 Jul 2019, 00:44

Welcome to the forum!

Use the $ modifier to prevent that the sent Tab triggers the Tab hotkey in an indefinite loop...

Code: Select all

$Tab::
send {tab}
SetCapsLockState, Off
return
See https://www.autohotkey.com/docs/Hotkeys.htm#Symbols

Btw, your signature is quite irritating... at least in the forum theme I am using. Please consider adjusting it ;)
User avatar
jkmgme
Posts: 3
Joined: 07 Jul 2019, 21:30

Re: Tab send Tab problem??

10 Jul 2019, 12:11

gregster wrote:
08 Jul 2019, 00:44
Welcome to the forum!

Use the $ modifier to prevent that the sent Tab triggers the Tab hotkey in an indefinite loop...

Code: Select all

$Tab::
send {tab}
SetCapsLockState, Off
return
See https://www.autohotkey.com/docs/Hotkeys.htm#Symbols

Btw, your signature is quite irritating... at least in the forum theme I am using. Please consider adjusting it ;)
Thank you so much! That, of course, worked.

I changed the signature by removing the code tag. Is that better? Or is it then ahk code nature of the signature?
~LWin::
TrayTip, Toodaloo, Have a good day. (: lol
Sleep 1000
Run, shutdown /s
return
gregster
Posts: 9114
Joined: 30 Sep 2013, 06:48

Re: Tab send Tab problem??

10 Jul 2019, 16:39

You are welcome!

I like your signature better now. Thank you!
Before, at least on my dark forum theme, it looked like part of the question (although there was a thin, dark line above it - which is not necessarily unique to a signature, though)... and I usually don't expect a codebox in the sig ;)
S1lver
Posts: 23
Joined: 07 Nov 2020, 04:14

Re: Tab send Tab problem??

08 Dec 2023, 09:52

gregster wrote:
08 Jul 2019, 00:44

prevent hotkey send in an indefinite loop...

Code: Select all

$Tab::
send {tab}
Thank you so much mann. that was the trouble with all my scripts. cheers cheers cheers

[Mod edit: Fixed quote.]

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Lpanatt, Marium0505, mcl and 332 guests