External Tools plugin how-to?

Plugins for SynWrite and CudaText...
Stem75
Posts: 55
Joined: 09.01.2024 15:29

Re: External Tools plugin how-to?

Post by Stem75 »

with dot cmd /c {ContentAsTemp}.cmd

'C:-___TEMP-cudatext-.text1..cmd' is not recognized as an internal or external command,
operable program or batch file.

without dot cmd /c {ContentAsTemp}cmd

'C:-___TEMP-cudatext-.text1.cmd' is not recognized as an internal or external command,
operable program or batch file.
main Alexey
Posts: 2265
Joined: 25.08.2021 18:15

Re: External Tools plugin how-to?

Post by main Alexey »

what is the target? run selected lines as CMD batch file?
if so i will try it soon.
Stem75
Posts: 55
Joined: 09.01.2024 15:29

Re: External Tools plugin how-to?

Post by Stem75 »

Basically yes.

Make a command with external tools --> CMD

make a button with plugins - config toolbar

write the script in editor

quick test - run the script without saving, just hitting the button. (better without having to select the text)
main Alexey
Posts: 2265
Joined: 25.08.2021 18:15

Re: External Tools plugin how-to?

Post by main Alexey »

okay. tried this on Win10. yes, confirmed - for untitled ui-tab this does not work.
only for named file it works.
ExternalTools plugin needs improvement to make it work with untitled ui-tab, ie macro {Content........} needs improvement to allow to set EXTENSION for temp file (now extension is empty).

currently the author of ExtTools is busy so I cannot ask him to add this. need some programmer.
maybe try to configure the 'Runner' plugin for this. alternative plugin Runner.
main Alexey
Posts: 2265
Joined: 25.08.2021 18:15

Re: External Tools plugin how-to?

Post by main Alexey »

[del]
Last edited by main Alexey on 15.01.2024 19:43, edited 1 time in total.
main Alexey
Posts: 2265
Joined: 25.08.2021 18:15

Re: External Tools plugin how-to?

Post by main Alexey »

okay. I made this tool.
I made new BAT file c:\work\r.bat.
this is the 'middle script' which has this code

Code: Select all

copy %1 c:\work\runsel.bat
c:\work\runsel.bat
now I changed the ExtTools plugin's tool like this:
- file name: cmd_exe (replace _ with dot)
- shell command: unchecked
- parameters: /c c:\\work\\r.bat {ContentAsTemp}

now my ExtTools tool works for untitled ui-tabs.
example untitled text:

Code: Select all

echo aa
echo bb
echo dd
result of ExtTools running:
C:\>copy C:\Temp\cudatext\.text3. c:\work\runsel.bat
1 file(s) copied.

C:\>c:\work\runsel.bat

C:\>echo aa
aa

C:\>echo bb
bb

C:\>echo dd
dd
Stem75
Posts: 55
Joined: 09.01.2024 15:29

Re: External Tools plugin how-to?

Post by Stem75 »

Nice. Thank you for the solution. It works here too.

I'll try with the Runner plugin also. WARNING! more questions coming. :)
Post Reply