AltTab Posted May 23, 2014 Share Posted May 23, 2014 expandcollapse popup#include <WinAPI.au3> #include <MsgBoxConstants.au3> $sAppTitle = "Siebel Service" Local $hWnd = WinWait($sAppTitle, "", 10) ; Disable user input from the mouse and keyboard. ; Wait for 1 seconds. Opt("MouseCoordMode", 1) ;1=absolute, 0=relative, 2=client Sleep(1000) Local $aPos = MouseGetPos() $currhWnd = _WinAPI_GetForegroundWindow() If IsHWnd($currhWnd) then Local $sControl = ControlGetFocus($currhWnd) BlockInput(1) Opt("MouseCoordMode", 0) WinActivate($sAppTitle) WinWaitActive($sAppTitle) MouseMove(200, 200, 0) sleep(250) mouseclick("left") ;controlclick does not get same results, mouseclick not always nessisary sleep(250) ControlSend ($sAppTitle,"","[CLASS:Internet Explorer_Server; INSTANCE:1]","^s") ;ctrl+s sleep(500) While MouseGetCursor() = 15 ;WAIT sleep(250) WEnd BlockInput(0) If IsHWnd($currhWnd) Then Opt("MouseCoordMode", 1) WinActivate($currhWnd) ControlFocus($currhWnd, "", $sControl) MouseMove($aPos[0], $aPos[1], 0) EndIf Hello I just couldn't find information on this. There is a need to delay my script after i use controlsend but I only saw the mousegetcursor as an option. So I disable input move to the window i am interacting with and once complete, give back control and send the user back to their original window and mouse position. The IE webpage is a Siebel CRM web app the page will NOT show its loading after the ctrl+s is pressed, other than the mouse changes to WAIT. I am asking for help from the AutoIt Gurus if its possible to get what the mousegetcursor would be without actually needing the mouse positioned over the control. Link to comment Share on other sites More sharing options...
jdelaney Posted May 23, 2014 Share Posted May 23, 2014 (edited) You can attach to embedded browsers, and use _ieloadwait...links: _ieattach _ieloadwait ; or, if it's the window it's self, you can use: wingetstate Or, if it's data that loads after the page is 'loaded', you can loop for a specific object to be present. Edited May 23, 2014 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
AltTab Posted May 23, 2014 Author Share Posted May 23, 2014 That actually gave me a good idea. I will need to loop until a value in a specific control is different. Link to comment Share on other sites More sharing options...
jdelaney Posted May 23, 2014 Share Posted May 23, 2014 Sounds good. Anything's better than waiting for cursor states, IMO. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. 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