Jump to content

How do I continue on something?


Qslig
 Share

Recommended Posts

Help :lmao:

Okey, Where it says If $msg = $run Then $answer1 = Inputbox("run", "Type in what you want to run") I want to countinue on that like run($answer1) but I dont know hot to do that. Like when you have enter the answer in Inputbox then it will be $answer1 and right after you have typed in your answer and hit OK then I want it to run the answer run($answer1)

;Start GUI
#include <GUIConstants.au3>
GUICreate("Supr Progr")
GUISetState ()                      

;Meny 1
$arkiv = GUICtrlCreateMenu ("Arkiv")
$run = GUICtrlCreateMenuitem ("kör",$arkiv)
$Stang = GUICtrlCreateMenuitem ("Stäng",$arkiv)
;Meny2
$help = GUICtrlCreateMenu ("?")
$info = GUICtrlCreateMenuitem ("Info",$help)

; Håller igång programet tills man stänger det
While 1

    $msg = GUIGetMsg()
    If $msg = $run Then $answer1 = Inputbox("run", "Type in what you want to run")
    If $msg = $info Then msgbox(0, "Info", "Fett med info här")    
    If $msg = $GUI_EVENT_CLOSE or $msg = $stang Then ExitLoop
Wend
Link to comment
Share on other sites

Replace the line If $msg = $run Then $answer1 = Inputbox("run", "Type in what you want to run")

with the following:

If $msg = $run Then
   $answer1 = Inputbox("run", "Type in what you want to run")
   ;might want to do error checking here;
   ;might also want to say  Opt("RunErrorsFatal", 0) ???? or check if fileExists
   Run($answer1)
EndIf
Edited by CyberSlug
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
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...