Jump to content

Can AutoIT react to output of VB MsgBox


 Share

Recommended Posts

Hi All,

I was wondering.....

I need to create a Message Box with three custom buttons, so I have to go VB.

Is there some way to have my AutoIT script "DO" certain actions based on the Output of the VB Msg box.

I.E;

1. AutoIT Script Starts.

2. VB Script is invoked with Custom MsgBox that says Choice 1 Choice 2 Choice 3

3. How can I have AutoIT Script Detect/read/be passed, that output, aside from outputing to file and reading file?

Thanks

Link to comment
Share on other sites

Here is an example of a 3 button gui. :idiot:

#include <GUIConstants.au3>
GUICreate("Choose", 350, 100); will create a dialog box that when displayed is centered

$c1 = GUICtrlCreateButton ("Choice 1",  50, 50, 50)
$c2 = GUICtrlCreateButton ( "Choice 2",  150, 50, 50)
$c3 = GUICtrlCreateButton ( "Choice 3",  250, 50, 50)

GUISetState ()    ; will display an  dialog box with 3 button

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
   
   Select
      
      Case $msg = $GUI_EVENT_CLOSE
         Exit
      
      Case $msg = $c1
      ;Action
         MsgBox(0, '', '1'); Show only
      
      Case $msg = $c2
      ;Action
         MsgBox(0, '', '2'); Show only
      
      Case $msg = $c3
      ;Action
         MsgBox(0, '', '3'); Show only
      
   EndSelect
   
Wend
Edited by MHz
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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