Skip to content

Commit

Permalink
aTimer: adding new WIP module
Browse files Browse the repository at this point in the history
  • Loading branch information
ewerybody committed Mar 18, 2022
1 parent 966f06c commit 605177e
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
28 changes: 28 additions & 0 deletions aTimer/a2module.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[
{
"author": "eric",
"date": "2021 9 14",
"description": "\u2022 Set number of minutes,\n\u2022 Set something to \"Run\" (url or program)\n.. that's currently it! Well, this could be huuuge!",
"display_name": "",
"tags": [],
"typ": "nfo",
"url": "",
"version": "0.1"
},
{
"disablable": true,
"enabled": true,
"functionCode": "aTimer_menu()",
"functionMode": 0,
"keyChange": true,
"label": "Set up a timer",
"multiple": true,
"name": "aTimer_Hotkey",
"scopeChange": true,
"typ": "hotkey"
},
{
"file": "aTimer.ahk",
"typ": "include"
}
]
32 changes: 32 additions & 0 deletions aTimer/aTimer.ahk
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
; aTimer - aTimer.ahk
; author: eric
; created: 2021 9 14

aTimer_menu(){
InputBox, minutes, aTimer, Set a timer in ... Minutes?, , 240, 120
minutes := Trim(minutes)
If !IsNumber(minutes) {
if !minutes
return
a2tip("How much is """ minutes """ Minutes?!? ...")
return
}

InputBox, what_to_do, aTimer, What to do in %minutes% Minutes?, , 240, 120
what_to_do := Trim(what_to_do)
if !what_to_do
return

global _aTimer_what_to_do
_aTimer_what_to_do := what_to_do
SetTimer, aTimer_exec, % minutes * 60000
}

aTimer_exec() {
SetTimer, aTimer_exec, Off
global _aTimer_what_to_do
app := "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
Run, %app% %_aTimer_what_to_do%
}

; https://mynoise.net/NoiseMachines/windSeaRainNoiseGenerator.php

0 comments on commit 605177e

Please sign in to comment.