d3ullist icon

ChangeDate

d3ullist | PRO | 07/13/21 03:06:18 PM UTC (Edited) | 0 ⭐ | 512 👁️ | Never ⏰ | []
Autohotkey |

1.84 KB

|

None

|

0 👍

/

0 👎

;https://github.com/jNizM/ahk_notepad-plus-plus
;Hotkeys https://autohotkey.com/docs/Hotkeys.htm
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#MaxThreadsPerHotkey 13
#SingleInstance
 
; full screen, steam play: 425 415
; play green, steam play: 0x36c343 (54 15 67)
 
+F2::
    loop {
        if CheckForColor(425, 415, 0x511E25)
            Break
        sleep 1000
    }
 
    SetDateOneAhead()
    
    ; Click steam start game button
    ClickAtPos(425, 415)
    
    timePassed := timePassed + 1
    
    loop {
        if CheckForColor(425, 415, 0x2E84BB)
            Break
        if timePassed > 10000
            Break
        sleep 1000
        timePassed += 1000
    }
    
    ; Click steam start game button
    ClickAtPos(1435, 218)
    
    sleep 1000
    
return
 
^!d::run %comspec% /c date %realdate% 
 
#IfWinNotActive, ahk_class HwndWrapper[DefaultDomain;;1faeaa34-0adc-4b9b-857c-3df627eee751]
F12::Reload
 
+F1::ListHotkeys
 
SetDateOneAhead()
{
    realdate := %A_MM%-%A_DD%-%A_YYYY%
    realdate += 1, Days
    FormatTime, nDate, %realdate%, MM-dd-yyyy 
    run %comspec% /c date %nDate%
}
 
CheckForColor(x, y, color) 
{
    PixelGetColor, OutputVar, 891, 864,
    ; MouseMove, x, y,
    WriteLine(OutputVar)
    return OutputVar = color
}
 
WriteLine(message:="", timeout:=3)
{
    if (message != "")
    {
        ; https://autohotkey.com/docs/commands/Progress.htm
        Progress, B2 ZH-1 FS12, %message%
        SetTimer, TimeoutTimer, % -timeout*1000
    }
}
 
ClickAtPos(x := 0, y := 0, delay := 10)
{
    ; MouseMove, x, y
    sleep delay
    ControlClick, x y, HwndWrapper[BlueStacks.exe;;3bc1fb9d-73e0-4e3d-a17f-3c915ee9ba61],,,, Pos
    Click
}
 
TimeoutTimer:
    Progress, Off
Return

Comments