Jump to content

Message mox function


d_paulo
 Share

Recommended Posts

Does anyone know how it works ?

I need to create a simple message dialog box that ask me if I want to open the Winamp Player or not.

A simple box whit the Yes and No buttons. When you click on the Yes, I want the winamp Pop-up and if you click on the No, the message box should be closed whitout open Winamp.

I try over the few hours, and I still have problems. I'm sure that is something wrong in my code, so I'm goanna paste it bellow. The path for winamp is correct, no erroe and no winamp opened :P

$answer = MsgBox(4, "AutoIt Example", "This script will call a couple of example functions. Run?")

If $answer = 7 Then

Exit

ElseIf $answer = 6 Then

FileOpen ( "winamp.exe", 0 )

EndIf

Edited by d_paulo
Link to comment
Share on other sites

  • Moderators

Does anyone know how it works ?

I need to create a simple message dialog box that ask me if I want to open the Winamp Player or not.

A simple box whit the Yes and No buttons. When you click on the Yes, I want the winamp Pop-up and if you click on the No, the message box should be closed whitout open Winamp.

I try over the few hours, and I still have problems. I'm sure that is something wrong in my code, so I'm goanna paste it bellow. The path for winamp is correct, no erroe and no winamp opened :P

$answer = MsgBox(4, "AutoIt Example", "This script will call a couple of example functions. Run?")

If $answer = 7 Then

Exit

ElseIf $answer = 6 Then

FileOpen ( "winamp.exe", 0 )

EndIf

Yes = 6

No = 7

You're using 1 and ... It's not "FileOpen(winamp.exe)" it's Run("Total path to exe\name.exe")

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...