DCCD Posted October 28, 2008 Posted October 28, 2008 Hi, This script work great, but if run "myfile.exe -w" i see the first line "MSGBOX" then "wwwwwwwww" the "wwwwwwwww" msgbox this what i want the "DDDDDDDD" msgbox just if i click myfile.exe Why I should see "DDDDDDDD" msgbox, if i run myfile.exe -w or run myfile.exe -x MsgBox(4096, "DDDDDDDD", "DDDDDDDD") If $cmdline[0] > 0 Then Switch $cmdline[1] Case "-w", "/msg" MsgBox(0, "using -w", "wwwwwwwww") Case "-x", "/aaa" MsgBox(0, "using -x", "xxxxxxxxx") Case Else ConsoleWrite(" - - - Help - - - " & @crlf) ConsoleWrite(" -w : msgbox says Hello!" & @crlf) ConsoleWrite(" -x : msgbox says Bye!" & @crlf) ConsoleWrite(" - - - - - - - - " & @crlf) EndSwitch EndIf Exit Exit [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group
BrettF Posted October 28, 2008 Posted October 28, 2008 (edited) Erm you do know that you have to compile your script to take advantages of that right? Oh and why do you see the DDDDDDDD message box? Because you told it to. Have a careful read of your script. Here you are. If $cmdline[0] > 0 Then Switch $cmdline[1] Case "-w", "/msg" MsgBox(0, "using -w", "wwwwwwwww") Case "-x", "/aaa" MsgBox(0, "using -x", "xxxxxxxxx") Case Else $text = " - - - Help - - - " & @CRLF $text &= " -w : msgbox says Hello!" & @CRLF $text &= " -x : msgbox says Bye!" & @CRLF $text &= " - - - - - - - - " MsgBox (0, "ERROR", $text) EndSwitch Else MsgBox (0, "ERROR", "No Command Line Paramaters!") EndIf Edited October 28, 2008 by BrettF Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
DCCD Posted October 28, 2008 Author Posted October 28, 2008 you're the man, great work see ya [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group
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