User commands in menubar

General discussions about working with the Astrobe IDE and programming ARM Cortex-M0, M3, M4 and M7 microcontrollers.
Post Reply
steve64
Posts: 44
Joined: Mon Jul 09, 2018 8:56 am
Location: Italy

User commands in menubar

Post by steve64 » Thu Jul 26, 2018 2:36 pm

Please consider the following extension to the IDE:
allowing to add one (or better more) user definable commands (paths to executable Windows files) under the Tools entry of the menubar.
This would be helpful, for instance, to invoke external apps for analysis, source code version control,
or any other purpose.

cfbsoftware
Site Admin
Posts: 525
Joined: Fri Dec 31, 2010 12:30 pm
Contact:

Re: User commands in menubar

Post by cfbsoftware » Thu Jul 26, 2018 10:10 pm

Thank you for your suggestion. I’m pleased to be able to report that enhancement had already been planned for the next feature release.

steve64
Posts: 44
Joined: Mon Jul 09, 2018 8:56 am
Location: Italy

Re: User commands in menubar

Post by steve64 » Fri Jul 27, 2018 7:14 am

Great! Thanks a lot.

cfbsoftware
Site Admin
Posts: 525
Joined: Fri Dec 31, 2010 12:30 pm
Contact:

Re: User commands in menubar

Post by cfbsoftware » Mon Nov 19, 2018 7:29 am

We are now actively working on this enhancement. The design allows for context-sensitive parameters e.g. %FilePath%, %FileDir%, %FileName%, %FileRoot% which can be substituted with values corresponding to the file currently showing in the editor. For example, something like:

Code: Select all

%FilePath%  = D:\AstrobeM3-v6.4\Examples\General\Info.mod
%FileDir%   = D:\AstrobeM3-v6.4\Examples\General\
%FileName%  = Info.mod
%FileRoot%  = Info
Are there any other parameters that we might be able to evaluate that would be useful for the sort of commands that you are interested in?

Note - for other cases you will also be able to set an option on a command so that it prompts you for the parameters before it executes.

cfbsoftware
Site Admin
Posts: 525
Joined: Fri Dec 31, 2010 12:30 pm
Contact:

Re: User commands in menubar

Post by cfbsoftware » Mon Nov 19, 2018 11:34 am

We were planning to add a new menu item 'Open file location ...' to allow you to launch Windows Explorer in the folder which contains the current file. However, now we have a user-customisable Tools menu, that feature no longer needs to be hard-coded.

The Tools.ini file that you can use to define your own menu items will include the following entry as a working example:

Code: Select all

[Command0]
MenuItem=&Open file location ...
Path=C:\Windows\explorer.exe
Parameters=%FileDir%
WorkingFolder=%FileDir%
ConsoleApp=False
Prompt=False
Here's a preview of the end-result:
capture.jpg
capture.jpg (26.06 KiB) Viewed 39524 times

steve64
Posts: 44
Joined: Mon Jul 09, 2018 8:56 am
Location: Italy

Re: User commands in menubar

Post by steve64 » Thu Dec 20, 2018 4:41 pm

It looks fine, looking forward for the release...

cfbsoftware
Site Admin
Posts: 525
Joined: Fri Dec 31, 2010 12:30 pm
Contact:

Re: User commands in menubar

Post by cfbsoftware » Sun Feb 10, 2019 6:19 am

v7.0 of Astrobe has now been released. The Tools menu now has three additional items by default. All of these have been implemented just by adding entries to the new Tools.ini configuration file:
ToolsMenu.jpg
Tools Menu
ToolsMenu.jpg (31.22 KiB) Viewed 38798 times

Post Reply