Skip to content

Commit 412844f

Browse files
committed
Bump to 3.8.6
Signed-off-by: elModo7 <elmodo7yt@gmail.com>
1 parent 8c008ce commit 412844f

101 files changed

Lines changed: 9761 additions & 761 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

13.ahk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#NoEnv
2+
#SingleInstance, Force
3+
SetBatchLines, -1
4+
#NoTrayIcon
5+
SetWorkingDir %A_ScriptDir%\plugins
6+
Run, %A_ScriptDir%\plugins\notification_examples.ahk

Nova Macros Client.ahk

Lines changed: 199 additions & 644 deletions
Large diffs are not rendered by default.

Nova Macros Client.exe

66.5 KB
Binary file not shown.

OBS1.ahk

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
#NoEnv
2+
#NoTrayIcon
3+
#SingleInstance, Force
4+
SetBatchLines, -1
5+
#Include, <nm_msg>
6+
DetectHiddenWindows, On
7+
IfWinNotExist, ahk_exe obs64.exe
8+
{
9+
nmMsg("OBS Not Detected!",2)
10+
ExitApp
11+
}
12+
new LlamadaWS("ws://127.0.0.1:4455")
13+
return
14+
15+
class LlamadaWS extends WebSocket
16+
{
17+
OnOpen(Event)
18+
{
19+
Authenticate =
20+
(
21+
{
22+
"op": 1,
23+
"d": {
24+
"rpcVersion": 1,
25+
"eventSubscriptions": 33
26+
}
27+
}
28+
)
29+
this.Send(Authenticate)
30+
Sleep, 250
31+
Command =
32+
(
33+
{
34+
"op": 6,
35+
"d": {
36+
"requestType": "StartRecord",
37+
"requestId": "f819dcf0-89cc-11eb-8f0e-382c4ac93b9c"
38+
}
39+
}
40+
)
41+
this.Send(Command)
42+
nmMsg("Recording started")
43+
}
44+
45+
OnMessage(Event)
46+
{
47+
Sleep, 2000
48+
this.Close()
49+
}
50+
51+
OnClose(Event)
52+
{
53+
this.Disconnect()
54+
ExitApp
55+
}
56+
57+
__Delete()
58+
{
59+
ExitApp
60+
}
61+
}
62+
63+
; ************************
64+
; WEB SOCKET STUFF
65+
; ************************
66+
class WebSocket
67+
{
68+
__New(WS_URL)
69+
{
70+
static wb
71+
72+
; Create an IE instance
73+
Gui, +hWndhOld
74+
Gui, New, +hWndhWnd
75+
this.hWnd := hWnd
76+
Gui, Add, ActiveX, vWB, Shell.Explorer
77+
Gui, %hOld%: Default
78+
79+
; Write an appropriate document
80+
WB.Navigate("about:<!DOCTYPE html><meta http-equiv='X-UA-Compatible'"
81+
. "content='IE=edge'><body></body>")
82+
while (WB.ReadyState < 4)
83+
sleep, 50
84+
this.document := WB.document
85+
86+
; Add our handlers to the JavaScript namespace
87+
this.document.parentWindow.ahk_savews := this._SaveWS.Bind(this)
88+
this.document.parentWindow.ahk_event := this._Event.Bind(this)
89+
this.document.parentWindow.ahk_ws_url := WS_URL
90+
91+
; Add some JavaScript to the page to open a socket
92+
Script := this.document.createElement("script")
93+
Script.text := "ws = new WebSocket(ahk_ws_url);"
94+
95+
. "ws.onopen = function(event){ ahk_event('Open', event); };"
96+
97+
. "ws.onclose = function(event){ ahk_event('Close', event); };"
98+
99+
. "ws.onerror = function(event){ ahk_event('Error', event); };"
100+
101+
. "ws.onmessage = function(event){ ahk_event('Message', event); };"
102+
this.document.body.appendChild(Script)
103+
}
104+
105+
; Called by the JS in response to WS events
106+
_Event(EventName, Event)
107+
{
108+
this["On" EventName](Event)
109+
}
110+
111+
; Sends data through the WebSocket
112+
Send(Data)
113+
{
114+
this.document.parentWindow.ws.send(Data)
115+
}
116+
117+
; Closes the WebSocket connection
118+
Close(Code:=1000, Reason:="")
119+
{
120+
this.document.parentWindow.ws.close(Code, Reason)
121+
}
122+
123+
; Closes and deletes the WebSocket, removing
124+
; references so the class can be garbage collected
125+
Disconnect()
126+
{
127+
if this.hWnd
128+
{
129+
this.Close()
130+
Gui, % this.hWnd ": Destroy"
131+
this.hWnd := False
132+
}
133+
}
134+
}

