Loop Toggle Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
LAPIII
Posts: 667
Joined: 01 Aug 2021, 06:01

Loop Toggle

Post by LAPIII » 10 Apr 2022, 20:15

Please help me make a Loop Toggle that turns off with Enter and a confirmation message. This is what I have:

Code: Select all

^+End::

Loop
{
Send, {End}
}
Return
~Enter::
MsgBox Loop Toggle Off

Rohwedder
Posts: 7551
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Loop Toggle

Post by Rohwedder » 11 Apr 2022, 09:23

Hallo,
try:

Code: Select all

^+End::
End := True
While, End
{
	Send, {End}
	Sleep, 30
}
MsgBox Loop Toggle Off
Return
~Enter::End := False

LAPIII
Posts: 667
Joined: 01 Aug 2021, 06:01

Re: Loop Toggle

Post by LAPIII » 05 May 2022, 10:54

Thank you @Rohwedder. This script doesn't work on YouTube though. Can you make a script using Pgdn? It didn't work for me to just replace the key.

Rohwedder
Posts: 7551
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Loop Toggle

Post by Rohwedder » 06 May 2022, 02:45

I don't know what the script is supposed to do, nor when and where.
'on YouTube' can mean different types of urls on different browsers via different proxies.

LAPIII
Posts: 667
Joined: 01 Aug 2021, 06:01

Re: Loop Toggle

Post by LAPIII » 05 Jul 2022, 11:09

@Rohwedder I'm sorry, your script did work for me:

Code: Select all

^+PGDN::
End := True
While, End
{
	Send, {PGDN}
	Sleep, 30
}
MsgBox Loop Toggle Off
Return
~Enter::End := False

Can it End with the same hotkey? I'm trying to map this to a controller.

Rohwedder
Posts: 7551
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Loop Toggle  Topic is solved

Post by Rohwedder » 06 Jul 2022, 00:23

I'm trying to map this to a controller.
No idea how to control your controller.
Try:

Code: Select all

^+PGDN::
SetTimer, TPGDN,% (TPGDN:=!TPGDN)?"100":"Off"
IF !TPGDN
	MsgBox,,, Loop Toggle Off, 2
Return
TPGDN:
Send, {PGDN}
Return

Post Reply

Return to “Ask for Help (v1)”