ankitsablok89 Posted July 28, 2014 Share Posted July 28, 2014 The problem I am trying to solve is the following, I have a window with a tab panel inside that window just like the one below and I want to access one of the tabs inside that window, I am able to do that in autoit but not when I port my autoit code to Python using PyWin32, the situation is explained a bit more further on. I am trying to port my autoit code to Python using PyWin32 and AutoItX, I am successfully able to retrieve the handle of a "tab" embedded inside a window using autoit solely and here is the code for it - ; as the "Plugin" control is a tab in the process manager this statement gets the internal hexadecimal handle of the tab control in the "Process Manager" window $hTab = ControlGetHandle($hWnd, "", "SysTabControl321") but when I execute the same code inside my Python script it doesn't retrieve the address of the tab successfully, the code is as follows - import time import LogIt import datetime import win32con import win32gui import win32api import win32com.client # this makes use of the AutoITX.dll that we registered with the Windows OS autoit = win32com.client.Dispatch("AutoItX3.Control") # as the "Plugin" control is a tab in the process manager this statement gets the internal hexadecimal handle of the tab control in the "Process Manager" window hTab = autoit.ControlGetHandle(hWnd, "", "[CLASS:SysTabControl32; INSTANCE:1]") the above code always shows me the following address for the tab control I am interested in - In function enableExplorerPlugin($brestartExplorer): hTab - 0x0000000000000000 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