Page 2 of 2

Posted: Tue Oct 09, 2018 8:55 am
by DV
It is assumed that when more than %f and %d is needed, the Scripts come in handy :)

Posted: Tue Oct 09, 2018 4:06 pm
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

Posted: Sat Oct 13, 2018 5:35 am
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

Posted: Wed Oct 17, 2018 1:52 pm
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 :)

Posted: Thu Oct 18, 2018 4:09 pm
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 :)