Persistent SingleInstance FORCE MaxThreads MaxHotkeysPerInterva 200 gl

 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
#Persistent
#SingleInstance FORCE
#MaxThreads
#MaxHotkeysPerInterval 200
global windows := {}
windows.width := 800
windows.heigth := 600
windows.title := "Test script"
global tab_menu := ["Главная", "Клавиши", "Лекции", "", "Помощь"]
SystemParametersInfo(0) ; Отключаем анимацию
Gui, Main:Margin, 5, 5
menu := 0
for k, v in tab_menu
if (v)
Gui, Main:Add, Button, % "x0 y" (A_Index - 1) * 30 " h30 w150 gTAB_MENU_SELECT vTAB_MENU_BTN_" A_Index " " (A_Index == 1 ? "Disabled" : ""), % v
Gui, Main:Add, Tab, x0 y0 w0 h0 ChooseГлавная vMyMenuTab, % "Главная|Клавиши|Лекции|Помощь"
; ==================== ;
Gui, Main:Tab, Главная
Gui, Main:Add, Text, x160 y5, Заголовок: Главная
; ==================== ;
Gui, Main:Tab, Клавиши
Gui, Main:Add, Text, x160 y5, Заголовок: Клавиши
; ==================== ;
Gui, Main:Tab, Лекции
Gui, Main:Add, Text, x160 y5, Заголовок: Лекции
; ==================== ;
Gui, Main:Tab, Помощь
Gui, Main:Add, Text, x160 y5, Заголовок: Помощь
; ==================== ;
Gui, Main:Show, % "w" windows.width " h" windows.heigth, % windows.title
Return
TAB_MENU_SELECT()
{
select := RegExReplace(A_GuiControl, "TAB_MENU_BTN_")
GuiControl, Main:Choose, MyMenuTab, % tab_menu[select]
for k, v in tab_menu
GuiControl, % "Main:" (k == select ? "Disable" : "Enable"), TAB_MENU_BTN_%k%
}
SystemParametersInfo(toggle := 0)
{
static SPI_SETCLIENTAREAANIMATION := 0x1043
if !(DllCall("user32\SystemParametersInfo", "uint", SPI_SETCLIENTAREAANIMATION, "uint", 0, "int", toggle, "uint", 0))
throw Exception("SystemParametersInfo failed: " A_LastError, -1)
return true
}