Page 1 of 1

Textpad Tool Parameter Macros

Posted: Sat Apr 19, 2008 6:21 pm
by drefty
A question for those of you who have used Tool Parameter Macros with textpad. Does anyone know of a way to simulate a "SelectedLineCount" tool parameter macro?

What is needed is a way to get the current number of selected lines in the current buffer. With this information, it would be possible to combine it with the $line tool parameter macro, then your external tool could know the entire range of selected text in the current buffer.

It appears this information is currently available only from the textpad statusbar.

(Select 7 lines for example, and textpad will show you "7 lines selected")

Question: Is there any way to get this information (number of lines selected) into a tool parameter macro?

Question: If no to above, how much effort will it take to add this feature to textpad?

Thanks if anyone has any ideas on this.

Posted: Thu May 15, 2008 5:12 pm
by Cloink
The only way I can think of, not brilliant, is to include a

Code: Select all

$Prompt('Enter number of lines')
tool-param macro - which you will have to fill in yourself when you run the tool. This then just becomes another argument to whatever executable you are starting.

This is not something Helios are likely to implement otherwise.