Pause Toggle problem

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
mauritius
Posts: 25
Joined: 06 Nov 2020, 14:00
Contact:

Pause Toggle problem

Post by mauritius » 13 Oct 2021, 21:53

Hi guys,
I recenty updated my ahk version to 1.1.33.10 and I noticed that my Pause/Toggle hotkey stopped working the way it did before.

My code is the simplest ever:

Code: Select all

#p:: ;pauza
{
	Pause, Toggle
}
It was pausing my script (and changing the tray icon to the red one) and when I pressed win + p again it revived my script.

Now it just pauses my script but not unpauses when I press it again. Can anyone tell me how to fix this?

What's interesing when I add another hotkey it works fine.

Code: Select all

#r::
{
	Pause, Off
}
return
But I want to have pausing/unpausing hotkey with the same key. Can someone tell me how to do it?
Lepes
Posts: 141
Joined: 06 May 2021, 07:32
Location: Spain

Re: Pause Toggle problem

Post by Lepes » 14 Oct 2021, 02:24

Win+P is a windows shortcut, did you disable it? https://www.autohotkey.com/docs/misc/Override.htm
mauritius
Posts: 25
Joined: 06 Nov 2020, 14:00
Contact:

Re: Pause Toggle problem

Post by mauritius » 14 Oct 2021, 03:06

I guess it's not the issue, because the same happens when I use other shortcut such as win+g or ctrl+y.
Rohwedder
Posts: 7774
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Pause Toggle problem

Post by Rohwedder » 14 Oct 2021, 04:34

Hallo,
try:

Code: Select all

#p:: ;pauza
{
	Pause, Toggle, 1
}
or:

Code: Select all

#p::Pause ;pauza
mauritius
Posts: 25
Joined: 06 Nov 2020, 14:00
Contact:

Re: Pause Toggle problem

Post by mauritius » 14 Oct 2021, 17:31

It works! Both solutions.

Thanks so so much Rohwedder!
Post Reply

Return to “Ask for Help (v1)”