How to use external tools from AkelPad?

English main discussion
  • Author
  • Message
DV
Offline
Posts: 1292
Joined: Thu Nov 16, 2006 11:53 am
Location: Kyiv, Ukraine

Post by DV »

It is assumed that when more than %f and %d is needed, the Scripts come in handy :)

Offline
Posts: 61
Joined: Thu Feb 04, 2016 5:27 am

Post by c-sanchez »

Haha come on, well the scripts is ok, but I think AkelPad must be have a method for active file without extension too, like other editors as Programmer's Notepad by example :P

Offline
Posts: 61
Joined: Thu Feb 04, 2016 5:27 am

Post by c-sanchez »

DV wrote:
c-sanchez wrote:3* Compile and then run current file
It's possible using the RunMe.js, applying the same technique as the one used in the RunMe's function run_pas.
E.g.

Code: Select all

function run_bas(filePathName, args) // 'args' is optional 
{ 
  var cmd1 = "C:\\freebasic\\fbc.exe "%n.%e""; // <-- compile
  var cmd2 = buildCommandWithOptionalArgs(""%n.exe"", args); // <-- run
  var cmd = "cmd /c " + cmd1 + " && " + cmd2;
  cmd = substituteVars(cmd, filePathName); // pre-process %f, %n etc.
  runCommand(cmd, getFileDir(filePathName));
}
Oh, so far is that I realize something, This command Compile and Run the file yes, but now I can't use "compile"
ie I can add a button/command to "compile" using just the log plugin, and other button/command with the "compile & execute" through runMe.js script. but then, how I can use the script with different commands for an same file extension?
In my case .bas, with commands to compile, compile and run, run (without compile), etc, etc
all this from same script, because until now the only thing that occurs to me is to use several "runme.js" with "bas" and different configurations, but that is a bit ugly :P

DV
Offline
Posts: 1292
Joined: Thu Nov 16, 2006 11:53 am
Location: Kyiv, Ukraine

Post by DV »

c-sanchez wrote:how I can use the script with different commands for an same file extension? In my case .bas, with commands to compile, compile and run, run (without compile), etc, etc
I don't have a solution for this yet.
The only thing that comes to my mind is to show e.g. a small dialog asking for a choice: whether you want to compile, or compile+run or run the already compiled program. Such dialog does not exist in the script and needs to be added to the script. I'd prefer someone else to do it :)

Offline
Posts: 61
Joined: Thu Feb 04, 2016 5:27 am

Post by c-sanchez »

heh i see, so yes RunMe.js script is limited to an action by extension, It would be nice have a solution for that later, let me know if you make something relate :)
Post Reply