Problem mit dem run befehl

03/13/2011 19:00 Ludder231#1
Ich wollte mal wissen ob mir wer sagen kann warum er die datei nicht findet/ausführt...

PHP Code:
While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
            
        case 
$Button1
            
            IniWrite
(@DesktopCommonDir&"\Teamspeak.ini""File2""Path2"GUICtrlRead($Input1form))
            
run($Input1form)
            if @
error Then
            MsgBox
(16"Error""File does not exists"5)
            endif
            
        
        
        case 
$Button2
            GUICtrlSetData
($Input1form,IniRead(@DesktopCommonDir&"\Teamspeak.ini""File2""Path2"""))
            if 
not FileExists(@DesktopCommonDir&"\Teamspeak.ini"Then
                msgbox
(16"Error""Cannot read Teamspeak.ini..."& @CRLF _
                
"May because there is no file to read..."5)
            endif
            
    
    EndSwitch
WEnd
EndFunc 
Ich bedanke mich schonmal im vorraus für antworten
MfG Ludder231
03/13/2011 19:21 SCORNI#2
Du musst die Inputbox auslesen.

PHP Code:
While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
            
        case 
$Button1
            
            IniWrite
(@DesktopCommonDir&"\Teamspeak.ini""File2""Path2"
            
run(guictrlread($Input1form))
            if @
error Then
            MsgBox
(16"Error""File does not exists"5)
            endif
            
        
        
        case 
$Button2
            GUICtrlSetData
($Input1form,IniRead(@DesktopCommonDir&"\Teamspeak.ini""File2""Path2"""))
            if 
not FileExists(@DesktopCommonDir&"\Teamspeak.ini"Then
                msgbox
(16"Error""Cannot read Teamspeak.ini..."& @CRLF _
                
"May because there is no file to read..."5)
            endif
            
    
    EndSwitch
WEnd
EndFunc 
03/13/2011 19:45 Ludder231#3
Quote:
Originally Posted by SCORNI View Post
Du musst die Inputbox auslesen.

PHP Code:
While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
            
        case 
$Button1
            
            IniWrite
(@DesktopCommonDir&"\Teamspeak.ini""File2""Path2"
            
run(guictrlread($Input1form))
            if @
error Then
            MsgBox
(16"Error""File does not exists"5)
            endif
            
        
        
        case 
$Button2
            GUICtrlSetData
($Input1form,IniRead(@DesktopCommonDir&"\Teamspeak.ini""File2""Path2"""))
            if 
not FileExists(@DesktopCommonDir&"\Teamspeak.ini"Then
                msgbox
(16"Error""Cannot read Teamspeak.ini..."& @CRLF _
                
"May because there is no file to read..."5)
            endif
            
    
    EndSwitch
WEnd
EndFunc 
Ah danke! So sollte deins aussehen oder?
PHP Code:
IniWrite(@DesktopCommonDir&"\Teamspeak.ini""File2""Path2"GUICtrlRead($Input1form))
            
run(GUICtrlRead($Input1form))
            if @
error Then
            MsgBox
(16"Error""File does not exists"5)
            endif 
Naja habs mit deiner hilfe geschafft THX!