Sign in to follow this  
Followers 0

Detect CTRL ALT DEL screen XP Help

13 posts in this topic

#1 ·  Posted (edited)

Win7 :

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_UseX64=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
Global Const $EVENT_OPEN_DESKTOP_CHANGED = 0x0020 ; Undocumented? Found by trial&error...[/b]
[b]$h_DLL_User32 = DllOpen("User32.dll")
$h_WinEventHook_Proc = DllCallbackRegister("_WinEventHook_Proc", "none", "hwnd;int;hwnd;long;long;int;int")
If @error Then
    MsgBox(16 + 262144, "Error", "DllCallbackRegister(_WinEventHook_Proc) did not succeed. FFH will exit now.")
    Exit
EndIf
$h_Hook = _WinEventHook_Set(0x0020, 0x0020, $h_DLL_User32)
If @error Then
    MsgBox(16 + 262144, "Error", "_WinEventHook_Set() did not succeed. FFH will exit now.")
    Exit
EndIf
OnAutoItExitRegister("_WinEventHook_UnSet")
#endregion ; WinEventHook[/b]
[b]while 1
    sleep(10)
wend[/b]
[b]#region ; WinEventHook Functions
Func _WinEventHook_Proc($h_Hook, $iEvent, $hWnd, $idObject, $idChild, $iEventThread, $iEventTime)
    ;ConsoleWrite($hWnd & @TAB & $idObject & @CRLF)
MsgBox(0,"","")
EndFunc   ;==>_WinEventHook_Proc[/b]
[b]Func _WinEventHook_Set($iEventMin, $iEventMax, $hDLLUser32)
    Local $aRet
    Local Const $WINEVENT_OUTOFCONTEXT = 0x0
    Local Const $WINEVENT_SKIPOWNPROCESS = 0x2
    If Not $hDLLUser32 Or $hDLLUser32 = -1 Then $hDLLUser32 = "User32.dll"
    $aRet = DllCall($hDLLUser32, "hwnd", "SetWinEventHook", _
            "uint", $iEventMin, _
            "uint", $iEventMax, _
            "hwnd", 0, _
            "ptr", DllCallbackGetPtr($h_WinEventHook_Proc), _
            "int", 0, _
            "int", 0, _
            "uint", $WINEVENT_OUTOFCONTEXT) ; BitOR($WINEVENT_OUTOFCONTEXT, $WINEVENT_SKIPOWNPROCESS)
    If @error Then Return SetError(@error, 0, 0)
    Return $aRet[0]
EndFunc   ;==>_WinEventHook_Set[/b]
[b]Func _WinEventHook_UnSet()
    If $h_WinEventHook_Proc Then
        DllCallbackFree($h_WinEventHook_Proc)
    EndIf
    If $h_Hook Then DllCall($h_DLL_User32, "int", "UnhookWinEvent", "hwnd", $h_Hook)
    If $h_DLL_User32 Then DllClose($h_DLL_User32)
EndFunc   ;==>_WinEventHook_UnSet
#endregion ; WinEventHook Functions[/b]
[b]Func IsDesktopLocked()
    Local $hDesktop
    Local $iRet
    Local $iRC
    Local $sMsg
    Local Const $DESKTOP_SWITCHDESKTOP = 0x100
    $hDesktop = DllCall("User32.dll", "int", "OpenDesktop", "str", "Default", "int", 0, "int", 0, "int", $DESKTOP_SWITCHDESKTOP)
    $iRet = DllCall("User32.dll", "int", "SwitchDesktop", "int", $hDesktop[0])
    If IsArray($iRet) Then
        If $iRet[0] = 0 Then[/b]
[b]         $iRC = 1
        ElseIf $iRet[0] = 1 Then[/b]
[b]         $iRC = 0
        EndIf
    Else[/b]
[b] EndIf
    DllCall("User32.dll", "int", "CloseDesktop", "int", $hDesktop[0]);<-- handle returned by "OpenDesktop"
    ;$iRet = DllCall("User32.dll", "int", "CloseDesktop", "int", $iRet[0])
    Return ($iRC)
EndFunc   ;==>IsDesktopLocked[/b]
[b]Func _Exit()
EndFunc   ;==>_Exit

Windows + L screen XP detecting Code ?

Help:S

Edited by ByCode122

Share this post


Link to post
Share on other sites



#2 ·  Posted

