cowsrule Posted March 23, 2007 Share Posted March 23, 2007 Hi Iam new to autoit and i have a script that displays a dialog box when clicked but i want it to launch a program too can someone please help me Link to comment Share on other sites More sharing options...
Valuater Posted March 23, 2007 Share Posted March 23, 2007 Hi Iam new to autoit and i have a script that displays a dialog box when clickedbut i want it to launch a program toocan someone please help meThere are many ways to do this...Show us some script, so we an help you in YOUR direction8) Link to comment Share on other sites More sharing options...
The Kandie Man Posted March 23, 2007 Share Posted March 23, 2007 There are many ways to do this...Show us some script, so we an help you in YOUR direction8)In case you didn't understand what Valuater just said, he basically said we can't help you because you didn't give us anything to help you with. What you did was analagous to asking for help building a house, but failing to mention the location of where the house is to be built, what materials to use, where to find them, etc. By telling us you wanted it to run another program, you basically said that you want the house to be blue. Of course, this doesn't help us, because we are totally left out in the dark and since you didn't supply us with what you have, we can't help.This is to everyone on the forum:We only help you as much as you give us to help you with. "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire Link to comment Share on other sites More sharing options...
alex OF DEATH Posted March 23, 2007 Share Posted March 23, 2007 (edited) Pretty much you can just do an "& Run (Details here)" Edited March 23, 2007 by alex OF DEATH Link to comment Share on other sites More sharing options...
cowsrule Posted March 23, 2007 Author Share Posted March 23, 2007 so far this is the script with the dialog box text hidden #NoTrayIcon Dim $Message1 Dim $Message2 Dim $Message3 Dim $Title $Title = "(text here)" $Message1 = "(text here)" $Message2 = "(text here)" $Message3 = ""(text here)" MsgBox(266304,$Title,$Message1 & @CRLF & $Message2 & @CRLF & $Message3) what should i add to it to make it run a program too? Link to comment Share on other sites More sharing options...
alex OF DEATH Posted March 23, 2007 Share Posted March 23, 2007 $Message3 = ""(text here)" [b]First way:[/b] Run (etc...) MsgBox(266304,$Title,$Message1 & @CRLF & $Message2 & @CRLF & $Message3) [b]Second way:[/b] & Run (etc...) what should i add to it to make it run a program too? Do you want the text and the program to run at same time? I see two ways to do it, which I edited from the quote. Its on the line it should be on, just delete the bolded part. Link to comment Share on other sites More sharing options...
Markus Posted March 23, 2007 Share Posted March 23, 2007 As alex said you have to add a sth like this anywhere in your script: Run("C:\senselesfolder\senseless.exe") "It's easier to disintegrate an atom than a prejudice." (A.Einstein)---------------------------------------------------------------------------My C++ - tools:Tidy tool-->indents your c++ sourceCleanscript --> cleans autoit-code before compiling (co-author: peethebee)My tools:GUIBuilder-->build your window and get the source; german versionMy Games:OnlineGameCenter-->Online Chess and Connect4 with a rtf-chatSnake-->including a level editor to build your own levelsTetris-->the well known game, big funOther things:Tower of Hanoi-->perfect riddler with graphic output Link to comment Share on other sites More sharing options...
cowsrule Posted March 23, 2007 Author Share Posted March 23, 2007 thanks for the help i will post the result of the script in a few min Link to comment Share on other sites More sharing options...
cowsrule Posted March 23, 2007 Author Share Posted March 23, 2007 so do i use the seconhd way or the first way as i want to keep the dialog box Link to comment Share on other sites More sharing options...
cowsrule Posted March 23, 2007 Author Share Posted March 23, 2007 i tryed run C:\Documents and Settings\Brandon\Desktop\thefilename.exe and it just made 2 dialog boxes come up instead of one lol what now and i am just starting at programing/scripting so i am really not good at this Link to comment Share on other sites More sharing options...
therks Posted March 23, 2007 Share Posted March 23, 2007 i tryed run C:\Documents and Settings\Brandon\Desktop\thefilename.exeand it just made 2 dialog boxes come up instead of onelolwhat nowWe don't know. We can't see what you did. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
alex OF DEATH Posted March 23, 2007 Share Posted March 23, 2007 (edited) i tryed run C:\Documents and Settings\Brandon\Desktop\thefilename.exeand it just made 2 dialog boxes come up instead of onelolwhat nowand i am just starting at programing/scripting so i am really not good at thisDid you add the Parenthesese that were required? As in Run ( file path here )And the quotes on the files path. Can't forget that. Edited March 23, 2007 by alex OF DEATH Link to comment Share on other sites More sharing options...
cowsrule Posted March 23, 2007 Author Share Posted March 23, 2007 ok i am posrting my dialog csript #NoTrayIcon Dim $Message1 Dim $Message2 Dim $Message3 Dim $Title $Title = "test here" $Message1 = "test here" $Message2 = "test here" $Message3 = "test here" MsgBox(266304,$Title,$Message1 & @CRLF & $Message2 & @CRLF & $Message3) can you add to it to make it run a file at C:\"thefilename" then post it and i will change the file name so it runs the right one Link to comment Share on other sites More sharing options...
alex OF DEATH Posted March 23, 2007 Share Posted March 23, 2007 ok i am posrting my dialog csript #NoTrayIcon Dim $Message1 Dim $Message2 Dim $Message3 Dim $Title $Title = "test here" $Message1 = "test here" $Message2 = "test here" $Message3 = "test here" MsgBox(266304,$Title,$Message1 & @CRLF & $Message2 & @CRLF & $Message3) can you add to it to make it run a file at C:\"thefilename" then post it and i will change the file name so it runs the right one #NoTrayIcon Dim $Message1 Dim $Message2 Dim $Message3 Dim $Title $Title = "test here" $Message1 = "test here" $Message2 = "test here" $Message3 = "test here" MsgBox(266304,$Title,$Message1 & @CRLF & $Message2 & @CRLF & $Message3) $ Run ("COMPLETE FILE PATH HERE") Use the autoit helpfile. It's easy to use, and will tell you everything you need to know. Link to comment Share on other sites More sharing options...
cowsrule Posted March 23, 2007 Author Share Posted March 23, 2007 hmm i added the ( and ) as you said but it came up with an error saying Run (C:\THE FILE NAME.exe Run (C^ ERROR Link to comment Share on other sites More sharing options...
alex OF DEATH Posted March 23, 2007 Share Posted March 23, 2007 hmm i added the ( and ) as you said but it came up with an error saying Run (C:\THE FILE NAME.exeRun (C^ ERRORQuotes.I made this as easy as possible for you, and yo ustill messed it up. Link to comment Share on other sites More sharing options...
therks Posted March 25, 2007 Share Posted March 25, 2007 Okay, I have to ask, wtf is up with this line? MsgBox(266304,$Title,$Message1 & @CRLF & $Message2 & @CRLF & $Message3) $ Run ("COMPLETE FILE PATH HERE") That's not valid code at all. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
jaenster Posted March 25, 2007 Share Posted March 25, 2007 You need to do with quotes, other the compiler guess you use a variable. And each command, each got a own line -jaenster Link to comment Share on other sites More sharing options...
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