Jump to content

Help: pass info from GUI to script


Recommended Posts

Probably very stupid, but I try to use the values from a GUI in the remainder of the script; it seems the script stops...

what is wrong ??

GuiSetState()
While 1
    $msg = GUIGetMsg ( )
    Sleep ( 1 )
    Select
        Case $msg = $Button_9
            $fopen = FileOpenDialog ( "Pick a file", "", "All Files (*.*)" )
            GUICtrlSetData ( $Input_5, $fopen )
        Case $msg = $Button_10
            $fopen1 = FileOpenDialog ( "Pick a file", "", "All Files (*.*)" )
            GUICtrlSetData ( $Input_6, $fopen1 )
        Case $msg = $Button_8
            $File1 = GuiCtrlRead($Input_5)
            $File2 = GuiCtrlRead($Input_6)
            $test = GuiCtrlRead($Input_7) 
          ;Run ( @Comspec & ' /c notepad "' & GuiCtrlRead ( $Input_5 ) & '"' )
        ;Run ( @Comspec & ' /c notepad "' & GuiCtrlRead ( $Input_6 ) & '"' )
        ;$GUI_EVENT_CLOSE
            Exitloop
        Case $msg = $GUI_EVENT_CLOSE
          ;Exitloop
    EndSelect
WEnd 
Exit
GUIDelete()
;$File1 = GuiCtrlRead($Input_5)
;$File2 = GuiCtrlRead($Input_6)
;$test = GuiCtrlRead($Input_7) 
msgbox (0,"state","444",2)
MsgBox(0, "files", "this is the first: " & $File1 & @LF & _
        "this is the second: " & $File2 & @LF & _
        "output in: " & $test,2)
Edited by groucho
Link to comment
Share on other sites

commented out the Exit line

GuiSetState()
While 1
    $msg = GUIGetMsg ( )
    Sleep ( 1 )
    Select
        Case $msg = $Button_9
            $fopen = FileOpenDialog ( "Pick a file", "", "All Files (*.*)" )
            GUICtrlSetData ( $Input_5, $fopen )
        Case $msg = $Button_10
            $fopen1 = FileOpenDialog ( "Pick a file", "", "All Files (*.*)" )
            GUICtrlSetData ( $Input_6, $fopen1 )
        Case $msg = $Button_8
            $File1 = GuiCtrlRead($Input_5)
            $File2 = GuiCtrlRead($Input_6)
            $test = GuiCtrlRead($Input_7) 
         ;Run ( @Comspec & ' /c notepad "' & GuiCtrlRead ( $Input_5 ) & '"' )
       ;Run ( @Comspec & ' /c notepad "' & GuiCtrlRead ( $Input_6 ) & '"' )
       ;$GUI_EVENT_CLOSE
            Exitloop
        Case $msg = $GUI_EVENT_CLOSE
         ;Exitloop
    EndSelect
WEnd 
;Exit
GUIDelete()
;$File1 = GuiCtrlRead($Input_5)
;$File2 = GuiCtrlRead($Input_6)
;$test = GuiCtrlRead($Input_7) 
msgbox (0,"state","444",2)
MsgBox(0, "files", "this is the first: " & $File1 & @LF & _
        "this is the second: " & $File2 & @LF & _
        "output in: " & $test,2)

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

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...