Compare commits

...
4 Commits
Author SHA1 Message Date
Andreas Bail 656ecd911e move in noodles & add icon states 2026-07-27 12:32:11 +02:00
Andreas Bail 8888407d28 add off state icon 2026-07-27 12:31:45 +02:00
Andreas Bail a37de18e85 rename icon 2026-07-27 12:31:17 +02:00
Andreas Bail b55ff78230 add noodles 2026-07-27 11:17:59 +02:00
3 changed files with 48 additions and 23 deletions
+48 -23
View File
@@ -2,22 +2,8 @@
#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()
}
FileInstall("akfe-on.ico", A_Temp "\akfe-on.ico")
FileInstall("akfe-off.ico", A_Temp "\akfe-off.ico")
global IdleTime := 240 ; seconds
global Enabled := true
@@ -27,21 +13,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()
A_TrayMenu.Add("Exit", (*) => ExitApp())
; 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())
TraySetIcon(A_Temp "\akfe-on.ico")
UpdateTray()
; Check mouse every second
SetTimer(CheckMouse, 20000)
OnMessage(0x404, TrayIconHandler)
; ----------------------
;=========================================================
; Mouse mover
;=========================================================
CheckMouse() {
global Enabled, IdleTime, LastX, LastY, LastMoveTime
@@ -66,6 +69,18 @@ CheckMouse() {
}
}
TrayIconHandler(wParam, lParam, msg, hwnd)
{
; Double left click on tray icon
if (lParam = 0x203) {
ToggleEnabled()
}
}
;=========================================================
; Tray functions
;=========================================================
ToggleEnabled(*) {
global Enabled
@@ -87,10 +102,20 @@ UpdateTray() {
global Enabled
if Enabled {
TraySetIcon(A_Temp "\akfe-on.ico")
A_TrayMenu.Check("Enabled")
A_IconTip := "Mouse Mover - Active"
A_IconTip := "ArteKaffee - Active"
} else {
TraySetIcon(A_Temp "\akfe-off.ico")
A_TrayMenu.Uncheck("Enabled")
A_IconTip := "Mouse Mover - Disabled"
A_IconTip := "ArteKaffee - Disabled"
}
}
;=========================================================
; Clipboard
;=========================================================
SetClipboard(txt, *) {
A_Clipboard := txt
}
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 125 KiB

After

Width:  |  Height:  |  Size: 125 KiB