Run command from script

Ask how to do things or if a certain feature is available in the program.
Post Reply
crtrubshaw
Posts: 232
Joined: 06 Jun 2012 11:08

Run command from script

Post by crtrubshaw » 30 Jan 2019 16:42

Hello, is there a way to run menu commands from a script? For example, I want to write a script that will:

1. Paste the clipboard text into a new document
2. Run the menu command: HTML > Beautify > Beautify XML (TidyXMLAction)
3. Set the highlighter to XML

I am able to do steps 1 and 3 but I don't know how to accomplish step 2.

Thanks!

User avatar
Rickard Johansson
Site Admin
Posts: 5719
Joined: 19 Jul 2006 14:29

Re: Run command from script

Post by Rickard Johansson » 03 Feb 2019 10:55

I'll add some new menu commands to the "MainApp" object in the next release. I'm sure there are a few that could be added :?

crtrubshaw
Posts: 232
Joined: 06 Jun 2012 11:08

Re: Run command from script

Post by crtrubshaw » 04 Feb 2019 11:02

Only a few (hundred)? :o

Just kidding, I don't know how you would decide which commands to make available, perhaps you could start a thread and see what replies you get?

Personally, for now, I can see myself using:

TidyXMLAction
JSONPrettyPrintAction

Many thanks Rickard!

Post Reply