-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwindows_boottleXCP-flatwrapper.ahk1
93 lines (66 loc) · 1.66 KB
/
windows_boottleXCP-flatwrapper.ahk1
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
;; ahk_basic flexible PE wrapper for BoottleXCP - by flatfly
#notrayicon
#singleinstance force
settitlematchmode, 2
Rel = 0005FLA
wTitle = Counterparty Wallet Manager
ReleaseDir = %appdata%\Boottle000\%Rel%
EnvSet, path, %path%;%ReleaseDir%\Python33
ifWinExist, %wTitle%
{
Winrestore
exitapp
}
ifNOTexist %APPDATA%\CounterParty\Counterpartyd
filecreatedir, %APPDATA%\CounterParty\Counterpartyd
ifNOTexist, %ReleaseDir%
{
FileCreateDir, %ReleaseDir%
Gui, Add, text,, Please wait while unpacking modules to your 'AppData' directory...
Gui, Add, Progress, vlvl -Smooth p0 w350 h12 ; PBS_MARQUEE = 0x8
Gui, -MinimizeBox -Sysmenu
Gui, Show, , BoottleXCP ; PyBuilder
SetTimer, Push, 61
sleep 450
FileInstall, setup.tmp, %ReleaseDir%\setup.tmp, 1
runwait, %ReleaseDir%\setup.tmp -y -o"%ReleaseDir%\..\.." ,, hide
}
Setworkingdir, %ReleaseDir%\Python33\BoottleXCP
EnvSet, prompt, $d$s$t$G$S
EnvSet, dircmd, /b
DetectHiddenWindows, On
Gui, Destroy
FileDelete, %ReleaseDir%\setup.tmp
goto chstart
exitapp
Push:
GuiControl, , lvl, +2
Return
chstart:
GetKeyState, state, Shift
if state = D
{
EnvSet, prompt, $d$s$t$G$S
EnvSet, dircmd, /b
run, cmd /k title Console && python -i -c "import sys`, math `; print(sys.version)"
exitapp
}
Gui, Destroy
HourGlassON()
run, ..\python.exe boottlexcp.py ,, hide
winwait, %wTitle%
winactivate
Gui, Destroy
HourGlassOFF()
winshow, %wTitle% ; nb_%Rel%
exitapp
return
HourGlassON()
{
CursorHandle := DllCall( "LoadCursor", Uint,0, Int, 32650 )
DllCall( "SetSystemCursor", Uint,CursorHandle, Int, 32512)
}
HourGlassOFF()
{
DllCall( "SystemParametersInfo", UInt, 0x57, UInt,0, UInt,0, UInt,0 )
}