Excel Toolbar - Specify Button

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
automate_research
Newbie
Posts: 2
Joined: Thu Aug 17, 2006 6:41 am

Excel Toolbar - Specify Button

Post by automate_research » Thu Aug 17, 2006 6:58 am

Hi,

How can I specify a button on an Excel Toolbar. I am trying to automate a Bloomberg data retrieval using their API add-in for Excel. All I need to do is press a button on their toolbar in Excel.

Toolbar>Microsoft Excel*,1,1

First 1 - for the Toolbar
Second 1 - for the Button

I have tried using the Toolbar in MouseCommands, but have so far been unsucessful.

I have also looked at Tools/View System. But was totally confused by the numbering.

Any help would be appreciated, as I really have no desire in fighting the Bloomberg API.

Also, I have been testing this product for the last 2 weeks, and so far it has outperformed my expectations.

Thanks

Pete

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Aug 17, 2006 7:42 am

I doubt Excel uses a standard Windows toolbar object, so the Toolbar command probably won't cut it.

There are various options.

One option is to just use the Image Recognition Library - simply use the capture tool to grab a copy of the toolbar button and then use the FindImgPos function to find it on the screen and move the mouse to it - see the example in the Image Recognition Library help and samples.
http://www.mjtnet.com/imagerecognition.htm

The Image Recognition Library pretty much solves everything by allowing you to automate graphically. If there's no keyboard shortcut just find the object on the screen and click it ...

Another option - Doesn't the toolbar button have a menu shortcut or keyboard equivalent?

Another option - if you can be sure the button always appears on the same place on the screen then just use a MouseMove or MouseMoveRel command. This would be appropriate if the automation will always run on a specific machine in a controlled environment - but clearly not reliable if you are distributing the macro to all and sundry.
Last edited by Marcus Tettmar on Thu Aug 17, 2006 9:04 am, edited 1 time in total.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

automate_research
Newbie
Posts: 2
Joined: Thu Aug 17, 2006 6:41 am

Post by automate_research » Thu Aug 17, 2006 8:50 am

Hi Marcus,

I have tried to follow the link but the page was not found, and could not find the application unders products.

Thanks Pete

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Aug 17, 2006 9:05 am

Sorry, the correct link is:

http://www.mjtnet.com/imagerecognition.htm

I have corrected my previous entry.

This is a plug-in for Macro Scheduler.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Aug 17, 2006 9:05 am

BTW - the next version of Macro Scheduler will have the image recognition library functions built in.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Thu Aug 17, 2006 10:45 pm

Maybe you have a different version of Excel or the Bloomberg add-in, but the one I have seen also has a Bloomberg menu which has all the same items as the toolbar, Field Search, Table Wizard, History Wizard etc.

If you have this menu then you should be able to use Alt B followed by the initial letter of the menu item F, T, H etc. to access the functions.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts