Page 1 of 1
Mark
Posted: Wed Jul 22, 2026 6:53 pm
by sexy96
How do I highlight text from a .js script?
How do I select a specific MARK color from a .js script?
How do I read the number of open documents in .js?
Re: Mark
Posted: Tue Jul 28, 2026 8:03 am
by DV
Regarding the highlight/mark, the very first example inside "AkelPad\AkelFiles\Docs\Coder-Eng.txt" mentions that:
Code: Select all
Call("Coder::HighLight", 2, "#RRGGBB", "#RRGGBB", FLAGS, FONTSTYLE, ID, "TEXT", TEXTLENGTH)
Parameters:
2
Mark selected or specified text. Multiline text not supported.
...
Example:
Call("Coder::HighLight", 2, "#000000", "#9BFF9B", 1, 0, 1)
Regarding the number of open documents, refer to the "AkelDLL.h" as the the source of truth:
https://sourceforge.net/p/akelpad/codes ... /AkelDLL.h
You may use
specifying one of these flags:
Code: Select all
//AKD_FRAMESTATS flags
#define FWS_COUNTALL 0 //Count of windows. lParam not used.
#define FWS_COUNTMODIFIED 1 //Count of modified windows. lParam not used.
#define FWS_COUNTSAVED 2 //Count of unmodified windows. lParam not used.
#define FWS_CURSEL 3 //Active window zero based index. lParam not used.
#define FWS_COUNTNAMED 4 //Count of named windows. lParam not used.
#define FWS_COUNTFILE 5 //Count of file in different frames. (wchar_t *)lParam is full file name string.
Here is an example:
Code: Select all
SendMessage(hMainWnd, AKD_FRAMESTATS, FWS_COUNTALL, 0);