Author Topic: [solved]Shortcut Key for vba script?  (Read 6142 times)

mariusz

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
[solved]Shortcut Key for vba script?
« on: January 06, 2011, 06:44:40 pm »
Hi
I have written a small vba script(built-in, part of my ea project).
It's running in context of element which is choosen from project browser window.
Is it possible to add a new option to a context menu (or add a shortcut key) to running my script?
Now I have to choose an element, open scripting window, choose a script and click "run" button - that is very uncomfortable.

Best regards
mario
« Last Edit: January 11, 2011, 05:39:04 pm by kjezyna9 »

neil_albiston

  • EA User
  • **
  • Posts: 26
  • Karma: +0/-0
    • View Profile
Re: Shortcut Key for vba script?
« Reply #1 on: January 06, 2011, 07:35:37 pm »
Not quite a shortcut key but heres a good way to run the scripts from the browser.

Within the scripting window, if you set the Group --> Group Properties --> Group Type to "Project Browser" the script inside that group will be accessible from the Project Browser menu.

( Right click on the item in the project browser and select Scripts--> "Your script" )


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13286
  • Karma: +556/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Shortcut Key for vba script?
« Reply #2 on: January 06, 2011, 08:01:51 pm »
Or you could create a "real" addin, then you can control the context menu items yourself.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Shortcut Key for vba script?
« Reply #3 on: January 11, 2011, 12:03:04 am »
You simply can not assign a shortcut key to any of your addins. Maybe V9 will bring a change here?

q.

mariusz

  • EA User
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Shortcut Key for vba script?
« Reply #4 on: January 11, 2011, 05:37:17 pm »
neil, Geert , qwerty thanks for your replies.

I don't want to create a "addin" because script is too small.
Neil's solution works and its ok.

Thanks for all

Best regards
mario
« Last Edit: January 11, 2011, 05:38:09 pm by kjezyna9 »