QuickStart - A straightforward, customizable launcher

Post your working scripts, libraries and tools
User avatar
Hactar
Posts: 12
Joined: 23 Jul 2015, 20:59

QuickStart - A straightforward, customizable launcher

25 Jul 2015, 12:37

Note: Windows 10 introduced a new "gaming toolbar," opened with [Win] + [G]. If you want to use [Win] + [G] for your gaming bar, you can remap QuickStart. If you want to use [Win] + [Shift] + [G] for the gaming bar (like me) or some other hotkey... well, #+g::#g doesn't seem to work. Please reply if you manage to remap the gaming bar to something else!
Edit: Thanks to rommmcek for suggesting #+g::Send #g. It seems to work for bringing up the Windows 10 gaming bar. :)

In my early days with AutoHotkey, I spent time creating a GUI that I could open with [Win] + [G] with lots of buttons and the occasional dropdown menu to open all of my programs. But I've found that sometimes, typing is just faster than using a mouse. So I created QuickStart, a modular system that opens a very basic interface, simply a one-line edit control and button, and can be easily programmed to do anything, from opening a file or running a Steam game to copying something to the clipboard and triggering other AHK subroutines and functions. This thing must've saved me hours of my time, simply from little ten-second increments. Take this example:

Starting a Steam game without QuickStart:
1. Open Steam (For me it is usually running in the background, but the window isn't open)
2. Find the game in my Steam library (Categories help for organization, but it's still a lot of clicks)
3. Double-click the game

Starting a Steam game with QuickStart:
1. [Win] + [G] (customizable hotkey)
2. Type a quick, usually 2-3 letter abbreviation for the game and hit [Enter]

It may not sound great, but it's a whole lot faster to start a program with one keystroke than search for it in the start menu, or to navigate to any drive on your computer by simply typing that letter into a small box.

QuickStart is one of those scripts that doesn't really do a whole lot unless it's modified and maintained to fit the user's needs, but I've added in some basics to get you started and get the hang of the syntax (which is very straightforward; I mean, this is AutoHotkey we're talking about).

Like most of my other scripts, this one is split into two parts so that it can be easily integrated into an existing "main script" you may have. If QuickStart is the only script you would like to use, put both files into a folder with the following script:

Code: [Select all] [Expand] [Download] (Main Script.ahk)GeSHi © Codebox Plus



Okay, now onto the actual code!


QuickStartDef.ahk (#Include before auto-execute section)

Code: [Select all] [Expand] [Download] (QuickStartDef.ahk)GeSHi © Codebox Plus


QuickStart.ahk (#Include after auto-execute section)

Code: [Select all] [Expand] [Download] (QuickStart.ahk)GeSHi © Codebox Plus



Changelog
Last edited by Hactar on 30 May 2016, 06:42, edited 4 times in total.
rommmcek
Posts: 355
Joined: 15 Aug 2014, 15:18

Re: QuickStart - A straightforward, customizable launcher

12 Mar 2016, 23:03

If you want to use [Win] + [Shift] + [G] for the gaming bar (like me) or some other hotkey... well, #+g::#g doesn't seem to work.

Try: #+g::Send, #g
toomeny
Posts: 2
Joined: 29 May 2016, 01:59

Re: QuickStart - A straightforward, customizable launcher

29 May 2016, 05:44

I haven't been using AutoHotkey for long, but this script is already a life saver.

However the following shortcut in QuickStartDef.ahk doesn't work for me.

Code: [Select all] [Download] GeSHi © Codebox Plus


{ ; AutoHotkey

QuickStart.qcount := Func( "QS_Count" )

}



I have only a basic understanding of the AHK language, but I can't find the "QS_Count" function in any of the codes, what is this used for?

Thank you for the great launcher, I'm collecting all my AHK scripts around this code as a foundation and so far it's worked wonders.
User avatar
Hactar
Posts: 12
Joined: 23 Jul 2015, 20:59

Re: QuickStart - A straightforward, customizable launcher

30 May 2016, 06:41

toomeny wrote:I haven't been using AutoHotkey for long, but this script is already a life saver.

However the following shortcut in QuickStartDef.ahk doesn't work for me.

Code: [Select all] [Download] GeSHi © Codebox Plus


{ ; AutoHotkey

QuickStart.qcount := Func( "QS_Count" )

}



I have only a basic understanding of the AHK language, but I can't find the "QS_Count" function in any of the codes, what is this used for?

Thank you for the great launcher, I'm collecting all my AHK scripts around this code as a foundation and so far it's worked wonders.


Hm, that's odd. That line isn't in my own script, and I can only guess at what it does...
(I'll remove it from the OP.)

Thank you; I appreciate your appreciation. ;)
av930
Posts: 24
Joined: 24 Dec 2017, 10:21

Re: QuickStart - A straightforward, customizable launcher

06 Jan 2018, 00:48

Hello. Hactar.
I'd like to use your QuickStart script for general use.
it fits for me, I think.
but It not working. How I can use it?
when I run it and to launch explorer d-drive, I push #G, d, enter.
Nothing happened....
Is this script have GUI, it also doesn't show up.

OS: windows 10

Please how I can test if this program is working correctly?
I am newbie to AHK.
please...
HactarCE

Re: QuickStart - A straightforward, customizable launcher

06 Jan 2018, 09:56

av930 wrote:Hello. Hactar.
I'd like to use your QuickStart script for general use.
it fits for me, I think.
but It not working. How I can use it?
when I run it and to launch explorer d-drive, I push #G, d, enter.
Nothing happened....
Is this script have GUI, it also doesn't show up.

OS: windows 10

Please how I can test if this program is working correctly?
I am newbie to AHK.
please...


It's probably interfering with the Windows gaming bar. Try changing to something like (Win+Space is what I've been using).
av930
Posts: 24
Joined: 24 Dec 2017, 10:21

Re: QuickStart - A straightforward, customizable launcher

14 Jan 2018, 09:19

Hactar. I also have a question below code.

I added a condition and object that only work specific program.
In addition, I divided into 2 file, QuickStart_forAndroidStudio.ahk and QuickStart_defaultSystem,ahk
but it is a bit ugly, I'd like know about smart way do this, such as "runtime object loading conditionly" or "load static time and runtime change the object conditionaly"
please help me.



#q::
Gui, Destroy
Gui, Font, s11, Consolas
Gui, Add, Edit, x5 y5 w200 h25 vQuickStartQuery, %LastQSQuery%
Gui, Add, Button, x210 y5 w25 h25 +Default gQuickStartGo,
Gui, Show, w240 h35, QuickStart v2
Gui, Font
Return
; #+g::#g ; "Gamer bar" Win10 compatibility attempt doesn't work :(

QuickStartGo:
Gui, Submit
Gui, Destroy


;;Specific program purpose
;;Msgbox, % AndroidStudio[QuickStartQuery]
IfWinActive, ahk_exe studio64.exe
{
If ( AndroidStudio[QuickStartQuery] ) {
If AndroidStudio[QuickStartQuery] is alnum {
;;Send % AndroidStudio[QuickStartQuery]
Exec( AndroidStudio[QuickStartQuery] )

}
Else { ;;;; function matched
AndroidStudio[QuickStartQuery].Call()
}
LastQSQuery := QuickStartQuery
return
}
}


;;General purpose
;;Msgbox, % QuickStart[QuickStartQuery]
If ( QuickStart[QuickStartQuery] ) { ;;;; just run command ex:path, program, url
If QuickStart[QuickStartQuery] is alnum {
;;Send % QuickStart[QuickStartQuery]
;;cmd := QuickStart[QuickStartQuery]
Exec( QuickStart[QuickStartQuery] )
}
Else { ;;;; function matched
QuickStart[QuickStartQuery].Call()
}
LastQSQuery := QuickStartQuery
}
Else{ ;;;; nothing matched
SoundPlay *-1
}

Return
av930
Posts: 24
Joined: 24 Dec 2017, 10:21

Re: QuickStart - A straightforward, customizable launcher

14 Jan 2018, 09:22

Posting is failed, therefore I rewrite again.---

Hactor I found the issue.
when i open QuickStart file from Notepad++, line number 6, there is ending →
Gui, Add, Button, x210 y5 w25 h25 +Default gQuickStartGo, →
this character makes issue. please refer it.


#g::
Gui, Destroy
Gui, Font, s11, Consolas
Gui, Add, Edit, x5 y5 w200 h25 vQuickStartQuery, %LastQSQuery%
Gui, Add, Button, x210 y5 w25 h25 +Default gQuickStartGo, →
Gui, Show, w240 h35, QuickStart v2
Gui, Font
Return
av930
Posts: 24
Joined: 24 Dec 2017, 10:21

Re: QuickStart - A straightforward, customizable launcher

15 Jan 2018, 23:44

Code: [Select all] [Download] (Untitled.ahk)GeSHi © Codebox Plus

RunAction( Menu, Sleep, Key ) {
;;MsgBox, %Menu%, %Sleep%, %Key%
SendInput, %Menu%

WinWaitActive, ahk_class SunAwtDialog ahk_exe studio64.exe
Sleep %Sleep%
SendInput, {delete}%Key%
WinWaitClose, ahk_class SunAwtDialog ahk_exe studio64.exe
}


I change your code to a fuction "RunAction".
and put some sleep as 2nd parameter "Sleep", because there are a popups launched a bit delayed.
Even though it still ignore starting character. when I put text "Keymap", the popup only receive only "eymap".
I guess there is no good way anymore...

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 15 guests