Desired Result:
- Show ImageA at specific coordinates for 750ms
- Hide ImageA (file is 200x200 px)
- Show ImageB at specific coordinates for 750ms
- Hide ImageB (file is 250x250x px)
Code: Select all
Gui, -Caption +AlwaysOnTop +ToolWindow +LastFound
Gui, Margin, 0, 0 ; Remove margins to get perfect alignment with center of screen
Gui, Color, 0000FF ; Set background color. You might need to change this color to one not contained in the crosshair
WinSet, TransColor, 0000FF ; Make the background color transparent
Gui, Add, Picture, vSmall, ImageA.png ; Add picture and assign it a variable
Gui, Add, Picture, vBig, ImageB.png ;
GuiControl, Hide, Big ; If not included, both images appear vertically stacked, moving between coordinate locations. This ensures only one image is shown.
Gosub, Animate
Return
Animate:
Gui, Show, x680 y1200, Small ; Show ImageA.png at exact screen coordinates
Sleep, 750
Gui, Hide ; Hide ImageA.png
Gui, Show, x650 y1170, Big ; Show ImageB.png at exact screen coordinates
Sleep, 750
Gui, Hide ; Hide ImageB.png
Gosub, Animate ; Restart animation process
Return