Thank you for your feedback. any advise are gratly welcome as im desperate lol
I tried AHK forum "Ask for help" but nothing i spend a few days on the IRC channels to no prevail. I've been googling around for at least a week now, and still anything I try, of other peoples script just fails on both my computers ( work win7 64 & home Win10) i did however get 0x11 to work so it would react on logoff but that si at east i know something is working right.
i tried you script
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetBatchLines -1
Name := OnMessage(MsgNumber, "FunctionName")
If (! Name)
{
MsgBox Message Registration Failed
ExitApp
}
response: Message Registration Failed
i added "DllCall("RegisterSuspendResumeNotification", "ptr", A_ScriptHwnd, "uint", 0)" in front of the on message
response: Message Registration Failed
I added a small gui in fron of the above
response: Message Registration Failed
Then i added detecthidden windows
response: Message Registration Failed
Final code was this
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetBatchLines -1
DetectHiddenWindows, on
Gui, New
Gui, Add, Text,, This is text:
Gui, Show
DllCall("RegisterSuspendResumeNotification", "ptr", A_ScriptHwnd, "uint", 0)
Name := OnMessage(MsgNumber, "FunctionName")
If (! Name)
{
MsgBox Message Registration Failed
ExitApp
}