Gui with Hyperlinks to F1-F10 buttons

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Totte
Posts: 5
Joined: 09 Jun 2023, 03:47

Gui with Hyperlinks to F1-F10 buttons

Post by Totte » 10 Jun 2023, 15:52

Is it possible to make a GUI always on top on the screen, with hypelinks to F1-F10, with description for the buttons?
I want to click with my mouse on the hyperlink insted of click F1-F10 buttons on my keyboard.
Ex:
F1 =notepad
F2 =Chrome
F3 =Word
and so on...

Hope you can help me...

Best reguard Tony

User avatar
mikeyww
Posts: 26883
Joined: 09 Sep 2014, 18:38

Re: Gui with Hyperlinks to F1-F10 buttons

Post by mikeyww » 10 Jun 2023, 19:55

Code: Select all

#Requires AutoHotkey v1.1.33
Gui +AlwaysOnTop
Gui Font, s10
Gui Add, Button, w230 gGo, F1 = Notepad
Gui Show, x900 y200, Buttons

F1::Run notepad

Go:
RegExMatch(A_GuiControl, "F\d+", m)
Gosub % m
Return

Totte
Posts: 5
Joined: 09 Jun 2023, 03:47

Re: Gui with Hyperlinks to F1-F10 buttons

Post by Totte » 11 Jun 2023, 02:03

Thank you very mutch!

You helped me with random before,
And random.ahk is already open and i use F5 for make random sentence.
when i press F5 on keyboard it make random sentence, is it possible to make a hyperlink and just click "F5 = Random Sentens" the hyperlink to make the random sentece in this Gui?

Best reguards Tony

User avatar
mikeyww
Posts: 26883
Joined: 09 Sep 2014, 18:38

Re: Gui with Hyperlinks to F1-F10 buttons

Post by mikeyww » 11 Jun 2023, 06:17

Code: Select all

#Requires AutoHotkey v1.1.33
Gui +AlwaysOnTop
Gui Font, s10
Gui Add, Button, w230 gGo, F5 = Random sentence
Show:
Gui Show, x900 y200, Buttons
Return

Go:
RegExMatch(A_GuiControl, "F\d+", fkey)
Gui Submit
Sleep 50
Send % "{" fkey "}"
Gosub Show
Return
You can also combine your scripts to ease your script management.

Totte
Posts: 5
Joined: 09 Jun 2023, 03:47

Re: Gui with Hyperlinks to F1-F10 buttons

Post by Totte » 11 Jun 2023, 06:58

Thank you very mutch :)

Post Reply

Return to “Ask for Help (v1)”