Help :oops:

Share this post


Link to post
Share on other sites

#3 ·  Posted

Please wait at least 24 hours before you bump a thread!


My UDFs and Tutorials:

UDFs:
Active Directory (NEW 2015-08-07 - Version 1.2.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (NEW 2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

Share this post


Link to post
Share on other sites

#4 ·  Posted

hmm.. wait:(

Share this post


Link to post
Share on other sites

#5 ·  Posted

As described use the WM_WTSSESSION_CHANGE message because - as stated in the thread - your code only works with Vista+.


My UDFs and Tutorials:

UDFs:
Active Directory (NEW 2015-08-07 - Version 1.2.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (NEW 2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

Share this post


Link to post
Share on other sites

#6 ·  Posted

I fail Do you Code Give ?

Share this post


Link to post
Share on other sites

#7 ·  Posted

ByCode122,

You have already been asked earlier in this very thread not to bump within 24 hours - do NOT do it again. :oops:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert - Easily convert date/time formats, including the language used
ExtMsgBox ------------- A highly customisable replacement for MsgBox
GUIExtender ----------- Extend and retract multiple sections within a GUI
GUIFrame -------------- Subdivide GUIs into many adjustable frames
GUIListViewEx -------- Insert, delete, move, drag, sort and edit ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ---------------- Scrolling tickertape GUIs
NoFocusLines --------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify -------------------- Small notifications on the edge of the display
Scrollbars -------------- Automatically sized scrollbars with a single command
StringSize -------------- Automatically size controls to fit text
Toast -------------------- Small GUIs which pop out of the notification area

Share this post


Link to post
Share on other sites

#8 ·  Posted

Again ... this is no 24 hour support forum! Wait till someone answers your question!

I've already given you a good point to start.


My UDFs and Tutorials:

UDFs:
Active Directory (NEW 2015-08-07 - Version 1.2.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (NEW 2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

Share this post


Link to post
Share on other sites

#9 ·  Posted

Hm..

I know but get one help me Please :oops:

Share this post


Link to post
Share on other sites

#10 ·  Posted

Again ... this is no 24 hour support forum! Wait till someone answers your question!

I've already given you a good point to start.

inefficiency

Share this post


Link to post
Share on other sites

#11 ·  Posted

ByCode122,

As you seem to be ignoring us, I shall make sure we now ignore you for a while. :bye:

Do NOT start another thread on this before tomorrow or you will be unable to start one for a while. :oops:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert - Easily convert date/time formats, including the language used
ExtMsgBox ------------- A highly customisable replacement for MsgBox
GUIExtender ----------- Extend and retract multiple sections within a GUI
GUIFrame -------------- Subdivide GUIs into many adjustable frames
GUIListViewEx -------- Insert, delete, move, drag, sort and edit ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ---------------- Scrolling tickertape GUIs
NoFocusLines --------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify -------------------- Small notifications on the edge of the display
Scrollbars -------------- Automatically sized scrollbars with a single command
StringSize -------------- Automatically size controls to fit text
Toast -------------------- Small GUIs which pop out of the notification area

Share this post


Link to post
Share on other sites

#12 ·  Posted

ByCode122,

I was going to reopen this thread this morning, but as you have contunually pestered me with PMs since I locked it I am now going to leave it locked. If you do decide to start another thread, please respect the Forum rules on bumping. :bye:

And do NOT send me any more PMs as you are reaching the limits of my patience - which is pretty hard to do. :oops:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert - Easily convert date/time formats, including the language used
ExtMsgBox ------------- A highly customisable replacement for MsgBox
GUIExtender ----------- Extend and retract multiple sections within a GUI
GUIFrame -------------- Subdivide GUIs into many adjustable frames
GUIListViewEx -------- Insert, delete, move, drag, sort and edit ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ---------------- Scrolling tickertape GUIs
NoFocusLines --------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify -------------------- Small notifications on the edge of the display
Scrollbars -------------- Automatically sized scrollbars with a single command
StringSize -------------- Automatically size controls to fit text
Toast -------------------- Small GUIs which pop out of the notification area

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

@bycode122

You seemed to have PMed others as well and this will not be tolerated here as indicated in our forum rules.

You will get a 5 day posting ban and better shape up when you decide to return.

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions                                                                 Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
This topic is now closed to further replies.
Sign in to follow this  
Followers 0