slight improvements
This commit is contained in:
parent
3d3159cab1
commit
60f7bbbbd5
14
flag.ahk
14
flag.ahk
@ -28,12 +28,10 @@ Switch A_Args[1]
|
||||
blink(A_Args[2], length)
|
||||
Case "p":
|
||||
patt(A_Args[2], length)
|
||||
Default:
|
||||
MsgBox,, Flag, % "Incorrect parameters passed to script: " A_Args[1] ", " A_Args[2] ", " length
|
||||
}
|
||||
|
||||
|
||||
solid(input, length)
|
||||
solid(input, length := 0)
|
||||
{
|
||||
Switch input
|
||||
{
|
||||
@ -60,9 +58,10 @@ solid(input, length)
|
||||
)
|
||||
}
|
||||
translate("https://api.luxafor.com/webhook/v1/actions/solid_color", json_str, length)
|
||||
ExitApp
|
||||
}
|
||||
|
||||
blink(input, length)
|
||||
blink(input, length := 0)
|
||||
{
|
||||
If (length = 0)
|
||||
{
|
||||
@ -87,9 +86,10 @@ blink(input, length)
|
||||
}
|
||||
)
|
||||
translate("https://api.luxafor.com/webhook/v1/actions/blink", json_str, length)
|
||||
ExitApp
|
||||
}
|
||||
|
||||
patt(input, length)
|
||||
patt(input, length := 0)
|
||||
{
|
||||
If (length = 0)
|
||||
{
|
||||
@ -131,6 +131,7 @@ patt(input, length)
|
||||
}
|
||||
)
|
||||
translate("https://api.luxafor.com/webhook/v1/actions/pattern", json_str, length)
|
||||
ExitApp
|
||||
}
|
||||
|
||||
translate(url, data, length)
|
||||
@ -138,7 +139,7 @@ translate(url, data, length)
|
||||
If (length = 0)
|
||||
{
|
||||
req(url, data)
|
||||
ExitApp
|
||||
Goto, tEnd
|
||||
} Else {
|
||||
time_to_run := length * 1000
|
||||
start_time := A_TickCount
|
||||
@ -153,6 +154,7 @@ translate(url, data, length)
|
||||
Sleep, (length * 1000)
|
||||
off()
|
||||
}
|
||||
tEnd:
|
||||
}
|
||||
|
||||
off()
|
||||
|
Loading…
Reference in New Issue
Block a user