gmh2000 Posted December 9, 2009 Share Posted December 9, 2009 The following code doesn't work because of the context menu which appears is the context menu of the first file on the desktop instead the context menu when you click on a empty space of it. WinActivate("Program Manager") Send("{APPSKEY}") Opt("WinWaitDelay", 100) SEND("O") ; O is the first letter of "Opciones Gráficas" SEND("S") ; S is the first letter of "Salida para" SEND("P") ; T is the first letter of "Portátil" Any idea? Thanks in advance! Link to comment Share on other sites More sharing options...
funkey Posted December 9, 2009 Share Posted December 9, 2009 (edited) For me it works with the context menu of the desktop?! Maybe you could try with WinMinimizeAll and MouseClick. Edit: Now I figured out your problem. Here is the solution: #Include <GuiListView.au3> $hLV = ControlGetHandle('Program Manager', '', 'SysListView321') _GUICtrlListView_SetItemSelected($hLV, -1, 0) WinActivate("Program Manager") Send("{APPSKEY}") ;~ Opt("WinWaitDelay", 100) ;~ SEND("O") ; O is the first letter of "Opciones Gráficas" ;~ SEND("S") ; S is the first letter of "Salida para" ;~ SEND("P") ; T is the first letter of "Portátil" Edited December 9, 2009 by funkey Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
picea892 Posted December 9, 2009 Share Posted December 9, 2009 (edited) Along the same line as Funkey but using keyboard only activate the desktop window and send shift f10 Edited December 9, 2009 by picea892 Link to comment Share on other sites More sharing options...
Authenticity Posted December 9, 2009 Share Posted December 9, 2009 #include <GUIListView.au3> Global Const $WM_RBUTTONDOWN = 0x0204 Global Const $WM_RBUTTONUP = 0x0205 Local $hWnd = WinGetHandle("Program Manager") Local $hLV = ControlGetHandle($hWnd, "", "SysListView321") Local $aHitTest For $i = 0 To @DesktopWidth Step @DesktopWidth/4 $aHitTest = _GUICtrlListView_HitTest($hLV, $i, @DesktopHeight/2) If $aHitTest[0] < 0 Then _WinAPI_PostMessage($hLV, $WM_RBUTTONDOWN, 2, BitOR(BitShift(@DesktopHeight/2, -16), $i)) _WinAPI_PostMessage($hLV, $WM_RBUTTONUP, 2, BitOR(BitShift(@DesktopHeight/2, -16), $i)) ExitLoop EndIf Next Link to comment Share on other sites More sharing options...
gmh2000 Posted December 9, 2009 Author Share Posted December 9, 2009 (edited) OK. Thank you very much! Edited December 9, 2009 by gmh2000 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now