Arterie Posted September 28, 2007 Share Posted September 28, 2007 (edited) Problem is the gui closes immediately Here's my code: expandcollapse popup#include <GuiConstants.au3> #include <Process.au3> If RegRead("HKEY_CURRENT_USER\Software\texturemaker", "steamdir") = "" Then RegWrite("HKEY_CURRENT_USER\Software\texturemaker", "steamdir", "REG_SZ", "C:\Programme\Steam\SteamApps\Arterie") EndIf If RegRead("HKEY_CURRENT_USER\Software\texturemaker", "picdir") = "" Then RegWrite("HKEY_CURRENT_USER\Software\texturemaker", "picdir", "REG_SZ", "C:\Dokumente und Einstellungen\Arterie\Eigene Dateien\Eigene Bilder\textur.tga") EndIf $picdir = RegRead("HKEY_CURRENT_USER\Software\texturemaker", "picdir") $steamdir = RegRead("HKEY_CURRENT_USER\Software\texturemaker", "steamdir") $game = "Counter-Strike: Source" GUICreate("Arterie's Texture maker", 500, 290) GUICtrlCreateGroup("Steamdirection", 5, 5, 490, 35, 0x2000) $labelsteam = GUICtrlCreateLabel($steamdir, 10, 18, 400, 18) $setsteamdir = GUICtrlCreateButton("Set Steamdir", 410, 15, 80, 20) GUICtrlSetTip($setsteamdir, "Until you reached accountname") GUICtrlSetTip($labelsteam, $steamdir) GUICtrlCreateGroup("Picturedirection", 5, 45, 490, 35) $labelpic = GUICtrlCreateLabel($picdir, 10, 58, 400, 18) $setpicdir = GUICtrlCreateButton("Set picturedir", 410, 55, 80, 20) GUICtrlSetTip($labelpic, $picdir) GUICtrlSetTip($setpicdir, "Format: *.tga;Readem for detailed help.") GUICtrlCreateGroup("Game", 5, 85, 490, 70) $listgame = GUICtrlCreateList("Counter-Strike: Source", 10, 100, 200, 55) $item2 = GUICtrlSetData($listgame, "Half-Life 2: Dm") $item3 = GUICtrlSetData($listgame, "DoD: Source") GUICtrlCreateGroup("Vmf file", 5, 160, 370, 125) $listvmf = GUICtrlCreateList("LightmappedGeneric", 10, 178, 150, 100) $picinput = GUICtrlCreateInput("Has to be the same as the name of the picture", 165, 196, 200, 18) GUICtrlCreateLabel("The name of the *.vmf file:", 165, 178, 150, 18) $create = GUICtrlCreateButton("Create Texture", 380, 160, 115, 20) $readme = GUICtrlCreateButton("Readme", 380, 185, 115, 20) $exit = GUICtrlCreateButton("Exit", 380, 265, 115, 20) GUISetState() While 1 Sleep(10) $msg = GUIGetMsg() $game = GUICtrlRead($listgame) $vmffile = GUICtrlRead($listvmf) $name = GUICtrlRead($picinput) Select Case $msg = $setsteamdir $steamdir1 = FileSelectFolder("Select accountname", "C:\") If $steamdir1 = "" Then MsgBox(64, "Select accountname", "No new direction set") Else $steamdir = $steamdir1 GUICtrlSetTip($labelsteam, $steamdir) RegWrite("HKEY_CURRENT_USER\Software\texturemaker", "steamdir", "REG_SZ", $steamdir) EndIf Case $msg = $setpicdir $picdir1 = FileOpenDialog("Choose picture", "C:\", "Truevision Targa (*.tga)") If $picdir1 = "" Then MsgBox(64, "Choose picture", "No picture set") Else $picdir = $picdir1 GUICtrlSetTip($labelpic, $picdir) RegWrite("HKEY_CURRENT_USER\Software\texturemaker", "picdir", "REG_SZ", $picdir) EndIf Case $msg = $readme If FileExists("readme.txt") Then FileOpen("readme.txt") Else MsgBox(48, "Readme", "No readme in scriptdirection.Please look at www.avmapping.de.vu for downloading" & @CRLF & "the file.") EndIf Case $msg = $GUI_EVENT_CLOSE Or $exit GUIDelete() Exit EndSelect WEnd (Why doesn't the autoit tags work?) Edited September 28, 2007 by Arterie Link to comment Share on other sites More sharing options...
GaryFrost Posted September 28, 2007 Share Posted September 28, 2007 (edited) you have a wend, where is your while?look at the following line closelyCase $msg = $GUI_EVENT_CLOSE Or $exit Edited September 28, 2007 by GaryFrost 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 More sharing options...
Zedna Posted September 28, 2007 Share Posted September 28, 2007 Case $msg = $GUI_EVENT_CLOSE Or $msg = $exit Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Arterie Posted September 28, 2007 Author Share Posted September 28, 2007 (edited) @ Zedana now there occures an error. complaining about trhis line Edited September 28, 2007 by Arterie Link to comment Share on other sites More sharing options...
GaryFrost Posted September 28, 2007 Share Posted September 28, 2007 Under the guisetstate()yep, after you edited your post 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 More sharing options...
Arterie Posted September 28, 2007 Author Share Posted September 28, 2007 (edited) Sry my fault....wrote something wrong ..thx Edited September 28, 2007 by Arterie Link to comment Share on other sites More sharing options...
Zedna Posted September 28, 2007 Share Posted September 28, 2007 @ Zedana now there occures an error. complaining about trhis linePlace my line into your code instead of your wrongCase $msg = $GUI_EVENT_CLOSE Or $exitand your GUI will work OK. Resources UDF ResourcesEx UDF AutoIt Forum Search 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