ie an option to execute or compile the current file on AkelPad with FreeBASIC.
by example Programmer's Notepad have a Tools option to do it.

How i can do something like that on AkelPad?
%f - active file
%d - directory of active file
%a - AkelPad's directory (i.e. contains AkelPad.exe)
%% - % symbol
%system variable% (i.e. environment variable)
Please show me how i can setup log pluginSkif_off wrote:Log plugin? Example: XMLStarlet.
Code: Select all
Run | Call("Scripts::Main", 1, "RunMe.js") | Ctrl + F9
Run2 | Call("Scripts::Main", 1, "RunMe.js", "1") | Ctrl + Shift + F9
Code: Select all
"bas" :
":run_bas(\"%f\")" ,
Code: Select all
function run_bas(filePathName, args) // 'args' is optional
{
var dir = getFileDir(filePathName);
var fileNameExt = getFileNameExt(filePathName);
var cmd = buildCommandWithOptionalArgs("C:\\freebasic\\fbc.exe \"" + fileNameExt + "\"", args);
runCommand(cmd, dir);
}
FAQ and AkelFiles\Docs\Log-Eng.txt.c-sanchez wrote:Please show me how i can setup log plugin
I think file must be saved (or it can be saved automatic before run).c-sanchez wrote:other details, the log file can check if the current file is or not saved?
Maybe VBS- or JS-script, like thisc-sanchez wrote:but maybe can something more as a quick run (temporary compilation and run)
have other variables? like current file without extension, current file extension, etc.
Thanks DV this work, although i need say this is not "friendly with the user" hehe, but is ok, works for what i need.DV wrote:A script RunMe.js ( http://akelpad.sourceforge.net/forum/vi ... 3010#13010 ) could be used for this.
The file RunMe.js must be placed under AkelPad's Plugs\Scripts subfolder and can be started via the Scripts plugin.
And I usually assign 2 shortcuts for it in the Hotkeys plugin, e.g.:In addition to this, the nature of the RunMe.js assumes each new external tool/compiler support needs to be added manually.Code: Select all
Run | Call("Scripts::Main", 1, "RunMe.js") | Ctrl + F9 Run2 | Call("Scripts::Main", 1, "RunMe.js", "1") | Ctrl + Shift + F9
In case of FreeBasic, the following needs to be added:
1. Find the "var oCommands = {" part of RunMe.js and add the following there (for example, before the line "bat cmd"):2. Then, under "// user-defined functions...", add:Code: Select all
"bas" : ":run_bas("%f")" ,
Code: Select all
function run_bas(filePathName, args) // 'args' is optional { var dir = getFileDir(filePathName); var fileNameExt = getFileNameExt(filePathName); var cmd = buildCommandWithOptionalArgs("C:\\freebasic\\fbc.exe "" + fileNameExt + """, args); runCommand(cmd, dir); }
I've tried that, but i got this error Can't execute command: D:\FreeBASIC\fbc.exe "f"Skif_off wrote:FAQ and AkelFiles\Docs\Log-Eng.txt.c-sanchez wrote:Please show me how i can setup log plugin
Most simple: Plugins > Log view > Output panel: button Run... http://fs5.directupload.net/images/170217/ljyutwy3.png
Or you can add menu item (like FreeBASIC item).
I think file must be saved (or it can be saved automatic before run).c-sanchez wrote:other details, the log file can check if the current file is or not saved?
Maybe VBS- or JS-script, like thisc-sanchez wrote:but maybe can something more as a quick run (temporary compilation and run)
have other variables? like current file without extension, current file extension, etc.
P.S. Some functions: GetExecExitCode(), GetExecState(), GetOutputWindowText() and SaveLineScroll()/RestoreLineScroll().
Nothing, same problemSkif_off wrote:c-sanchez
Sorry, I don't use this dialogTry double %: "%%f" and "%%d".
Code: Select all
Call("Log::Output", 1, `"D:\FreeBASIC\fbc.exe" "%f"`, "%d")
Haha yeah, i'm sorry, I just read it now, I've answered that question myselfopk44 wrote:what's a problem to read here: "\AkelFiles\Docs\Log-Eng.txt" ?
Althought i can't view modificable the default menu, i found is possible add custom entries on menu also* 4. How i can customize the main menu? (File, Edit, View, Options, Window, Help)
I know thanks to ContextMenu Plugin i can customize several menus, but i can only hide the main menu, i can't modify this.
I would like to add my own menu "Build" and on this "Compile, Run, Compile and Run, etc"
I must say that the way on how flexible/customizable is akelpad and also well done, is really incredible, wonderful.
But well, everyone here know this
It's possible using the RunMe.js, applying the same technique as the one used in the RunMe's function run_pas.c-sanchez wrote:3* Compile and then run current file
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));
}
Have akelpad some method to check active file without extension?Skif_off wrote:c-sanchez
Log plugin? Example: XMLStarlet.%f - active file
%d - directory of active file
%a - AkelPad's directory (i.e. contains AkelPad.exe)
%% - % symbol
%system variable% (i.e. environment variable)