I'm trying out adding a button that will basically run a script using AutoIt3_x64.exe. I've created a button, and added all the necessary arguments. The only thing I am having trouble with, is that when I click the toolbar button, it tries to open the AutoIt3_x64.exe file instead of running it. I haven't specified the full command, as I am unsure how it works.
Am I doing it the right way, or should I be using the External Tools plugin as stated on the wiki?
What I would like to do is replace SCiTe with CudaText, as it is far easier and much better to use imo.
The functions I would like replaced, though I am not really sure these are all possible, are:
1. SCiTe/Tools/Go command. Used to run a script.
2. Replace SCiTe console (bottom panel) output with CudaText. This shows any errors in the script.
3. Replace SCite/Tools/Compile command. This uses Aut2Exe.exe to compile a script.
So I need two buttons and confirmation all this is possible please.
Thanks.
Adding toolbar button to Run an AutoIT script
Adding toolbar button to Run an AutoIT script
Live for an ideal and leave no place in the mind for anything else.
-
- Posts: 2245
- Joined: 25.08.2021 18:15
Re: Adding toolbar button to Run an AutoIT script
you need one of two plugins: External Tools (easier for you) or Runner (harder, it needs config in JSON file).
the wiki shows examples of ExtTools plugin - how to run .exe apps.
https://wiki.freepascal.org/CudaText_plugins
item 1. ExtTools plugin or Runner plugin (harder than ExtTools).
item 2. plugin Terminal Plus or ExTerminal (2nd is easier)
item 3. like item 1.
the wiki shows examples of ExtTools plugin - how to run .exe apps.
https://wiki.freepascal.org/CudaText_plugins
yes, all this is possible.So I need two buttons and confirmation all this is possible please.
item 1. ExtTools plugin or Runner plugin (harder than ExtTools).
item 2. plugin Terminal Plus or ExTerminal (2nd is easier)
item 3. like item 1.
Re: Adding toolbar button to Run an AutoIT script
Ah, that's great, thanks!
I will likely get stuck, so will be back soon no doubt! lol
Thank you for your help
I will likely get stuck, so will be back soon no doubt! lol
Thank you for your help
Live for an ideal and leave no place in the mind for anything else.
Re: Adding toolbar button to Run an AutoIT script
After a hiccup, I have managed to get things back on track. I have the two buttons on the toolbar. Installed both plugins that you suggested:
ExtTools and ExTerminal, though I am unable to get the output panel to show anything when I run a script.
However, if I click Plugins/ExTerminal/CD to current file's directory, then it shows some output. This disappears when I then click the button again.
Is there a way to set it to automatically use the current file's directory?
While writing this, I updated from Cudatext v 1.218.0 to v1.219.0.2.
Now my Toolbar buttons have become enlarged: These were showing the icons at a size of 16x16. But now are around 30x30. I am using Fugue_16x16 icon set for non standard icons. The AutoIT icons are png's of 48x48.
It would be useful to be able to specify a size for toolbar icons to be shown at. Regardless of the size of the icon. It currently seems to be automatic?
As for the two AutoIT buttons, I have no idea how I get the Output Panel to work as desired. Here is a pic of the settings for the ExternalTools AutoIT3_x64.exe: Could you point out what I need to change please.
Thank you.
Also, is it possible to highlight errors in the Output Panel, similar to SCiTe? Currently, errors aren't shown/detected. Would be great to see where the problems lie.
ExtTools and ExTerminal, though I am unable to get the output panel to show anything when I run a script.
However, if I click Plugins/ExTerminal/CD to current file's directory, then it shows some output. This disappears when I then click the button again.
Is there a way to set it to automatically use the current file's directory?
While writing this, I updated from Cudatext v 1.218.0 to v1.219.0.2.
Now my Toolbar buttons have become enlarged: These were showing the icons at a size of 16x16. But now are around 30x30. I am using Fugue_16x16 icon set for non standard icons. The AutoIT icons are png's of 48x48.
It would be useful to be able to specify a size for toolbar icons to be shown at. Regardless of the size of the icon. It currently seems to be automatic?
As for the two AutoIT buttons, I have no idea how I get the Output Panel to work as desired. Here is a pic of the settings for the ExternalTools AutoIT3_x64.exe: Could you point out what I need to change please.
Thank you.
Also, is it possible to highlight errors in the Output Panel, similar to SCiTe? Currently, errors aren't shown/detected. Would be great to see where the problems lie.
Live for an ideal and leave no place in the mind for anything else.
-
- Posts: 2245
- Joined: 25.08.2021 18:15
Re: Adding toolbar button to Run an AutoIT script
ExtTools tool properties must have option which tells to put output to Output panel.>ExtTools and ExTerminal, though I am unable to get the output panel to show anything when I run a script.
maybe it's called 'Capture output' or like this.
did you set it?
no, ExTerminal has its own current folder so e.g. when you switch ui-tabs, its current dir is not affected.>ExTermilal.....Is there a way to set it to automatically use the current file's directory?
you should call 'Plugins/ExTerminal/CD to current file's directory'.
do you see this in clean Cud with only custom toolbar theme?>I updated from Cudatext v 1.218.0 to v1.219.0.2. Now my Toolbar buttons have become enlarged:
do you see this only if you add toolbar btns with 48x48 icons?
maybe smthing is changed in Lazarus.
ie imagelist sizes change when you add 48x48 icon.
its regression in 1.129 or other versions have it?
yes.>would be useful to be able to specify a size for toolbar icons to be shown at. Regardless of the size of the icon. It currently seems to be automatic?
try to toggle 'Shell command' checkbox.>Could you point out what I need to change please.
tool properties dlg has 'Pattern' option. press 'Set' near it, set regex there.>is it possible to highlight errors in the Output Panel, similar to SCiTe? Currently, errors aren't shown/detected.
some presets exists there AFAIR.
Re: Adding toolbar button to Run an AutoIT script
Sorry, no idea how. I can find nothing like that. I've also installed Terminal+ and that shows a terminal but no output is shown. I think I'll drop the idea as it's just way out of my league trying to set this up, and I don't want to take up too much of your time.main Alexey wrote: ↑15.11.2024 11:40ExtTools tool properties must have option which tells to put output to Output panel.>ExtTools and ExTerminal, though I am unable to get the output panel to show anything when I run a script.
maybe it's called 'Capture output' or like this.
did you set it?
It's a pita having to do this every time you switch tabs! Hence why I asked if it could be done automatically for the tab you are working on. Perhaps this should be an option? That way, you can select the one you prefer.no, ExTerminal has its own current folder so e.g. when you switch ui-tabs, its current dir is not affected.>ExTermilal.....Is there a way to set it to automatically use the current file's directory?
you should call 'Plugins/ExTerminal/CD to current file's directory'.
I think a better option would be to make this a user setting, as suggested. Allow users to specify a toolbar icon size.do you see this in clean Cud with only custom toolbar theme?>I updated from Cudatext v 1.218.0 to v1.219.0.2. Now my Toolbar buttons have become enlarged:
do you see this only if you add toolbar btns with 48x48 icons?
maybe smthing is changed in Lazarus.
ie imagelist sizes change when you add 48x48 icon.
its regression in 1.129 or other versions have it?
yes.>would be useful to be able to specify a size for toolbar icons to be shown at. Regardless of the size of the icon. It currently seems to be automatic?
I didn't try a new set up and trying to figure out how to get only the files needed so have left the icons at the size they are. It just takes too much time and hassle for me to check. Sorry, I just don't have the energy at present to check all that.
I can't even figure out how I got that window open, it's a bit of a mess how things are organised if I'm honest. Sorry, I just think it's really awkward finding anything. We have Plugins menu for some settings, Options menu for others, then many dotted about that open json files. I know CT is still a work in progress, and appreciate all your efforts. but one suggestion if I may, try to organise settings in a unified place.try to toggle 'Shell command' checkbox.>Could you point out what I need to change please.
[/quote]Um, yeah, I don't know regex so not happening. Think I'll have to stick with SCiTe, least for now. Thanks and sorry for taking up your time.tool properties dlg has 'Pattern' option. press 'Set' near it, set regex there.>is it possible to highlight errors in the Output Panel, similar to SCiTe? Currently, errors aren't shown/detected.
some presets exists there AFAIR.
Another small suggestion... It would be very useful having a close button on the Bottom Panel. This saves having a specific toolbar button or having to go to the Menu/View/Toggle Bottom Panel each time you want to close it.
Live for an ideal and leave no place in the mind for anything else.