hey, here is now i would do it. if not using pixels or memory and a simple times i would do this.
Code:
SetTitleMatchMode, 2
sitf := fkey("F2")
fogf := fkey("F9")
return ;end of program startup
;--------------------------------------------------------
findco2: ;this gets the Co2 process id number so i can call that with
if !id1 ;ahk_id %id1% instead of the wintitle [Co.
{ ;this makes it assigned to that one Co2 instance.
tooltip, Activte Conquer Window Now [ 3 ]
sleep, 1000
tooltip, Activte Conquer Window Now [ 2 ]
sleep, 1000
tooltip, Activte Conquer Window Now [ 1 ]
sleep, 1000
WinGet,id1, ID,[Conq
WinActivate, ahk_id %id1%
if !id1
{
ttm("Can not find Conquer window!")
exit
}
tooltip
}
return
;--------------------
tt: ;tooltip kill timer
tooltip
return
;--------------------
^p:: ;pause toggle
pause
return
;--------------------------------
^!s:: ;fog toggle
foggerButton:
if !fogger
{
gosub, findco2
fogger := 1
settimer,fogger ;start timer
ttm("Fogger [ON]")
}
else
{
fogger := 0
settimer,fogger,off
ttm("Fogger [OFF]")
}
return
;--------------------------------------------------------------------
fogger: ;fog timer
loop, 3
{
controlclick,x%fogf% y745,ahk_id %id1%,,right,,NA ;y745 is lower line in co2win for fkeys
sleep,100
controlclick,x512 y384,ahk_id %id1%,,right,,NA ;center click to start skill
sleep,900
}
controlclick,x%sitf% y745,ahk_id %id1%,,Right,,NA ;sit fkey..
sleep,10000
return
;------------------------
ttm(msg) ;tooltip msg set for 3 second display time
{
tooltip,%msg%,0,0
settimer,tt,3000
}
return
;------------------------
fkey(fval) ;F-Key to x-mouse position conversion
{
if fval = F1
return, 111
else if fval = F2
return, 153
else if fval = F3
return, 193
else if fval = F4
return, 233
else if fval = F5
return, 275
else if fval = F6
return, 317
else if fval = F7
return, 355
else if fval = F8
return, 397
else if fval = F9
return, 437
else if fval = F10
return, 476
}
return
This works well for me. i haven't had time to really debug it and i wish i knew memory address reading so i could use that. i could make a pixel based one, but at least a timed one will totally run in background.