tmwsiy Posted January 13, 2015 Posted January 13, 2015 Hi, I am fairly green with autoit. I am trying to automate an app that we use for help desk tickets (Wendia). The app does a web start which I can get to launch. I cannot however seem to get Window Info to give me any useful information about the controls in the app. The only thing that changes for me is the Mouse coordinates. I am working with the code below which seems to find the window, but I get nothing (well one listing with "0 [0]" in the array display. Any ideas? Really not sure the development technology, it is a web start app that has WinFX in the executable name. expandcollapse popup; Create a browser window and navigate to a website #include <IE.au3> #include <Array.au3> #include <Constants.au3> #include <WinAPI.au3> Global $avChildren Local $oIE = _IECreate() _IENavigate($oIE, "url") WinWaitActive("[CLASS:HwndWrapper]", "", 10) Sleep(200) $hWnd = WinGetHandle("[CLASS:HwndWrapper]") WinListChildren($hWnd, $avChildren) _ArrayDisplay($avChildren) Exit Func WinListChildren($hWnd, ByRef $avArr) If UBound($avArr, 0) <> 2 Then Local $avTmp[10][2] = [[0]] $avArr = $avTmp EndIf Local $hChild = _WinAPI_GetWindow($hWnd, $GW_CHILD) While $hChild If $avArr[0][0]+1 > UBound($avArr, 1)-1 Then ReDim $avArr[$avArr[0][0]+10][2] $avArr[$avArr[0][0]+1][0] = $hChild $avArr[$avArr[0][0]+1][1] = _WinAPI_GetWindowText($hChild) $avArr[0][0] += 1 WinListChildren($hChild, $avArr) $hChild = _WinAPI_GetWindow($hChild, $GW_HWNDNEXT) WEnd ReDim $avArr[$avArr[0][0]+1][2] EndFunc ;MouseClick("left", 56, 162) ;Sleep(0.5) ;MouseClick("left", 70, 190)
tmwsiy Posted January 13, 2015 Author Posted January 13, 2015 I came across this tool WinID that lists more information (including handles) but if I can't enumerate what is there, how can I get the handle on each new launch?
JohnOne Posted January 13, 2015 Posted January 13, 2015 This app is in a web browser? If so, you should use the rest of the _IE* functions after _IECreate. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
tmwsiy Posted January 13, 2015 Author Posted January 13, 2015 (edited) Pretty sure it is a .net app. has a lot of the new whiz-bang ui features (ribbons, etc) It launches from a browser but it is not itself a browser, at least the window is of class HwndWrapper I came across this: trying to decide if I should plow down that road. Edited January 13, 2015 by tmwsiy
JohnOne Posted January 13, 2015 Posted January 13, 2015 Yes, if window info gives you nothing it's a good route to go. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
SorryButImaNewbie Posted January 14, 2015 Posted January 14, 2015 If I understand, then debugbar or the f12 IE developer tool bar could be usefull to you, but I only used it with JavaScript and HTML pages before.
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