Jump to content
Sign in to follow this  

FileSaveDialog problem

Recommended Posts

If i forexample name the file "myfile", the data it would set for my inputbox(FileDes) be "MyFile", but how can i in the best way secure that the exstetions allways would be .exe, whatever you writes it in the filename or not?

While 1
    $msg = Guigetmsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop

    If $msg = $DesBrowse Then 
        $SavsAs = FileSaveDialog("", @Scriptdir, "Executable files (*.exe;*.exe)", 3)
        If NOT @error Then
            GUICtrlSetData($FileDes, $SavsAs)


Share this post

Link to post
Share on other sites

here's a try for ya

#include <GUIConstants.au3>
Dim $GUIWidth, $GUIHeight

$GUIWidth = @DesktopWidth /2
$GUIHeight = @DesktopHeight /2

$My_win = GUICreate("*My GUI Window",$GUIWidth, $GUIHeight,-1,-1,-1,-1)
GUICtrlCreateLabel("Simply...  try to edit this box below ", 10, 7, 600, 30)
GUICtrlSetFont(-1, 14, 10)

$Edit_1 = GUICtrlCreateEdit("Hey, "  & @CRLF  & @CRLF & "try to change this" & @CRLF & @CRLF & "Enjoy!", 10, 40, 480, 300)
$_OK = GUICtrlCreateButton("OK", 210, 350, 70, 25)
GUISetState(@SW_SHOW,$My_win)     ; will display the dialog box

while 1
     $Msg = GuiGetMsg()  
     If $Msg = $GUI_EVENT_CLOSE then Exit
     If $Msg= $_OK then Exit

good luck


Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...