sigil Posted April 25, 2008 Posted April 25, 2008 As far as I understand, this code: msgbox(0,"test","stay on top") winsetontop("test","",1) should make a MsgBox() window that is always on top, even if it isn't active. But when I run the script, I just get a MsgBox() that goes behind any other window when I click on that window, the same as it would if I didn't have the WinSetOnTop() line. It seems like WinSetOnTop() isn't doing anything. Am I using it correctly? I'm running AutoIt v3.2.10.0 on Windows 2000.
monoceres Posted April 25, 2008 Posted April 25, 2008 As far as I understand, this code: msgbox(0,"test","stay on top") winsetontop("test","",1) should make a MsgBox() window that is always on top, even if it isn't active. But when I run the script, I just get a MsgBox() that goes behind any other window when I click on that window, the same as it would if I didn't have the WinSetOnTop() line. It seems like WinSetOnTop() isn't doing anything. Am I using it correctly? I'm running AutoIt v3.2.10.0 on Windows 2000. The problem is that MsgBox() is a blocking function, it pauses your script until you close it. therefore the WinSetOnTop() executes after the MsgBox is closed, to fix this try making your own msgbox Broken link? PM me and I'll send you the file!
ProgAndy Posted April 25, 2008 Posted April 25, 2008 You can set a TOPMOST style, too : MsgBox(262144,"top","") *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
sigil Posted April 25, 2008 Author Posted April 25, 2008 Thanks. I made a GUI and used winsetontop(). It completely meets my needs now.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now