Saturday, January 14, 2023

AutoHotKey GOODNESS!

 As a longtime Sikuli user I was struggling but reluctant to move.  I dabbled in pywinauto and struggled but really didn't want a "macro" solution but I recently discovered AutoHotKey and am a convert!  Here's a few hrs work to automate AS3!


 

 

 #Requires AutoHotkey v2.0
;
;This Script will open a set of FireCaputre recordings in AutoStakkert3 and stack with defaults
;20220114 - ver 1.0
;
;FireCaputre folder
FCSaves := "E:\E-Delete\Mars2022--Expiring-20241212\Mars_2022_11_24"
;
try
    Run "C:\Users\Mike Phillips\OneDrive\D-Permanent\Software\AutoStakkert\AutoStakkert.exe"
catch
    MsgBox "File does not exist."
sleep 5000
; Consider set focus and or wait for app
;
; Sends file / open
MenuSelect "AutoStakkert",, "File", "Open AVI/SER"
sleep 100
Send "^a"
sleep 100
Send FCSaves
sleep 100
Send "!o"
;
;This section gets window postion to click into middle of diaglog box
WinGetPos &X, &Y, &W, &H, "Open your file"
;
;MsgBox "Open your file is at " X "," Y " and its size is " W "x" H
nX := Integer((X+(W/2))/2)
ny := Integer((Y+(H/2))/2)
;MsgBox "X+(W/2) = " nX " Y+(H/2) = " nY
sleep 100
MouseClick "left", nX, nY
sleep 100
MouseClick "left", nX, nY
sleep 100
Send "^a"
sleep 100
Send "^a"
sleep 100
Send "!o"
;
; This section sets Mike's favorite Mars stacking parameters
;
WinActivate "ahk_class TFormImage"
sleep 2000
SetControlDelay -1
ControlClick "TRadioButton3","ahk_class TFormImage"
sleep 100
ControlClick "TButton3","ahk_class TFormImage"
sleep 100
WinActivate "ahk_class TFormMain"
ControlClick "TRadioButton4","ahk_class TFormMain"
sleep 100
ControlClick "TButton5","ahk_class TFormMain"

 

No comments:

Post a Comment

You are no longer able to spam this blog

Note: Only a member of this blog may post a comment.

Blog Archive