Hello Me You Posted October 17, 2006 Share Posted October 17, 2006 (edited) I've got a problem with the FileOpenDialog, when I click on the "Öffnen"-Button, nothing happens. This is the script: expandcollapse popup#include <GUIConstants.au3> GUICreate("Mein erstes Testprogramm", 400, 400) GUISetIcon(@SystemDir & "\calc.exe", 0) $menu1 = GuiCtrlCreateMenu("&Datei") $menu2 = GuiCtrlCreateMenu("B&earbeiten") $menu3 = GuiCtrlCreateMenu("Hilfe") $item1 = GUICtrlCreateMenuItem("Beenden", $menu1) $item2 = GUICtrlCreateMenuItem("Einfügen", $menu2) $item3 = GUICtrlCreateMenuItem("Info", $menu3) $item4 = GUICtrlCreateMenuItem("Öffnen", $menu1) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE then $answer = MsgBox(4096 + 36, "Programm wird beendet", "Möchten Sie das Programm wirklich beenden?") If $answer = 6 Then ExitLoop Endif If $answer = 7 Then Endif Endif If $msg = $item3 Then MsgBox(0,"Info", "Copyright 2006 by me") Endif If $msg = $item1 then $answer = MsgBox(4096 + 36, "Programm wird beendet", "Möchten Sie das Programm wirklich beenden?") If $answer = 6 Then ExitLoop EndIf If $answer = 7 Then EndIf If $msg = $item4 Then $file = FileOpenDialog("Wählen Sie die Datei...",@TempDir,"Alle (*.*)") If @error <> 1 Then GuiCtrlCreateMenuItem ($file,$recentfilesmenu) Endif Endif Wend Edited October 17, 2006 by Hello Me You Random Link to comment Share on other sites More sharing options...
Xenobiologist Posted October 17, 2006 Share Posted October 17, 2006 HI, check you If statements you never reach to item4. You'll see it better when using Select or switch statement instead of If the else. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Hello Me You Posted October 18, 2006 Author Share Posted October 18, 2006 HI,check you If statements you never reach to item4. You'll see it better when using Select or switch statement instead of If the else.So long,MegaThx! Now it's working. I'm just learning this language! Random 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