Frontend for scripts

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Jekko

Frontend for scripts

13 Nov 2017, 03:59

Hello,

i apologize if i seem somehow lazy, i am nearly sure that someone has already made that but a Google search hasn't provided any result.

Is there a script that work as a frontend for launching other scripts?

for example i have three scripts
-LaunchNotepad.ahk
-MakeCoffee.ahk
-GoToWorkForMe.ahk

i would like to have a clickable GUI where i click to launch one of these script like this:

Launch Notepad
Make a Coffee
Go To Work For Me

If there isn't nothing ready to use, i'll roll up my sleeves and at code completed i will share.
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Frontend for scripts

13 Nov 2017, 04:39

Code: Select all

Gui, Add, DDL, x10 y10 w180 h22 vMyScript gRunScript, Launch Notepad||Make a Coffee|Go To Work For Me
Gui, Show, w200 h42, Lazy Guys Script Launcher
Return

RunScript:
   Gui, Submit, Destroy
   Run, % A_ScriptDir . "\" MyScript . ".ahk"
   Return
Not Tested. Scripts have to be named the way they are displayed in the dropdownlist eg "Go To Work For Me.ahk"
Click at a command within the code section for further details!
Jekko

Re: Frontend for scripts

13 Nov 2017, 05:27

Thank you very much!

I have tested it and seems to work!

I have only this little problem:
When i select my script, the frontend should terminate, instead it stay on (i see the icon)

I tried to modify the code like that but no luck

Code: Select all

Gui, Add, DDL, x10 y10 w180 h22 vMyScript gRunScript, launch notepad||Make a Coffee|Go To Work For Me
Gui, Show, w200 h42, Lazy Guys Script Launcher
Return

RunScript:
   Gui, Submit, Destroy
   Run, % A_ScriptDir . "\" MyScript . ".ahk"
   Return
ExitApp
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Frontend for scripts

13 Nov 2017, 05:44

Gui, Submit [, NoHide]

Saves the contents of each control to its associated variable (if any) and hides the window unless the NoHide option is present. For controls that produce multiple fields of output, such as a multi-select ListBox, the output uses the window's current delimiter. If the window does not exist -- perhaps due to having been destroyed via Gui Destroy -- this command has no effect.
Jekko

Re: Frontend for scripts

14 Nov 2017, 03:51

i resolved in this way, now it works like a charm. Thank you very much

Code: Select all

Gui, Add, DDL, x10 y10 w180 h22 vMyScript gRunScript, launch notepad||Make a Coffee|Go To Work For Me
Gui, Show, w200 h42, Lazy Guys Script Launcher
Return

RunScript:
   Gui, Submit, Destroy
   Run, % A_ScriptDir . "\" MyScript . ".ahk"
   ExitApp
   Return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Araphen, Google [Bot], mcd, rubeusmalfoy, ShatterCoder and 97 guests