22#AutoIt3Wrapper_Icon= Resources\AltLauncher.ico
33#AutoIt3Wrapper_Outfile= Build\AltLauncher.exe
44#AutoIt3Wrapper_UseX64= n
5- #AutoIt3Wrapper_Res_Fileversion= 0.2.0.2
5+ #AutoIt3Wrapper_Res_Fileversion= 0.2.0.3
66#AutoIt3Wrapper_Res_Fileversion_AutoIncrement= p
77#AutoIt3Wrapper_Res_Language= 1033
88#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
@@ -109,8 +109,12 @@ Func GuiInit()
109109 Local $hGUI = GUICreate (" AltLauncher" , $iWinW , $iWinH , - 1 , - 1 , $WS_SYSMENU )
110110 GUISetOnEvent ($GUI_EVENT_CLOSE , " _CloseGUI" )
111111 Local $iX = $iSpacing , $iY = $iSpacing
112- For $i = 1 To $iTotal
113- Local $sLabel = $aFolders [$i ]
112+ For $i = 1 To $iTotal + 1
113+ If $i < = $iTotal Then
114+ Local $sLabel = $aFolders [$i ]
115+ Else
116+ Local $sLabel = " +"
117+ EndIf
114118 Local $iStyle = ($sLabel = $Profile ) ? BitOR ($WS_BORDER , $WS_TABSTOP ) : $WS_TABSTOP
115119 Local $hBtn = GUICtrlCreateButton ($sLabel , $iX , $iY , $iBtnW , $iBtnH , $iStyle )
116120 If GUICtrlSetOnEvent ($hBtn , " _ButtonClick" ) = 0 Then
@@ -131,6 +135,17 @@ Func _ButtonClick()
131135 GUISetState (@SW_HIDE )
132136 $Profile = GUICtrlRead (@GUI_CtrlId )
133137 $Profile_Set = True
138+ If $Profile = " +" Then
139+ Do
140+ $ChosenName = InputBox ($Title , " Please enter a new profile name." )
141+ if @error then
142+ $Profile_Set = False
143+ GUISetState (@SW_SHOW )
144+ EndIf
145+ Until FileExists ($ProfilesPath & ' \' & $ChosenName ) = False OR $Profile_Set = False
146+ DirCreate ($ProfilesPath & ' \' & $ChosenName )
147+ $Profile = $ChosenName
148+ EndIf
134149EndFunc ; ==>_ButtonClick
135150Func CreateProfileFolderIfEmpty()
136151 DirCreate ($ProfilesPath & ' \' & $Profile & ' \' & $ProfilesSubPath & ' \' & $Name )
0 commit comments