51 lines
2.0 KiB
Markdown
51 lines
2.0 KiB
Markdown
# luxAHKfor
|
|
|
|
## Overview
|
|
This AHK script simply interacts with the API, not directly interacting with the flag.
|
|
|
|
## Usage
|
|
The recommended way to use this is to launch it with command line parameters. I wouldn't advise `#Include`ing it since it contains quite a few `ExitApp`s.
|
|
|
|
I didn't want to have you specify the UserID when you call the script, that's super annoying. Just go in there and put it in at the very top.
|
|
|
|
**[How to launch with command line parameters documentation](https://www.autohotkey.com/docs/Scripts.htm#cmd)**
|
|
|
|
**How to do it from within AHK**
|
|
`Run %A_AhkPath% "flag.ahk" "param" "param" "param"`
|
|
|
|
## Parameter format
|
|
[Everything listed here is an option](https://luxafor.helpscoutdocs.com/article/25-webhook-api-basics-and-guidelines)
|
|
|
|
### Start with the type of action you want:
|
|
|
|
| Action | Parameter |
|
|
| --- | --- |
|
|
| Solid | `s` |
|
|
| Blink | `b` |
|
|
| Pattern | `p` |
|
|
|
|
### Next do the color:
|
|
|
|
| Action | Available Colors |
|
|
| --- | --- |
|
|
| Solid | `red, green, yellow, blue, white, cyan, magenta, 6 symbol hex color code`|
|
|
| Blink | `red, green, yellow, blue, white, cyan, magenta` |
|
|
| Pattern | `police, traffic_lights, random (picks one of the following random ones at random), random1, random2, random3, random4, random5` <br> Additional patterns accepted on Windows only: `rainbow, sea, white_wave, synthetic` |
|
|
|
|
### Optional: How long to do that action
|
|
|
|
Just specify how long you want it to hold said action in seconds. I haven't tested out decimals, but it isn't that exact anyway, takes a few seconds to turn on the light as is.
|
|
|
|
If you don't specify this for solid colors it will just tell it to go to that color and end. If you don't set it for blinking or patterns it goes on for 1000000 seconds (11.57 days, so essentially until the script gets stopped)
|
|
|
|
## Turning the flag off
|
|
Only specify the parameter `off` and it will turn off the flag
|
|
|
|
## Examples
|
|
`Run %A_AhkPath% "flag.ahk" "b" "red" "10"`
|
|
|
|
`Run %A_AhkPath% "flag.ahk" "p" "police"`
|
|
|
|
`Run %A_AhkPath% "flag.ahk" "s" "magenta" "35"`
|
|
|
|
`Run %A_AhkPath% "flag.ahk" "off"` |