Textpad Tool Parameter Macros

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
drefty
Posts: 35
Joined: Mon Dec 22, 2003 3:53 pm

Textpad Tool Parameter Macros

Post 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.
User avatar
Cloink
Posts: 81
Joined: Thu Sep 09, 2004 1:44 pm

Post 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.
Post Reply