Jump to content

Recommended Posts

Posted

In this particular situation I have a somewhat expected error that occurs while a script is running. My initial thought was to use Adlib, but the main script uses message boxes at or around the time that the error appears and the script pauses while the message box is up.

I did this before I saw PsaltyDS's nice solution here: http://www.autoitscript.com/forum/index.php?showtopic=92350

This is the main script, which normally would contain Adlib instead of the first line:

ShellExecute(@ScriptDir & "\adlib.exe")

;do some stuff

MsgBox(0,"Message Box","My Message here.") ;error occurs around this time

;do some more stuffoÝ÷ Ù8b²+-ë-jwZÞªê-Ùbn«¨¶Ç+pêÞ×møËayÊ'¶º%¶%É-¡Éh±ëayê뢼"Ú0jëh×6While ProcessExists("mainscriptname.exe")
    If WinExists("My Error Title") Then
        WinActivate("My Error Title")
        ControlClick("My Error Title","",1234)
    EndIf
    Sleep(10)
WEnd

I'd like to see what other workarounds people are using. If I know the window's title and control information ahead of time, is there a way to prevent it from becoming visible in the first place? In my situation, the user is around to click the message box. They could click the button to clear the error too, but I'm trying to make life a little easier. The way I have it, they still see the error code for a short period of time.

Posted

MsgBox(262144 + 32, "title", "text")

262144 MsgBox has top-most attribute set

32 Question-mark icon

Right there in front of me the whole time. Very nice. Thanks!

(I was looking for "Always on Top" not "Top-most attribute" cough cough)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...