Syla Posted March 21 Posted March 21 Hi, i'm trying to get the handle of this class but without success. All others WinGetHandle are working in my code, not this one. the WinWait before WinGetHandle launched when the window is activ does not see it and wait until i close it ! The Window info from Autoit is able to see and get every information, any idea would be really appreciate.
ahmet Posted March 21 Posted March 21 What happens if you use windows title? Show the code you are using. It might be easier someone to help you that way. If you copy handle from AutoIt info tool are you able to get any data for window?
Syla Posted March 21 Author Posted March 21 if i use windows title it's the same problem ! i've tried to copy the handle given by the autoit app, but the handle number is changing at every new launch of it.
Nine Posted March 21 Posted March 21 What @ahmet meant is : after you launch the application and you plug the handle into your code, do you have access to the window ? Have you tried to use WinList instead ? Maybe there is multiple windows with the same class ? And please show your code when you ask for help. Here how to post code. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy
Syla Posted March 21 Author Posted March 21 expandcollapse popup;=================================================================== ; Callback function ;=================================================================== Func _KeyboardHook($nCode, $wParam, $lParam) Local $tKHS = DllStructCreate($tagKBDLLHOOKSTRUCT, $lParam) Local $vkCode If $nCode > -1 Then $vkCode = DllStructGetData($tKHS, 'vkCode') Switch $vkCode Case 9 $bVKTab = True Case 13 _OnTaskViewExit() Case 27 _OnTaskViewExit() Case 37 $bVKLeftArrow = True Case 39 $bVKRightArrow = True Case 91 To 92 $bVKWin = True Case 162 To 163 $bVKCtrl = True EndSwitch If $bVKWin Then $bVKWin = False If $bVKCtrl Then $bVKCtrl = False If $bVKLeftArrow Then ;Left switch $bVKLeftArrow = False ElseIf $bVKRightArrow Then ;Right switch $bVKRightArrow = False EndIf ElseIf $bVKTab Then ;Task view $bVKTab = False If Not $bTaskView Then $bTaskView = True WinWait("[CLASS:XamlExplorerHostIslandWindow]") $hWnd = WinGetHandle("[CLASS:XamlExplorerHostIslandWindow]") Else $bTaskView = False ;_TestIfDesktopsChanged() EndIf EndIf EndIf EndIf Return _WinAPI_CallNextHookEx($hHook, $nCode, $wParam, $lParam) EndFunc
Syla Posted March 21 Author Posted March 21 (edited) Task View is launched by windows in full screen, i could get the handle but no way to use it without quit and relaunch again ( and then loose the handle ) ! WinList does not show it !!! Edited March 21 by Syla
argumentum Posted March 21 Posted March 21 (edited) If "Always on top" don't do it, use Control Viewer. Edited March 21 by argumentum more Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
junkew Posted March 21 Posted March 21 Interesting but if Au3Inf is seeing it you should be able to handle it. https://learn.microsoft.com/en-us/shows/visual-studio-toolbox/xaml-islands Try FAQ 31 with UIAutomation Whats the output of this Example() Func Example() ; Retrieve a list of window handles. Local $aList = WinList() ; Loop through the array displaying only visable windows with a title. For $i = 1 To $aList[0][0] If $aList[$i][0] <> "" And BitAND(WinGetState($aList[$i][1]), 2) Then consolewrite("Title: " & $aList[$i][0] & @CRLF & "Handle: " & $aList[$i][1] & @CRLF) ; Retrieve the classlist of the window using the handle returned . Local $sClassList = WinGetClassList($aList[$i][1]) consolewrite(stringreplace($sClassList,@LF,@LF & " -")& @CRLF) EndIf Next EndFunc ;==>Example FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
Syla Posted March 26 Author Posted March 26 (edited) console write is doing strange things actually in my side but if i print an array of classes + msgboxes of getting classes list of them, here is what i get: 2 msgbox were empty (no class list i guess) i've tried to look at the handle i've got from The Window info from Autoit ( launched in the same time ), even in the all winlist results, ( not visible ). No way, i cannot find it. Edited March 26 by Syla
MattyD Posted March 26 Posted March 26 (edited) Just to add a bit of context to this - XAML Islands are a way to embed UWP controls in a win32 app. So its possible we're just seeing a container, and not necessarily something that we can interact with in a traditional way. I would like to be proven wrong though! Edit: sorry - should've read the thread a bit closer, junkew's beaten me to it! Edited March 26 by MattyD
Syla Posted March 26 Author Posted March 26 i'm sorry but even after read it, i don't really understand how i could use UIAutomation to handle a window... could you help me a little more please ? 🙃
argumentum Posted March 26 Posted March 26 (edited) 2 hours ago, Syla said: ...i don't really understand... "Cannot handle this ..." is the title but, what are you trying to get done ?, maybe there is a better way than what you thought of. Edited March 26 by argumentum Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
Syla Posted March 26 Author Posted March 26 I'm trying to get when Task View is activated and more important, when i leave it.
Solution Syla Posted March 26 Author Solution Posted March 26 Ok Guys, I found something who can give me what i want: WinGetTitle("[active]") it gives me the title of the task view and i can test it to know when it's closed. Thanks for you help argumentum 1
junkew Posted March 26 Posted March 26 You could have tried faq31 with simplespy or inspect.exe to see if more is recognized. Syla 1 FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
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