Hi,
I have few ahk script So i was wondering is it possible to have a GUI That have All buttons that can run the scripts. Do we have any templates for that.
Gui help Topic is solved
Re: Gui help Topic is solved
Code: Select all
dir = %A_ScriptDir%
Gui, Font, s10
Loop, Files, %dir%\*.ahk
Gui, Add, Button, w350 gRunScript, % RegExReplace(A_LoopFileName, "\.ahk$")
Gosub, F3
F3::Gui, Show,, Run scripts (F3 = Show again)
RunScript:
Run, %dir%\%A_GuiControl%.ahk
GuiEscape:
GuiClose:
Gui, Hide
Return
Re: Gui help
Thank you That works. can you please tell me how to change color of button i could not find it in documentation. Also Button position.
Re: Gui help
Positioning and Sizing of Controls
As far as I know, there is not a direct option to change the color, but the forum contains a few different scripts to customize buttons. An alternative is simulating a button by using a transparent text control over a progress bar.
viewtopic.php?f=6&t=1103
As far as I know, there is not a direct option to change the color, but the forum contains a few different scripts to customize buttons. An alternative is simulating a button by using a transparent text control over a progress bar.
viewtopic.php?f=6&t=1103
Re: Gui help
@mikeyww example as you mentioned , color buttons
Code: Select all
;-------- saved at 星期六 五月 2022-05-14 18:22 UTC --------------
;- Gui help / mikeyww
;- https://www.autohotkey.com/boards/viewtopic.php?f=76&t=104039
i:=0
dir = %A_ScriptDir%
Gui,2: Font, s12 cBlack,Lucida Console
Loop, Files, %dir%\*.ahk
{
i++
Md:=mod(i,2)
if md=0
colbgr:="red",coltxt:="white"
else
colbgr:="yellow",coltxt:="black"
Gui,2:Add,Progress, w550 Disabled Background%colbgr% ;- TITLE Button-backgroundcolor
Gui,2:Add,Text, xp yp wp hp c%coltxt% BackgroundTrans Center 0x200 gRunscript ,% RegExReplace(A_LoopFileName, "\.ahk$")
}
Gui,2:show
return
;----------
2Guiclose:
Exitapp
;-----------
RunScript:
Run, %dir%\%A_GuiControl%.ahk
return
;=================================