dazzyreil Posted April 19, 2004 Share Posted April 19, 2004 GUICreate ( "Bla Bla ", 450, 300) $not = GuiSetControl("button", "Run Notepad", 10, 30, 150) $war = GuiSetControl("button", "Run explorer", 10, 100, 150) GuiWaitClose() $not = Run("notepad.exe") $war = Run("explorer.exe") exit why does it run both programs ?? Link to comment Share on other sites More sharing options...
scriptkitty Posted April 19, 2004 Share Posted April 19, 2004 It uses regular AutoIt script, you would need to have an if statement. $not = Run("notepad.exe") $war = Run("explorer.exe") is the same as: Run("notepad.exe") Run("explorer.exe") except that you don't get the exit code to become the variables you call out. AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
jpm Posted April 19, 2004 Share Posted April 19, 2004 GUICreate ( "Bla Bla ", 450, 300) $not = GuiSetControl("button", "Run Notepad", 10, 30, 150) $war = GuiSetControl("button", "Run explorer", 10, 100, 150) GuiWaitClose() $not = Run("notepad.exe") $war = Run("explorer.exe") exit why does it run both programs ??You need to check which button has closed the GUI GUICreate ( "Bla Bla ", 450, 300) $not = GuiSetControl("button", "Run Notepad", 10, 30, 150) $war = GuiSetControl("button", "Run explorer", 10, 100, 150) GuiWaitClose() if $not = GuiRead() then Run("notepad.exe") if $war =GuiRead() then Run("explorer.exe") exit Link to comment Share on other sites More sharing options...
dazzyreil Posted April 19, 2004 Author Share Posted April 19, 2004 thank you 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