Skip to content

Instantly share code, notes, and snippets.

@OKsign
Created February 27, 2021 06:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OKsign/8285a76648b9b6a29f4ca865306a0c77 to your computer and use it in GitHub Desktop.
Save OKsign/8285a76648b9b6a29f4ca865306a0c77 to your computer and use it in GitHub Desktop.
#Include <WinAPI.au3>
$activeApp = _WinAPI_GetClassName(WinGetHandle("[ACTIVE]"))
$activeWindow = WinGetTitle("[ACTIVE]")
; -------------------------------------------------------------------
; Example 1 - based on active app:
;
; If $activeApp = "WordPadClass" Then
; WinMove("", "", 1326, 60, 518, 962)
; sleep(1990)
; EndIf
;
; Example 2 - based on title of active window:
;
; If $activeWindow = "gt - WordPad" Then
; WinMove("", "", 1326, 60, 518, 962)
; sleep(1990)
; EndIf
;
; Example 3 - move and resize active window:
;
; WinMove("", "", 1326, 60, 518, 962)
; sleep(1990)
;
; -------------------------------------------------------------------
; YOUR CODE BELOW
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment