Jump to content
Sign in to follow this  
Wb-FreeKill

FileSaveDialog problem

Recommended Posts

Wb-FreeKill

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)
        EndIf
    EndIf

WEnd

Share this post


Link to post
Share on other sites
Wb-FreeKill

And, how do i make the Inputbox "disabled" not ES_READONLY, so u can't input, and you can't set the curser in it..?

Share this post


Link to post
Share on other sites
Valuater

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)
GUICtrlSetState($Edit_1,$GUI_DISABLE)
$_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
    
WEnd

good luck


NEWHeader1.png

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.