jerseyzuks Posted May 2, 2011 Share Posted May 2, 2011 I first want to say thanks to everyone on here. The wealth of knowledge here is amazing, and has helped me out tremendously. I have been stuck quite a few times, and swore I wouldn't post for help unless I exhausted every avenue on my own. Most of the time, I was able to search and find the answer I was looking for. But this time I am stuck, and having no luck searching. I am tasked with writing a bunch of scripts that are going to require a user's interaction. The script will perform a function, launch an application, navigate to a screen... etc. Occasionally, the user will be asked to click something on the screen behind the message box, then click OK. Is it possible to have the message box always stay on top? I have tried using the WinSetOnTop command, but this doesn't seem to work with MsgBox. Any help is greatly appreciated! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 2, 2011 Moderators Share Posted May 2, 2011 jerseyzuks,Welcome to the AutoIt forum. Take a look at the Modal MsgBox Styles tutorial in the Wiki - it shows a couple of ways you can get the MsgBox to "stick" on top. But this normally means you cannot interact with the script below - which may not be what you want. Could you post a short example of the sort of thing you are trying to do - it might be easier to code something in the script which will recall the MsgBox (or another child GUI ) once the required action has been taken by the user. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
wakillon Posted May 2, 2011 Share Posted May 2, 2011 See MsgBox flag in help file MsgBox ( 262144, "Test", "This box will time out in 10 seconds", 10 ) ; 262144 MsgBox has top-most attribute set AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
jerseyzuks Posted May 2, 2011 Author Share Posted May 2, 2011 Thanks Melba! I had seen that tutorial in the Wiki, but I wasn't able to make it do what I needed. here is a bit of the code (ignore my silly comments, I need to explain each line of code to people with zero scripting experience) Send("{LWIN}R") Sleep(1000) ;pause for 1 second Send("mmc devmgmt.msc") ;launches device manager Send("{ENTER}") ;sends enter Sleep(500) ;pause for 1/2 second MsgBox(0, "MS Audio Patch Test", 'Expand the + sign next to "Sound, video, and game controllers" and verify that all audio devices are working properly, and none have a yellow symbol') ;prompts user to click ok after verifying that all audio devices are working properly WinWaitClose("MS Audio Patch Test") ;waits for the message box to be closed before proceeding Windows Sleep(500) ;pause for 1 second WinClose("Device Manager") ;Tells the script to close the Windows Installer screen that is opened Sleep(1000) ;pause for 1 second Link to comment Share on other sites More sharing options...
jerseyzuks Posted May 2, 2011 Author Share Posted May 2, 2011 See MsgBox flag in help file MsgBox ( 262144, "Test", "This box will time out in 10 seconds", 10 ) ; 262144 MsgBox has top-most attribute set Thank you! not sure how I missed that, but it did exactly what I needed! Thanks everyone for having patience with an autoit newbie! Link to comment Share on other sites More sharing options...
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