This repository has been archived by the owner on Sep 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PurrLauncher.ahk
69 lines (50 loc) · 1.51 KB
/
PurrLauncher.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#Requires AutoHotkey v2.0
#NoTrayIcon
;@Ahk2Exe-Set FileVersion, 1.0
;@Ahk2Exe-Set ProductVersion, 1.0.0.0
;@Ahk2Exe-Set CompanyName, Pikakid98
IniWrite "", A_Temp "\Purr.ini", "launch", "Game"
MyGui := Gui()
; call dark mode for window title + menu
SetWindowAttribute(MyGui)
; call dark mode for controls
SetWindowTheme(MyGui)
;Requires DarkMode for AutoHotkey v2
#include .Cmpl8r\DarkMode.scriptlet
MyGui.Title := "PurrCatory Archive"
myGui.OnEvent("Close", myGui_Close)
myGui_Close(thisGui) {
FileDelete A_Temp "\Purr.ini"
ExitApp
}
MyGui.Add("Text", "x140" , "Select a version")
MyGui.Add("Text", "x5" , "")
MyRadio := MyGui.AddRadio("vMyRadioGroup cwhite", "Demo Build`n Contains unique test levels that aren't in the alpha build")
MyRadio.OnEvent("Click", MyBtn_op1)
MyRadio2 := MyGui.AddRadio("vMyRadioGroup2 cwhite", "Alpha v0.3a`n An incomplete version of the full game")
MyRadio2.OnEvent("Click", MyBtn_op2)
MyGui.Add("Text",, "")
MyBtn := MyGui.AddButton("Default x130 w80", "OK")
MyBtn.OnEvent("Click", MyBtn_Click)
MyBtn_op1(*)
{
IniWrite "Demo\PurrCatory__Demo_Build_.exe", A_Temp "\Purr.ini", "launch", "Game"
}
MyBtn_op2(*)
{
IniWrite "Alpha\PurrCatory.exe", A_Temp "\Purr.ini", "launch", "Game"
}
MyBtn_Click(*) {
Value := IniRead(A_Temp "\Purr.ini", "launch", "Game")
if Value := IniRead(A_Temp "\Purr.ini", "launch", "Game", "")
{
MyGui.Hide()
RunWait "Data\" Value
MyGui.Show()
} else {
MyGui.Hide()
MsgBox "Error! Please select a game", "Error!"
MyGui.Show()
}
}
MyGui.Show("w350")