How to resolve the algorithm Window management step by step in the AutoHotkey programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm Window management step by step in the AutoHotkey programming language
Table of Contents
Problem Statement
Treat windows or at least window identities as first class objects.
The window of interest may or may not have been created by your program.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm Window management step by step in the AutoHotkey programming language
Source code in the autohotkey programming language
F1:: ;; when user hits the F1 key, do the following
WinGetTitle, window, A ; get identity of active window into a variable
WinMove, %window%, , 100, 100, 800, 800 ; move window to coordinates, 100, 100
; and change size to 800 x 800 pixels
sleep, 2000
WinHide, % window ; hide window
TrayTip, hidden, window is hidden, 2
sleep, 2000
WinShow, % window ; show window again
loop,
{
inputbox, name, what was the name of your window?
if (name = window) ; compare window variables for equality
{
msgbox you got it
break
}
; else try again
}
WinClose, % window
return
You may also check:How to resolve the algorithm Aliquot sequence classifications step by step in the Go programming language
You may also check:How to resolve the algorithm Pythagorean triples step by step in the OCaml programming language
You may also check:How to resolve the algorithm System time step by step in the Nim programming language
You may also check:How to resolve the algorithm Suffixation of decimal numbers step by step in the Perl programming language
You may also check:How to resolve the algorithm Dot product step by step in the Crystal programming language