Sign in to follow this  
Followers 0
d_paulo

Message mox function

4 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



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")


[center]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.[/center]

Share this post


Link to post
Share on other sites

replace

FileOpen ( "winamp.exe", 0 )

with

Run ( "winamp.exe")

but you may need the full path

C:\Program Files\...\winamp.exe

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Yes = 6

No = 7

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

Thanks, it is working fine now.

Share this post


Link to post
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
Sign in to follow this  
Followers 0