Sign in to follow this  
Followers 0
wander

GuiCtrlSetData not working

2 posts in this topic

Hi. Its me again. The problem now is that GuiCtrlSetData is not working.

Here is my script:

$SavePath = GUICtrlCreateInput("", 368, 368, 209, 21)
If FileExists ($ini) Then
GuiCtrlSetData($SavePath, $dir)
Else
EndIf   
$Browser = GUICtrlCreateButton("...", 608, 372, 35, 17, 0)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x00FFFF)
GUICtrlSetBkColor(-1, 0x1A1A1A)
GUICtrlSetCursor (-1, 0)
    Case $Browser
            $get = FileSelectFolder('Please select a directory', @DesktopDir, 5, GUICtrlRead($SavePath), $Form)
            If Not @error Then
                GUICtrlSetData($SavePath, $get)
                IniWrite($Ini, "Vitality Aion Directory", "Directory", GUICtrlRead($SavePath))

When i launch my app the data in $SavePath input is "1", can anyone tell me why's that?

Share this post


Link to post
Share on other sites



Ehm, that's a not functional extract only... Or did you mean something like

$SavePath = GUICtrlCreateInput(IniRead($Ini, "Vitality Aion Directory", "Directory", ""), 368, 368, 209, 21)

$Browser = GUICtrlCreateButton("...", 608, 372, 35, 17, 0)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x00FFFF)
GUICtrlSetBkColor(-1, 0x1A1A1A)
GUICtrlSetCursor (-1, 0)
    Case $Browser
            $get = FileSelectFolder('Please select a directory', @DesktopDir, 5, GUICtrlRead($SavePath), $Form)
            If Not @error Then
                GUICtrlSetData($SavePath, $get)
                IniWrite($Ini, "Vitality Aion Directory", "Directory", GUICtrlRead($SavePath))

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  
Followers 0