OBS10.ahk

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
#NoEnv
2+
#NoTrayIcon
3+
#SingleInstance, Force
4+
SetBatchLines, -1
5+
#Include, <nm_msg>
6+
DetectHiddenWindows, On
7+
IfWinNotExist, ahk_exe obs64.exe
8+
{
9+
nmMsg("OBS Not Detected!",2)
10+
ExitApp
11+
}
12+
new LlamadaWS("ws://127.0.0.1:4455")
13+
return
14+
15+
class LlamadaWS extends WebSocket
16+
{
17+
OnOpen(Event)
18+
{
19+
Authenticate =
20+
(
21+
{
22+
"op": 1,
23+
"d": {
24+
"rpcVersion": 1,
25+
"eventSubscriptions": 33
26+
}
27+
}
28+
)
29+
this.Send(Authenticate)
30+
Sleep, 250
31+
Command =
32+
(
33+
{
34+
"op": 6,
35+
"d": {
36+
"requestType": "SetCurrentProgramScene",
37+
"requestId": "f819dcf0-89cc-11eb-8f0e-382c4ac93b9c",
38+
"requestData": {
39+
"sceneName": "Terminado"
40+
}
41+
}
42+
}
43+
)
44+
this.Send(Command)
45+
}
46+
47+
OnMessage(Event)
48+
{
49+
Sleep, 2000
50+
this.Close()
51+
}
52+
53+
OnClose(Event)
54+
{
55+
this.Disconnect()
56+
ExitApp
57+
}
58+
59+
__Delete()
60+
{
61+
ExitApp
62+
}
63+
}
64+
65+
; ************************
66+
; WEB SOCKET STUFF
67+
; ************************
68+
class WebSocket
69+
{
70+
__New(WS_URL)
71+
{
72+
static wb
73+
74+
; Create an IE instance
75+
Gui, +hWndhOld
76+
Gui, New, +hWndhWnd
77+
this.hWnd := hWnd
78+
Gui, Add, ActiveX, vWB, Shell.Explorer
79+
Gui, %hOld%: Default
80+
81+
; Write an appropriate document
82+
WB.Navigate("about:<!DOCTYPE html><meta http-equiv='X-UA-Compatible'"
83+
. "content='IE=edge'><body></body>")
84+
while (WB.ReadyState < 4)
85+
sleep, 50
86+
this.document := WB.document
87+
88+
; Add our handlers to the JavaScript namespace
89+
this.document.parentWindow.ahk_savews := this._SaveWS.Bind(this)
90+
this.document.parentWindow.ahk_event := this._Event.Bind(this)
91+
this.document.parentWindow.ahk_ws_url := WS_URL
92+
93+
; Add some JavaScript to the page to open a socket
94+
Script := this.document.createElement("script")
95+
Script.text := "ws = new WebSocket(ahk_ws_url);"
96+
97+
. "ws.onopen = function(event){ ahk_event('Open', event); };"
98+
99+
. "ws.onclose = function(event){ ahk_event('Close', event); };"
100+
101+
. "ws.onerror = function(event){ ahk_event('Error', event); };"
102+
103+
. "ws.onmessage = function(event){ ahk_event('Message', event); };"
104+
this.document.body.appendChild(Script)
105+
}
106+
107+
; Called by the JS in response to WS events
108+
_Event(EventName, Event)
109+
{
110+
this["On" EventName](Event)
111+
}
112+
113+
; Sends data through the WebSocket
114+
Send(Data)
115+
{
116+
this.document.parentWindow.ws.send(Data)
117+
}
118+
119+
; Closes the WebSocket connection
120+
Close(Code:=1000, Reason:="")
121+
{
122+
this.document.parentWindow.ws.close(Code, Reason)
123+
}
124+
125+
; Closes and deletes the WebSocket, removing
126+
; references so the class can be garbage collected
127+
Disconnect()
128+
{
129+
if this.hWnd
130+
{
131+
this.Close()
132+
Gui, % this.hWnd ": Destroy"
133+
this.hWnd := False
134+
}
135+
}
136+
}

0 commit comments

Comments
 (0)