On the code snippet below, When I first click on "current profile", then hit cancel, I get a little comma added to the text. I'd like the little comma to go away...
Code:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
euserprofile=c:\
Gui, Add, Text, vchosen_profile x125 y242 w380 h20 ,%euserprofile%
Gui, Add, Button, gchoose_profile x18 y238 w100 h20, Current Profile ->
Gui, Show, xCenter yCenter h365 w472, UserBackup
Return
choose_profile:
temp_euserprofile:=euserprofile
FileSelectFolder, euserprofile, *%A_homedrive%, 3,Select Source Folder
if errorlevel
{
euserprofile:=temp_euserprofile
}
temp_userprofile=
GuiControl,, chosen_profile, , %euserprofile%
; getsourcefolder(euserprofile)
Return