9 Commits
Author SHA1 Message Date
Andreas Bail 58b9b7c3d4 migrate publ version to hashed pw 2026-08-26 10:50:23 +02:00
Andreas Bail dfd5d8a38b get hashing to work 2026-08-26 09:27:41 +02:00
Andreas Bail f5f65ab030 yeet tests and libcrypt 2026-08-20 15:54:24 +02:00
Andreas Bail dcb33d6924 rename and gitignore additions 2026-08-20 14:24:56 +02:00
Andreas Bail a5829eebc4 fix Fileinstall 2026-07-29 10:46:04 +02:00
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
6 changed files with 1269 additions and 10 deletions
+121
View File
@@ -0,0 +1,121 @@
#Requires AutoHotkey v2.0
#SingleInstance Force
Persistent
FileInstall("akfe-on.ico", A_Temp "\akfe-on.ico", 1)
FileInstall("akfe-off.ico", A_Temp "\akfe-off.ico", 1)
global IdleTime := 240 ; seconds
global Enabled := true
global LastX := 0
global LastY := 0
global LastMoveTime := A_TickCount
MouseGetPos &LastX, &LastY
;=========================================================
; Tray menu
;=========================================================
A_TrayMenu.Delete()
A_TrayMenu.Add("Enabled", ToggleEnabled)
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())
TraySetIcon(A_Temp "\akfe-on.ico")
UpdateTray()
SetTimer(CheckMouse, 20000)
OnMessage(0x404, TrayIconHandler)
;=========================================================
; Mouse mover
;=========================================================
CheckMouse() {
global Enabled, IdleTime, LastX, LastY, LastMoveTime
if !Enabled
return
MouseGetPos &x, &y
if (x != LastX || y != LastY) {
LastX := x
LastY := y
LastMoveTime := A_TickCount
return
}
if (A_TickCount - LastMoveTime >= IdleTime * 1000) {
MouseMove x + 1, y, 0
MouseMove x, y, 0
LastMoveTime := A_TickCount
}
}
TrayIconHandler(wParam, lParam, msg, hwnd)
{
; Double left click on tray icon
if (lParam = 0x203) {
ToggleEnabled()
}
}
;=========================================================
; Tray functions
;=========================================================
ToggleEnabled(*) {
global Enabled
Enabled := !Enabled
UpdateTray()
}
SetIdleTime(*) {
global IdleTime
result := InputBox("Enter idle time in seconds:", "Mouse mover settings", "w200 h90", IdleTime)
if result.Result = "OK" && IsNumber(result.Value) {
IdleTime := Integer(result.Value)
}
}
UpdateTray() {
global Enabled
if Enabled {
TraySetIcon(A_Temp "\akfe-on.ico")
A_TrayMenu.Check("Enabled")
A_IconTip := "ArteKaffee - Active"
} else {
TraySetIcon(A_Temp "\akfe-off.ico")
A_TrayMenu.Uncheck("Enabled")
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

+1099
View File
File diff suppressed because it is too large Load Diff
+12
View File
@@ -0,0 +1,12 @@
#Requires AutoHotkey v2
#Include ..\lib\HashCalc.ahk2
message := "The quick brown fox jumps over the lazy dog"
tst := Hash.String("SHA-256", message)
MsgBox(tst)
A_Clipboard:=tst
+37 -10
View File
@@ -1,8 +1,14 @@
#Requires AutoHotkey v2.0 #Requires AutoHotkey v2.0
#SingleInstance Force #SingleInstance Force
#Include ..\lib\HashCalc.ahk2
;@Ahk2Exe-ExeName \\artemed.local\Gruppen\FBG\Public\RKK\len_m\#Bail\ArteKaffee.exe
Persistent Persistent
CorrectPassword := "Kaffeebohne" FileInstall("..\akfe-on.ico", A_Temp ".\akfe-on.ico", 1)
FileInstall("..\akfe-off.ico", A_Temp ".\akfe-off.ico", 1)
CorrectPassword := "90d1f4d7691b29fe660800537fb82adbc6e7622001c23d97e20f3f1465a668cc"
result := InputBox( result := InputBox(
"Bitte Passwort eingeben:", "Bitte Passwort eingeben:",
@@ -14,11 +20,12 @@ if (result.Result != "OK") {
ExitApp() ExitApp()
} }
if (result.Value != CorrectPassword) { if (Hash.String("SHA-256", result.Value) != CorrectPassword) {
MsgBox("Falsches Passwort!", "Fehler", "Iconx") MsgBox("Falsches Passwort!", "Fehler", "Iconx")
ExitApp() ExitApp()
} }
global IdleTime := 240 ; seconds global IdleTime := 240 ; seconds
global Enabled := true global Enabled := true
global LastX := 0 global LastX := 0
@@ -27,21 +34,27 @@ 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() A_TrayMenu.Add()
A_TrayMenu.Add("Exit", (*) => ExitApp())
A_TrayMenu.Add("Exit", (*) => ExitApp())
TraySetIcon(A_Temp "\akfe-on.ico")
UpdateTray() UpdateTray()
; Check mouse every second
SetTimer(CheckMouse, 20000) SetTimer(CheckMouse, 20000)
OnMessage(0x404, TrayIconHandler)
; ---------------------- ;=========================================================
; Mouse mover
;=========================================================
CheckMouse() { CheckMouse() {
global Enabled, IdleTime, LastX, LastY, LastMoveTime global Enabled, IdleTime, LastX, LastY, LastMoveTime
@@ -66,6 +79,18 @@ CheckMouse() {
} }
} }
TrayIconHandler(wParam, lParam, msg, hwnd)
{
; Double left click on tray icon
if (lParam = 0x203) {
ToggleEnabled()
}
}
;=========================================================
; Tray functions
;=========================================================
ToggleEnabled(*) { ToggleEnabled(*) {
global Enabled global Enabled
@@ -87,10 +112,12 @@ UpdateTray() {
global Enabled global Enabled
if Enabled { if Enabled {
TraySetIcon(A_Temp "\akfe-on.ico")
A_TrayMenu.Check("Enabled") A_TrayMenu.Check("Enabled")
A_IconTip := "Mouse Mover - Active" A_IconTip := "ArteKaffee - Active"
} else { } else {
TraySetIcon(A_Temp "\akfe-off.ico")
A_TrayMenu.Uncheck("Enabled") A_TrayMenu.Uncheck("Enabled")
A_IconTip := "Mouse Mover - Disabled" A_IconTip := "ArteKaffee - Disabled"
} }
} }