How can i puase settimer when my game is paused

Get help with using AutoHotkey and its commands and hotkeys
dsr07715
Posts: 1
Joined: 07 Mar 2019, 02:50

How can i puase settimer when my game is paused

07 Mar 2019, 03:07

What i am doing is making a bot to remind when clock hits 1:45,1:53(repeat every 1 min), 2:00 (repeat every 2 mins) ,5 mins(repeat every 5 mins)
but when game is paused by me or any other player i need to set up a hot key to puase/unpuase it or basically maunlly input my game time(starts from 0:00 to game ends) and start the script from there)


CoordMode, ToolTip, Screen
toggle = 0
#MaxThreadsPerHotkey 20

F6::
Toggle := !Toggle

if Toggle {
ToolTip,
(Join LTrim
==============`n
== Starting Game ==`n
==============
), 620, 890
SetTimer, RemoveToolTip, -5000
SetTimer, StartRuneTimer, -300000
SetTimer, StartStackReadyTimer, -105000
SetTimer, StartStackNowTimer, -111000
SetTimer, StartPowerRuneTimer, -120000

} else {
ToolTip,
(Join LTrim
==============`n
== Ending Game ==`n
==============
), 620, 890
SetTimer, RemoveToolTip, -3000
}
return

RemoveToolTip:
ToolTip
return

StartRuneTimer:
if Toggle {
ToolTip,
(Join LTrim
=============`n
=== GOLDIES ===`n
=============
), 620, 890
SetTimer, RemoveToolTip, -30000
SetTimer, StartRuneTimer, -300000
}
return

StartStackReadyTimer:
if Toggle {
ToolTip,
(Join LTrim
=============`n
=== get ready to stack ===`n
=============
), 620, 890
SetTimer, RemoveToolTip, -5000
SetTimer, StartStackReadyTimer, -120000
}
return

StartStackNowTimer:
if Toggle {
ToolTip,
(Join LTrim
=============`n
=== STACK NOW!! ===`n
=============
), 620, 890
SetTimer, RemoveToolTip, -4000
SetTimer, StartStackNowTimer, -120000
}
return

StartPowerRuneTimer:
if Toggle {
ToolTip,
(Join LTrim
=============`n
=== Power runes ===`n
=============
), 620, 890
SetTimer, RemoveToolTip, -10000
SetTimer, StartPowerRuneTimer, -120000
}
return
User avatar
divanebaba
Posts: 779
Joined: 20 Dec 2016, 03:53
Location: Diaspora

Re: How can i puase settimer when my game is paused

28 Mar 2019, 03:19

Hello and welcome to the AHK-forum.

You can stop a timer by using

Code: Select all

F6::
SetTimer, StartRuneTimer, off
SetTimer, StartStackReadyTimer, off
SetTimer, StartStackNowTimer, off
return
You can add more lines with SetTimer, NAMEOFYOURTIMER, off similar to stop more than one timer with same keypress.
To start again with prior defined intervalls, use SetTimer, NAMEOFYOURTIMER, on.

Code: Select all

F7::
SetTimer, StartRuneTimer, on
SetTimer, StartStackReadyTimer, on
SetTimer, StartStackNowTimer, on
return
Just look into most useful tutorial.
User avatar
Blue Kodiak
Posts: 26
Joined: 17 Mar 2019, 00:45

Re: How can i puase settimer when my game is paused

28 Mar 2019, 03:32

Or:

Code: Select all

F6:: Pause, Toggle
Pressing F6 will then toggle all timers on/off

Return to “Ask For Help”

Who is online

Users browsing this forum: badnecros, Bing [Bot], boiler, Google [Bot] and 218 guests