Simple(?) WinSet issue

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
lilygel
Posts: 4
Joined: 25 May 2017, 23:15

Simple(?) WinSet issue

26 Jun 2017, 07:42

My issue is WinSet simply does not let me set the specified window to be always on top.

Code: Select all

InputBox:
InputBox, userinput, Input, , , 300, 120, 960, 290
Winset, AlwaysOnTop, On, ahk_class #32770  ; i've also tried using Input

Same when I pull up a message box via input box. Meaning, I enter a phrase in input box, it runs a short command to read contents of a txt then display that txt via message box. Unfortunately, the windows still work normal. I pull up a full-sized window and they get placed behind. It should be so darn simple. I don't know what's wrong. BTW, I've used Window Spy to get the wintitle / class.
User avatar
boiler
Posts: 16925
Joined: 21 Dec 2014, 02:44

Re: Simple(?) WinSet issue

26 Jun 2017, 08:04

Your script never gets to your WinSet command while it's open because it won't move on to the next line until the InputBox is dismissed. That's how you want it to behave, by the way, because your next lines are typically acting on what was input, so it waits for that to be completed.

If you want to execute some lines while the InputBox is active, you need some event to trigger those lines of code. For an example of that, see the OnMessage commands I used in InputBox Creator.
lilygel
Posts: 4
Joined: 25 May 2017, 23:15

Re: Simple(?) WinSet issue

26 Jun 2017, 08:10

Oh, so that's why. Should've figured it out with the msgbox thing. It does stop there until you dismiss it. I'll try revising later since I'm at work atm.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: mikeyww and 211 guests