igrok Posted September 25, 2006 Share Posted September 25, 2006 (edited) hello there,I used to work with v2 some time ago, now I turn to v3 after a long pause. I am not a very versatile programmer and I do have a problem I would like to ask you for help. please note that I *have* consulted the search function of this board, but I did not find a suitable answer (some hints though, which I tried, but failed).ok, all I want at this moment is to click this button, marked with a red arrow below:some results of my digging into autoitv3 and the board to solve this.- Au3Info result see below- There is no Control ID, so I was trying with ClassNameNN: MsoCommandBar2 and Text:Desktop SMS (ClassNameNN seems to change from MsoCommandBar2 to MsoCommandBar3 now and then)- as you see in the screenshot, the button text is "New SMS". I tried that too.- Desktop SMS is a COM Add-In from RedOxygen. It does not publish any COM interface (not even vor buttonclick), so I cannot go that way.basically, I tried with the following two lines after I have put the outlook window to the foreground. I tried several iterations, each time changing the Text or ClassNameNN to figure out what would work. unfortunately, none of my approaches worked.ControlFocus("Microsoft Outlook", "New SMS", "MSOCommandBar1") ControlClick("Microsoft Outlook", "New SMS", "MSOCommandBar1") and iterations like ControlFocus("Microsoft Outlook", "Desktop SMS", "MSOCommandBar1") or ControlFocus("Microsoft Outlook", "New SMS", "MSOCommandBar3") or ControlFocus("Microsoft Outlook", "New SMS", "MSOCommandBar1") etc..then I tried AutoHotKey. somewhere is an example with "Postmessage" mentioned (btw, is there an equivalent in autoit3?). I tried with the tool "Winspector Spy" to learn more about this button.what I found:- there is no WM_COMMAND or WM_LBDOWN event. - there are only a lot of WM_USER type eventswhich meant, in the case of AutoHotKey, I could not use the Postmessage function.yeah, I could use MouseMove and click afterwards, but unfortunately, the button might be somewhere else, depending how big the window is or if its eventually closed.so, any chance I can click that button? any help is appreciated.ah.. this is only part of the little script I am workling on. but this part here seems most challenging to me.danexpandcollapse popup>>>>>>>>>>>> Window Details <<<<<<<<<<<<< Title: Almost All - Microsoft Outlook Class: rctrl_renwnd32 Size: X: -4 Y: -4 W: 1003 H: 748 >>>>>>>>>>> Mouse Details <<<<<<<<<<< Screen: X: 800 Y: 55 Cursor ID: 2 >>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<< RGB: Hex: 0x000000 Dec: 0 >>>>>>>>>>> Control Under Mouse <<<<<<<<<<< Size: X: 749 Y: 24 W: 93 H: 26 Control ID: ClassNameNN: MsoCommandBar2 Text: Desktop SMS Style: 0x56000000 ExStyle: 0x00000000 >>>>>>>>>>> Status Bar Text <<<<<<<<<<< (1): 363 Items (2): (3): >>>>>>>>>>> Visible Window Text <<<<<<<<<<< MsoDockTop DHU Desktop SMS Standard Type a contact to find Menu Bar Type a question for help WunderBar NUIDocumentWindow 363 Items Table View >>>>>>>>>>> Hidden Window Text <<<<<<<<<<< MsoDockLeft MsoDockRight MsoDockBottom Edited September 25, 2006 by igrok Link to comment Share on other sites More sharing options...
igrok Posted September 26, 2006 Author Share Posted September 26, 2006 anyone? Link to comment Share on other sites More sharing options...
Zedna Posted November 9, 2006 Share Posted November 9, 2006 (edited) anyone?If ControlFocus() is working (it gets focus)then try to use Send("{Enter}") or Send("{Space}") instead of ControlClick()or try to use ControlGetHandle() and _SendMessage(..,WM_COMMAND,..) --> ID from WinspectorI know it's not elegamt but the last idea...EDIT: _SendMessage is in standard UDF in latest Autoit 3.2 beta so it's no need to go away from AU3 to AHK Edited November 9, 2006 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
GaryFrost Posted November 9, 2006 Share Posted November 9, 2006 You might look into use COM obj for example http://www.autoitscript.com/forum/index.ph...st&p=262557see my signature for info on Office 2003 SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Zedna Posted November 9, 2006 Share Posted November 9, 2006 You might look into use COM obj for example http://www.autoitscript.com/forum/index.ph...st&p=262557see my signature for info on Office 2003@gafrostI was searching for some ObjCreate( "Outlook.Application" ) stuff and found this post and also yours nice example. But igrok said it is plugin without exposed COM so probably it's not so simple. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Zedna Posted November 9, 2006 Share Posted November 9, 2006 New idea: I notice that text "New SMS" has keyboard shortcut Alt+M so use it. Resources UDF ResourcesEx UDF AutoIt Forum Search 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