add noodles

This commit is contained in:
Andreas Bail
2026-07-27 11:17:59 +02:00
parent 096a87e3c4
commit b55ff78230
+33 -20
View File
@@ -2,22 +2,6 @@
#SingleInstance Force
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 Enabled := true
@@ -27,21 +11,38 @@ global LastMoveTime := A_TickCount
MouseGetPos &LastX, &LastY
; Create tray menu
;=========================================================
; Tray menu
;=========================================================
A_TrayMenu.Delete()
A_TrayMenu.Add("Enabled", ToggleEnabled)
A_TrayMenu.Add()
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("Exit", (*) => ExitApp())
UpdateTray()
; Check mouse every second
SetTimer(CheckMouse, 20000)
; ----------------------
;=========================================================
; Mouse mover
;=========================================================
CheckMouse() {
global Enabled, IdleTime, LastX, LastY, LastMoveTime
@@ -66,6 +67,10 @@ CheckMouse() {
}
}
;=========================================================
; Tray functions
;=========================================================
ToggleEnabled(*) {
global Enabled
@@ -94,3 +99,11 @@ UpdateTray() {
A_IconTip := "Mouse Mover - Disabled"
}
}
;=========================================================
; Clipboard
;=========================================================
SetClipboard(txt, *) {
A_Clipboard := txt
}