targeter Posted August 16, 2010 Share Posted August 16, 2010 (edited) I am having trouble getting window detection of any office program. I downloaded the office developer list of control IDs http://www.microsoft.com/downloads/details.aspx?FamilyID=3f2fe784-610e-4bf1-8143-41e481993ac6&displaylang=en However, I still can't get it to work. Anyone know of a way to detect when the program fully loads? WinWait only checks to see if the title exists, and technically since the program is loading the title bar exists even though you can't see it. I need a way to detect when the program and all its controls are available..... I want the script to halt basically until it can detect the controls. for a office 2010 and win7 situation Send("{LWINDOWN}{LWINUP}",0) ; Open Microsoft Start Menu & Open Outlook Send("Outloo" & "{ENTER}",0) Opt("WinTitleMatchMode", 2) $windowstatus = 0 While $windowstatus <>1 $windowstatus = ControlCommand("Outlook","", 478 , "IsVisible","") Sleep(500) WEnd MsgBox(0,"test", $windowstatus) Edited August 16, 2010 by targeter Link to comment Share on other sites More sharing options...
FlyinRiz Posted August 16, 2010 Share Posted August 16, 2010 I am having trouble getting window detection of any office program. I downloaded the office developer list of control IDshttp://www.microsoft.com/downloads/details.aspx?FamilyID=3f2fe784-610e-4bf1-8143-41e481993ac6&displaylang=enHowever, I still can't get it to work. Anyone know of a way to detect when the program fully loads? WinWait only checks to see if the title exists, and technically since the program is loading the title bar exists even though you can't see it. I need a way to detect when the program and all its controls are available.....I want the script to halt basically until it can detect the controls. for a office 2010 and win7 situationYou could have it open the Options menu (since it won't process the keystrokes until it's fully open) and then wait for that window. Then you could just put a close command as soon as it see's it and you're good to continue. I'm sure there is a better way, but I think that should work.-Aaron Link to comment Share on other sites More sharing options...
targeter Posted August 16, 2010 Author Share Posted August 16, 2010 I think I better pull out my copy of VB6, I need Spy++ Link to comment Share on other sites More sharing options...
Ascend4nt Posted August 16, 2010 Share Posted August 16, 2010 Perhaps try 'WinActivate()' ? It's worked for me in the past.. My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs | Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) | Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) Link to comment Share on other sites More sharing options...
seandisanti Posted August 17, 2010 Share Posted August 17, 2010 You could just do everything programatically using the objects exposed. as soon as the Application object is created, all of it's properties, methods, and members are available to your code through COM. anything that you'd be doing through menus, controls, etc can all be done behind the scenes without even needing to display the windows... from any office app use Alt+f11 to go into the vba interface, then F2 to open the object browser, and F1 to open help. with those two resources (and the assistance of people on this forum and others) you can get away from the interface and get things done more efficiently. 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