#NoEnv #SingleInstance force SetBatchLines, -1 SendMode Input SetTimer AutoCopy, 1000 AutoCopy: if WinActive("ahk_class TInpComboDlg") { WinGet, TCPID, PID, A TC3264 := A_Is64bitOS = 0 ? 32 : GetBitness(TCPID) ButtonOK := TC3264 = 32 ? "TButton6" : "Button12" Sleep, 20 SendMessage, 0x201,,, % ButtonOK, ahk_class TInpComboDlg SendMessage, 0x202,,, % ButtonOK, ahk_class TInpComboDlg } Return GetBitness(Process) { Process, Exist, %Process% if !(PID := ErrorLevel) return 0 hProcess := DllCall("OpenProcess", "uint", 0x400, "uint", 0, "uint", PID, "ptr") if ( hProcess = 0 ) return 0 res := DllCall("IsWow64Process", "ptr", hProcess, "int *", Wow64Process) if ( res = 0 ) return 0 DllCall("CloseHandle", "ptr", hProcess) return Wow64Process? 32:64 } |