Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Detect CTRL ALT DEL screen XP Help


  • This topic is locked This topic is locked
12 replies to this topic

#1 ByCode122

ByCode122

    Seeker

  • 26 posts

Posted 09 March 2012 - 11:30 PM

Win7 :
Plain Text         
#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, 10 March 2012 - 02:35 AM.








#2 ByCode122

ByCode122

    Seeker

  • 26 posts

Posted 10 March 2012 - 10:15 AM

Help :oops:

#3 water

water

    ?

  • MVPs
  • 14,569 posts

Posted 10 March 2012 - 10:17 AM

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

UDFs:
Active Directory (NEW: 2014-02-17 - Version 1.4.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2013-11-10 - Version 0.10.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel (NEW: 2014-03-22 - Beta 5) - Download - General Help & Support - Example Scripts


#4 ByCode122

ByCode122

    Seeker

  • 26 posts

Posted 10 March 2012 - 11:03 AM

hmm.. wait:(

#5 water

water

    ?

  • MVPs
  • 14,569 posts

Posted 10 March 2012 - 11:28 AM

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

UDFs:
Active Directory (NEW: 2014-02-17 - Version 1.4.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2013-11-10 - Version 0.10.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel (NEW: 2014-03-22 - Beta 5) - Download - General Help & Support - Example Scripts


#6 ByCode122

ByCode122

    Seeker

  • 26 posts

Posted 10 March 2012 - 11:41 AM

I fail Do you Code Give ?

#7 Melba23

Melba23

    I'm old - what's your excuse?

  • Moderators
  • 19,845 posts

Posted 10 March 2012 - 12:55 PM

ByCode122,

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

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

#8 water

water

    ?

  • MVPs
  • 14,569 posts

Posted 10 March 2012 - 12:55 PM

Again ... this is no 24 hour support forum! Wait till someone answers your question!
I've already given you a good point to start.

UDFs:
Active Directory (NEW: 2014-02-17 - Version 1.4.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2013-11-10 - Version 0.10.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel (NEW: 2014-03-22 - Beta 5) - Download - General Help & Support - Example Scripts


#9 ByCode122

ByCode122

    Seeker

  • 26 posts

Posted 10 March 2012 - 01:01 PM

Hm..
I know but get one help me Please :oops:


#10 ByCode122

ByCode122

    Seeker

  • 26 posts

Posted 10 March 2012 - 01:03 PM

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

#11 Melba23

Melba23

    I'm old - what's your excuse?

  • Moderators
  • 19,845 posts

Posted 10 March 2012 - 01:04 PM

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
StringSize - Automatically size controls to fit text                                                               ExtMsgBox - A user customisable replacement for MsgBox
Toast - Small GUIs which pop out of the Systray                                                                Marquee - Scrolling tickertape GUIs
Scrollbars - Automatically sized scrollbars with a single command                                   GUIFrame - Subdivide GUIs into many adjustable frames
GUIExtender - Extend and retract multiple sections within a GUI                                      NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes
ChooseFileFolder - Single and multiple selections from specified path tree structure      Notify - Small notifications on the edge of the display
Date_Time_Convert - Easily convert date/time formats, including the language               GUIListViewEx - Insert, delete, move, drag, sort and edit ListView items

#12 Melba23

Melba23

    I'm old - what's your excuse?

  • Moderators
  • 19,845 posts

Posted 11 March 2012 - 10:27 AM

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
StringSize - Automatically size controls to fit text                                                               ExtMsgBox - A user customisable replacement for MsgBox
Toast - Small GUIs which pop out of the Systray                                                                Marquee - Scrolling tickertape GUIs
Scrollbars - Automatically sized scrollbars with a single command                                   GUIFrame - Subdivide GUIs into many adjustable frames
GUIExtender - Extend and retract multiple sections within a GUI                                      NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes
ChooseFileFolder - Single and multiple selections from specified path tree structure      Notify - Small notifications on the edge of the display
Date_Time_Convert - Easily convert date/time formats, including the language               GUIListViewEx - Insert, delete, move, drag, sort and edit ListView items

#13 Jos

Jos

    oh joy ...

  • Developers
  • 22,531 posts

Posted 11 March 2012 - 04:23 PM

@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, 11 March 2012 - 04:23 PM.

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





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users