Hi.
This makro is done to be run at a game. It shall do some stuff and "buff" you every 10 min. Since I sometimes chane the "stuff" i thought i simply do a
If (A_TickCount > last_buff + 600000)
{
Gosub PBuffs
}
instead of counting the waits of the "stuff" part.
Pbuffs looks like:
ControlSend, ,!1, ahk_id %sb_id%; Free Though (Int)
Sleep 4500.........
My problem is now that when I use Gosub PBuffs inside this If then the ! (alt +) is being ignored.
the scrips, at least the important parts:
This one works as it should do, it presses alt + 1 inside sub PFuffs
Loop
{
Gosub PBuffs
Loop 20
{
do something and sleep a lot
}
}
Return
; Personal Buffs
PBuffs:
ControlSend, ,{END}, ahk_id %sb_id%
ControlSend, ,!1, ahk_id %sb_id%; Free Though (Int)
Sleep 4500
........
Return ; End Procedure
This one doesnt work, though PBuffs is completely unchanged and it gets called, I tested that with a msg box instead of key presses. Makro presses 1 instead of alt+1
Code:
last_buff = 0
Loop
{
If (A_TickCount > last_buff + 600000)
{
Gosub PBuffs
last_buff = %A_TickCount%
}
Loop 20
{
Do something too, but without loop if possible.
}
}
Return
; Personal Buffs
PBuffs:
ControlSend, ,{END}, ahk_id %sb_id%
ControlSend, ,!1, ahk_id %sb_id%; Free Though (Int)
Sleep 4500
.....
Return ; End Procedure