Need two (simple?) failsafe scripts to work for my WiFi Plug
Posted: 01 Oct 2022, 20:34
Hello, i am trying to get help with creating two scripts for my WiFi Plug using AHK and Unofficial Google Assistant.
For the first script, it is a script to "Power On". after all three (3) conditions are met, i would like to send my script i currently have as a command to Google Assistant afterwards:
" ` " needs to be in the DOWN status/position
" ` " is held for 2000ms
" ` " is released
" ` " Sends " ~ " to open Google Assistant
next line of currrent script made
etc.
Return
-
The second script is to Power Off:
" ` " needs to be in the DOWN status/position
" ` " is held for 5000ms
" ` " Sends " ~ " to open Google Assistant
next line of currrent script made
etc.
Return
-
So far i got a script for turning off and on my WiFi Plug but it doesnt have the fail safe conditions i want to have.
and
[Mod edit: [code][/code] tags added.]
Apologies for the no [tag][/tag], i am learning how to script and post at the same time. This script will be nice for others that use WiFi Plugs in the same way as this will make it harder to accidently turn on or off.
** if someone has a master guide/breakdown on how and what to tag, id appreciate it.
For the first script, it is a script to "Power On". after all three (3) conditions are met, i would like to send my script i currently have as a command to Google Assistant afterwards:
" ` " needs to be in the DOWN status/position
" ` " is held for 2000ms
" ` " is released
" ` " Sends " ~ " to open Google Assistant
next line of currrent script made
etc.
Return
-
The second script is to Power Off:
" ` " needs to be in the DOWN status/position
" ` " is held for 5000ms
" ` " Sends " ~ " to open Google Assistant
next line of currrent script made
etc.
Return
-
So far i got a script for turning off and on my WiFi Plug but it doesnt have the fail safe conditions i want to have.
Code: Select all
`::
Send, ~
Sleep, 2000
Send, Vape On{Enter}
Return
Code: Select all
+~:: ;it works just like +`, it least for what i need
Send, ~
Sleep, 2000
Send, Vape Off{Enter}
Return
Apologies for the no [tag][/tag], i am learning how to script and post at the same time. This script will be nice for others that use WiFi Plugs in the same way as this will make it harder to accidently turn on or off.
** if someone has a master guide/breakdown on how and what to tag, id appreciate it.