NTBM Posted August 23, 2007 Posted August 23, 2007 I have a script that opens a scanned graphic and then asks for a file number. i want the inputbox to stay on top but the user can click on the program behind to rotate the doc as required, to stop the user from having to alt tab (or mouse) back to the question. i have tried searching for this but i dont even know ehat it would be called ("stay on top"). ------------------Part of code------------------------------------------- WinWait("Microsoft Office Document Imaging","",5) If Not WinActive("Microsoft Office Document Imaging","") Then WinActivate("Microsoft Office Document Imaging","") WinWaitActive("Microsoft Office Document Imaging","",5) If Not WinActive("Microsoft Office Document Imaging","")Then MsgBox(4096,"ERROR","Please report error #2 to Andrew or Ben" &@CR&"This message will disapear in 10 seconds",10) Exit EndIf WinActivate("job number","") BlockInput(0) $jobnum=InputBox("Job number", "What is the Job Number") ------------------End of part------------------------------------------- Any assistance appreciated.
fowmow Posted August 23, 2007 Posted August 23, 2007 I have a script that opens a scanned graphic and then asks for a file number. i want the inputbox to stay on top but the user can click on the program behind to rotate the doc as required, to stop the user from having to alt tab (or mouse) back to the question. i have tried searching for this but i dont even know ehat it would be called ("stay on top").Well, there is $WS_EX_TOPMOST. However, it is a common extended style (useful for GUIs for example).It has no effect on MsgBox's or InputBox's.And to be honest... since you are already attempting to block input, perhaps that is best. You can wind up causing people to kind of get "locked out" by controlling too much.One thing you could do is check if your InputBox is the active window in the message loop. If it isn't, make it so.Or notify them when your InputBox loses focus so they know that is *not* the desired effect and strange things could happen.*Another* example would be to make this a GUI. Then regardless of where they *attempt* to go, your window will always be on top and you can block input in all but your GUI.There may be even better alternatives... I am relatively new to AutoIt.
Generator Posted August 23, 2007 Posted August 23, 2007 You cannot make your inputbox or msgbox stay on top if you don't use a GUI for it, the script will wait till the msg box or inputbox is finished and then proceed the next line. What you can do is make a GUI and do a check to make it stay on top.
NTBM Posted August 23, 2007 Author Posted August 23, 2007 Thanks guys. i did know it could be done. but was pretty sure it was to GUI's but it is allways worth asking.
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