-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathv2_one-liner-simple.ahk
25 lines (25 loc) · 1.16 KB
/
v2_one-liner-simple.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
; sometimes you just one run command. It's also a good way to practice AHK
SetTitleMatchMode 2
#SingleInstance Force
#Requires AutoHotkey v2.0
;
myvar := InputBox("enter ahk command") ; run "explorer.exe"
; Don't forget to change the file path to your own
FileAppend("SetTitleMatchMode 2`n","C:\Users\front\Desktop\AHKv2\one-liners\99.ahk")
FileAppend("#SingleInstance Force`n","C:\Users\front\Desktop\AHKv2\one-liners\99.ahk")
FileAppend("#Requires AutoHotkey v2.0`n","C:\Users\front\Desktop\AHKv2\one-liners\99.ahk")
FileAppend(myvar.value,"C:\Users\front\Desktop\AHKv2\one-liners\99.ahk")
FileAppend("`n","C:\Users\front\Desktop\AHKv2\one-liners\99.ahk")
FileAppend("Exitapp`n","C:\Users\front\Desktop\AHKv2\one-liners\99.ahk")
ExitApp
; This script can't run the one liner because it has to close first
; Most autohotkey users have a main script where they keep their
; hotkeys, add a hotkey combination such as this one:
/*
; Tic mark next to the top row number 1 and 1 at the same time
` & 1:: ; run the one-liner
{
run "C:\Users\front\Desktop\AHKv2\one-liners\99.ahk"
}
*/
; This simple version needs 99.ahk deleted after you run it each time