Wb-FreeKill Posted January 24, 2005 Share Posted January 24, 2005 $savelocation = GUICtrlCreateInput(@HomeDrive & "\Log.log", 130, 400, 250, 20, $WS_DISABLED) $dialog = FileSaveDialog( "Choose a name", @HomeDrive & "\", "all files (*.*)", 3, "Log.log") GUICtrlSetData($savelocation, $dialog) When i press cancel, it writes 1 in the Inputbox, how can i make it write "@Homedrive & "\Log.log"? Link to comment Share on other sites More sharing options...
SlimShady Posted January 24, 2005 Share Posted January 24, 2005 $savelocation = GUICtrlCreateInput(@HomeDrive & "\Log.log", 130, 400, 250, 20, $WS_DISABLED) $dialog = FileSaveDialog( "Choose a name", @HomeDrive & "\", "all files (*.*)", 3, "Log.log") If @error Then GUICtrlSetData($savelocation, @Homedrive & "\Log.log") Else GUICtrlSetData($savelocation, $dialog) EndIf Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted January 24, 2005 Author Share Posted January 24, 2005 $savelocation = GUICtrlCreateInput(@HomeDrive & "\Log.log", 130, 400, 250, 20, $WS_DISABLED) $dialog = FileSaveDialog( "Choose a name", @HomeDrive & "\", "all files (*.*)", 3, "Log.log") If @error Then GUICtrlSetData($savelocation, @Homedrive & "\Log.log") Else GUICtrlSetData($savelocation, $dialog) EndIf<{POST_SNAPBACK}>Thx, played a bit with it, but it didn't seem to work for me... Link to comment Share on other sites More sharing options...
SlimShady Posted January 24, 2005 Share Posted January 24, 2005 This works for me: expandcollapse popup#include <GUIConstants.au3> AutoItSetOption("TrayIconDebug", 1) ;Initialize variables Global $style1 Global $IniFile Global $GUIWidth Global $GUIHeight $GUIWidth = 250 $GUIHeight = 250 $IniFile = StringTrimRight(@ScriptFullPath, 3) & "ini" ;Only a close button: ;$style1 = BitOR($WS_POPUP, $WS_CAPTION, $WS_SYSMENU) ;GUICreate("New GUI", $GUIWidth, $GUIHeight, -1, -1, $style1) GUICreate("New GUI", $GUIWidth, $GUIHeight) $savelocation = GUICtrlCreateInput("", 10, 40, 250, 20, $WS_DISABLED) GUISetState(@SW_SHOW) $dialog = FileSaveDialog( "Choose a name", @HomeDrive & "\", "all files (*.*)", 3, "Log.log") If @error Then GUICtrlSetData($savelocation, @Homedrive & "\Log.log") Else GUICtrlSetData($savelocation, $dialog) EndIf While 1 Sleep(25) $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE GUIDelete() Exit ;Case $msg = ... EndSelect WEnd Link to comment Share on other sites More sharing options...
Wb-FreeKill Posted January 24, 2005 Author Share Posted January 24, 2005 Works for me too, it was my own script that wont work... thx again for your help 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