DonationCoder.com Software > Post New Requests Here
Another Little modification to menuak.ahk
(1/1)
Contro:
I would like to assign a light color definable to each launch option...
:-[
This is the initial code. Produces options in grey. Perhaps is needed a third option to select background color :
1. Button Title
2. Program to run
3. Color for background selection....
--- Code: Autohotkey ---#NoEnvIniRead, numRows, launcher.ini, General, numRows, 0IniRead, numCols, launcher.ini, General, numCols, 0if !numRows InputBox, numRows, , Enter number of rows , , 200, 120, , , , , 5if !numCols InputBox, numCols, , Enter number of columns, , 200, 120, , , , , 2IniWrite, %numRows%, launcher.ini, General, numRowsIniWrite, %numCols%, launcher.ini, General, numCols Loop % numRows*numCols{ IniRead, Title%A_Index%, launcher.ini, Titles, Title%A_Index%, %A_Index% IniRead, Path%A_Index%, launcher.ini, Paths, Path%A_Index%,} Gui, Add, Button, w150 r1.5 gRun vButt1, %Title1%Gui, Add, Button, w40 hp xp+150 gEdit vEdit1, EditEdit1:=1Butt1:=1 Loop % numRows*numCols-1{ Index:=A_Index+1 Title:=Title%Index% ys:=!Mod(Index-1, numRows) ? "ys" : "xp-150 yp+35" Gui, Add, Button, w150 hp %ys% gRun vButt%Index%, %Title% Gui, Add, Button, w40 hp xp+150 gEdit vEdit%Index%, Edit Edit%Index%:=Index Butt%Index%:=Index} Gui, Show, , Menu expedientes Gui 2:+ownerGui 2:Add, Text, right, Button title:Gui 2:Add, Text, right, Program to run:Gui 2:Add, Edit, w300 ys vSelTitleGui 2:Add, Edit, w300 vSelPathGui 2:Add, Button, w25 gFileSelect vFileSelect r0.9 xp+300 yp, ....Gui 2:Add, Button, w100 gSelOk r1.5 xp-250 yp+35 default, OK return Run: tpp:= % "Path" %A_GuiControl% Run % %tpp%return Edit: Gui +Disabled cIndex:=%A_GuiControl% GuiControl, 2:, SelTitle, % Title%cIndex% GuiControl, 2:, SelPath, % Path%cIndex% FileSelect:=cIndex Gui 2:Show, , Select options for button ?%cIndex%return FileSelect: Gui +OwnDialogs FileSelectFile, Path%cIndex%, 3, %A_ProgramFiles%, Select program to run with button ?%cIndex%, Programs(*.exe;*.lnk;*.bat) GuiControl, 2:, SelPath, % Path%cIndex%return GuiClose:ExitApp 2GuiClose: Gui 1:-Disabled Gui 2:Cancelreturn SelOk: Gui 1:-Disabled Gui 2:Submit Path%cIndex%:=SelPath Title%cIndex%:=SelTitle GuiControl, 1:, Butt%cIndex%, % Title%cIndex% IniWrite, % Title%cIndex%, launcher.ini, Titles, Title%cIndex% IniWrite, % Path%cIndex%, launcher.ini, Paths, Path%cIndex%return
Navigation
[0] Message Index
Go to full version