External tool doesn't set cursor line

General questions about using TextPad

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

Post Reply
Thad Smith
Posts: 7
Joined: Tue Dec 28, 2004 1:04 am

External tool doesn't set cursor line

Post by Thad Smith »

I am running an external batch file, which executes a Python script and writes a single line to stdout:
  • S:\project\matchPPif\code>python matchPPif.py S:\project\matchPPif\code\testc.c 5
    3 4 4 27 27 28

    Tool completed successfully
I want to set the cursor to the line number in the fourth value (27 in this case). My tool regex is

Code: Select all

^\d+ \d+ \d+ (\d+) \d+
and settings
File:
Line: 1
Column:

Code: Select all

File: 
Line: 1
Column:
The cursor is on a line in the file being edited. After the tool runs, the cursor is in the Tool Output window. When I click on the original file window, the cursor position isn't shown. How can I get the editor to place the cursor on the selected line?
User avatar
AmigoJack
Posts: 515
Joined: Sun Oct 30, 2016 4:28 pm
Location: グリーン ヒル ゾーン
Contact:

Post by AmigoJack »

Thad Smith
Posts: 7
Joined: Tue Dec 28, 2004 1:04 am

Post by Thad Smith »

It works (version 7.4.0) and I misunderstood what was supposed to happen.

I was expecting the cursor to be placed immediately on the edited file. Instead it is in the Tool Output window. When I move the cursor to the output line and press Enter, it then selects the proper file and places the cursor on the correct line.

I attempted to automate the whole process, using a macro to execute the external program, then select the output line in the Tool window, but apparently a macro cannot execute an external tool.
Post Reply