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
Excel Toolbar - Specify Button
Moderators: JRL, Dorian (MJT support)
-
- Newbie
- Posts: 2
- Joined: Thu Aug 17, 2006 6:41 am
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
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.
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?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Newbie
- Posts: 2
- Joined: Thu Aug 17, 2006 6:41 am
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
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.
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?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
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?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Automation Wizard
- Posts: 1101
- Joined: Fri Jan 07, 2005 5:55 pm
- Location: Somewhere else on the planet
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.
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.