add noodles
This commit is contained in:
+33
-20
@@ -2,22 +2,6 @@
|
|||||||
#SingleInstance Force
|
#SingleInstance Force
|
||||||
Persistent
|
Persistent
|
||||||
|
|
||||||
CorrectPassword := "Kaffeebohne"
|
|
||||||
|
|
||||||
result := InputBox(
|
|
||||||
"Bitte Passwort eingeben:",
|
|
||||||
"Authentifizierung",
|
|
||||||
"Password w200 h90"
|
|
||||||
)
|
|
||||||
|
|
||||||
if (result.Result != "OK") {
|
|
||||||
ExitApp()
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result.Value != CorrectPassword) {
|
|
||||||
MsgBox("Falsches Passwort!", "Fehler", "Iconx")
|
|
||||||
ExitApp()
|
|
||||||
}
|
|
||||||
|
|
||||||
global IdleTime := 240 ; seconds
|
global IdleTime := 240 ; seconds
|
||||||
global Enabled := true
|
global Enabled := true
|
||||||
@@ -27,21 +11,38 @@ global LastMoveTime := A_TickCount
|
|||||||
|
|
||||||
MouseGetPos &LastX, &LastY
|
MouseGetPos &LastX, &LastY
|
||||||
|
|
||||||
; Create tray menu
|
|
||||||
|
;=========================================================
|
||||||
|
; Tray menu
|
||||||
|
;=========================================================
|
||||||
|
|
||||||
A_TrayMenu.Delete()
|
A_TrayMenu.Delete()
|
||||||
|
|
||||||
A_TrayMenu.Add("Enabled", ToggleEnabled)
|
A_TrayMenu.Add("Enabled", ToggleEnabled)
|
||||||
A_TrayMenu.Add()
|
|
||||||
A_TrayMenu.Add("Set idle time...", SetIdleTime)
|
A_TrayMenu.Add("Set idle time...", SetIdleTime)
|
||||||
|
A_TrayMenu.Add()
|
||||||
|
|
||||||
|
; Copypasta submenu
|
||||||
|
CopyMenu := Menu()
|
||||||
|
|
||||||
|
CopyMenu.Add("Standardpasswort", SetClipboard.Bind("BitteÄndern!"))
|
||||||
|
CopyMenu.Add("Password Ticket", SetClipboard.Bind("Auf Standardpasswort zurückgesetzt."))
|
||||||
|
CopyMenu.Add("Berechtigt", SetClipboard.Bind("Berechtigung erteilt."))
|
||||||
|
CopyMenu.Add("Erledigt", SetClipboard.Bind("Erledigt."))
|
||||||
|
|
||||||
|
A_TrayMenu.Add("Noodle", CopyMenu)
|
||||||
|
|
||||||
A_TrayMenu.Add()
|
A_TrayMenu.Add()
|
||||||
A_TrayMenu.Add("Exit", (*) => ExitApp())
|
A_TrayMenu.Add("Exit", (*) => ExitApp())
|
||||||
|
|
||||||
UpdateTray()
|
UpdateTray()
|
||||||
|
|
||||||
; Check mouse every second
|
|
||||||
SetTimer(CheckMouse, 20000)
|
SetTimer(CheckMouse, 20000)
|
||||||
|
|
||||||
; ----------------------
|
|
||||||
|
;=========================================================
|
||||||
|
; Mouse mover
|
||||||
|
;=========================================================
|
||||||
|
|
||||||
CheckMouse() {
|
CheckMouse() {
|
||||||
global Enabled, IdleTime, LastX, LastY, LastMoveTime
|
global Enabled, IdleTime, LastX, LastY, LastMoveTime
|
||||||
@@ -66,6 +67,10 @@ CheckMouse() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
;=========================================================
|
||||||
|
; Tray functions
|
||||||
|
;=========================================================
|
||||||
|
|
||||||
ToggleEnabled(*) {
|
ToggleEnabled(*) {
|
||||||
global Enabled
|
global Enabled
|
||||||
|
|
||||||
@@ -94,3 +99,11 @@ UpdateTray() {
|
|||||||
A_IconTip := "Mouse Mover - Disabled"
|
A_IconTip := "Mouse Mover - Disabled"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
;=========================================================
|
||||||
|
; Clipboard
|
||||||
|
;=========================================================
|
||||||
|
|
||||||
|
SetClipboard(txt, *) {
|
||||||
|
A_Clipboard := txt
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user