Yesterday I expanded my standard script to enable me to take screenshots, crop and drag them around on screen.
They're borderless, without caption and AlwaysOnTop.
Everything worked fine.
Until today, when I wrote in a save file dialog on ctrl+s.
Since the GUI kept getting in my way, I turned AlwaysOnTop off before showing the dialog. So far so good.
But now I can't seem to turn it back on.
Code: Select all
{
winget, twin, ID
winset, AlwaysOnTop, off, ahk_id %twin%
sleep, 100
winset, AlwaysOnTop, on, ahk_id %twin%
msg("set")
}
I don't know what's causing this.
I'm now using the same identifier for both calls (off and on), to eliminate any funny business there.
I've removed the whole dialog business for testing purposes, and I've added a sleep for good measure.
Yet the GUI won't turn back to AlwaysOnTop again.
Any ideas why I'm having this trouble?
Here is a video:
At first, everything is fine. Then (when I click on it) I hit ctrl+s and boom goes the AOT property.
The code is running, see the little message "Set" pop up in the top left corner as the last call of the subroutine.