Code: Select all
;-- Example GUI with Buttons to Start URL/Program -----------
#warn
#NoEnv
name1=TEST
setworkingdir,%a_scriptdir%
Gui,2:default
Gui,2: -DPIScale
SS_REALSIZECONTROL := 0x40
transform,s,chr,127
WA:=A_screenwidth,HA:=A_screenheight,xx:=100
;Gui,2:Color,C8D0D4,Black ;-gray
Gui,2:Color,Black,Black
;- maybe change fontsize don't know which is the best font-size depending screen-size
;============ GUISIZEx DPIx 4Kx 3840*2160 is 100% ============
if (wa=3840)
Gui,2:Font,s12 cBlack,Lucida Console
;============ GUISIZEx DPIx FHD 1920*1080 is 100% ============
else if (wa=1920)
Gui,2:Font,s10 cBlack,Lucida Console
else
Gui,2:Font,s7 cBlack,Lucida Console
;=============================================================
;--------------------
cx:=""
ck:=""
sectx=
(Ltrim comments Join`r`n %
Autohotkey;https://www.autohotkey.com/
YT_Rotterdam2Amsterdam;https://www.youtube.com/watch?v=HfPCdJapIXA
YT_Offenbach_Barcarole;https://www.youtube.com/watch?v=R-MbbebSQjQ&t=91
NL_Rijkswaterstaat;https://www.youtube.com/channel/UCOESCgenMD6CMDiiHe-iG-g
NL_Archive_1;https://www.youtube.com/channel/UC3Xw6AMOJIiUJ0cNHB7CdIg
NL_Archive_2;https://basromeijnfilms.blogspot.com/
British_pathe;https://www.youtube.com/channel/UCGp4u0WHLsK8OAxnvwiTyhA
BBC_Archive;https://www.bbc.co.uk/archive/
LA_CAMERA_STYLO;https://www.youtube.com/channel/UCxT4JLBXafKV7dCafIceCUg/videos ;- Film collection
News_Portugal;https://news.google.com/topstories?hl=pt-PT&gl=PT&ceid=PT:pt-150
Weather_Portugal;https://www.timeanddate.com/weather/portugal/lisbon
Hurrican;https://www.accuweather.com/en/hurricane/tracker
Typhoon;https://www.metoc.navy.mil/jtwc/jtwc.html
Wind_Asia;https://earth.nullschool.net/#current/wind/surface/level/orthographic=123.04,23.45,1821/loc=124.879,13.692
Euronews;https://de.euronews.com/bulletin
Charmap;charmap
Modern_Times_1936;https://www.youtube.com/watch?v=2gLa4wAia9g ;- Full movie Charles Chaplin
)
;---------------------
loop,parse,sectx,`n,`r
{
x:=a_loopfield
if x=
break
stringsplit,k,x,`;
cx .= k1 . s
ck .= k2 . s
}
stringsplit,m,ck,%s%
stringsplit,q,cx,%s%
totx:=(q0-1)
x:=(wa*1)/xx,y:=(ha*2)/xx,w :=(wa*13 )/xx,h:=(ha*2.5)/xx,v:=(ha*.5)/xx
Gui,2:add,text,section x%x% y%y% w0 h0, ;- button position
i=0
Loop,%totx%
{
i++
if (i=10)
{
x:=(wa*15)/xx
Gui,2:add,text,section x%x% y%y% w0 h0, ;- new button position
}
BTName:= q%i%
Gui,2: Add, Button, xs y+%v% w%w% h%h% gStart1 v%btname%_%i% ,%btname%
}
x:=(wa*1)/xx,y:=(ha*1)/xx,w:=(wa*30)/xx,h:=(ha*30)/xx
Gui,2:Show, x%x% y%y% h%h% w%w%,%name1%
return
;-------------------------------------------------------------------------
2Guiclose:
exitapp
;-------------------------------------------------------------------------
;--------------- start --------------------------
start1:
gui,2:submit,nohide
Mousegetpos,,,,Ctrl ;- Button1
r:= a_guicontrol ;- vVar ( Buttonname )
stringtrimleft,ct,ctrl,6 ;- Button-(1)
url:= m%ct%
;msgbox, 262208, ,R=%r%`nCT=%ct%`nCTRL=%ctrl%`nURL=%url%
try
run,%url%
return
;=================== END SCRIPT =============================================