Compare commits
5
Commits
stable
..
a5829eebc4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5829eebc4 | ||
|
|
656ecd911e | ||
|
|
8888407d28 | ||
|
|
a37de18e85 | ||
|
|
b55ff78230 |
+48
-23
@@ -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", 1)
|
||||
FileInstall("akfe-off.ico", A_Temp "\akfe-off.ico", 1)
|
||||
|
||||
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
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 125 KiB |
Reference in New Issue
Block a user