Wb-FreeKill 0 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"? Share this post Link to post Share on other sites
SlimShady 1 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 Share this post Link to post Share on other sites
Wb-FreeKill 0 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... Share this post Link to post Share on other sites
SlimShady 1 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 Share this post Link to post Share on other sites
Wb-FreeKill 0 Posted January 24, 2005 Works for me too, it was my own script that wont work... thx again for your help Share this post Link to post Share on other sites