Page 1 of 1
Reload file silently, without asking
Posted: Tue Aug 17, 2021 4:28 pm
by redfox
Please, could you add an option to reload (a modified) file silently, without asking me, if I want to reload? I did not find an option to disable the popup message box.
I need this app for viewing log files, which are being modified continuously...
Re: Reload file silently, without asking
Posted: Tue Aug 17, 2021 6:56 pm
by Infocatcher
redfox wrote:Please, could you add an option to reload (a modified) file silently, without asking me, if I want to reload? I did not find an option to disable the popup message box.
For
Scripts plugin, silentlyReload.js:
Code: Select all
var hWndEdit = AkelPad.GetEditWnd();
AkelPad.SendMessage(hWndEdit, 3087 /*AEM_SETMODIFY*/, 0, 0);
AkelPad.Command(4104 /*IDM_FILE_REOPEN*/);
redfox wrote: I need this app for viewing log files, which are being modified continuously...
Or try
Log plugin.
Posted: Wed Aug 18, 2021 10:25 am
by redfox
Your code works (once), when executed manually from the Options menu.
My question: How to execute the script automatically on startup, and then peridodically every x seconds? Is there a command line option for that? Thx.
Regarding the Log Watch plugin, it cannot do a full file reload on modify, it is capable only to append lines at the end. If I change the file content at the beginning or middle, it is useless.
Posted: Wed Aug 25, 2021 7:07 pm
by Infocatcher
redfox wrote:My question: How to execute the script automatically on startup, and then peridodically every x seconds? Is there a command line option for that? Thx.
Periodically repeats are not trivial...
Some draft:
https://github.com/Infocatcher/AkelPad_ ... eloader.js
(may work wrong and remain running in some cases)
+ required
https://github.com/Infocatcher/AkelPad_ ... e/timer.js
Also see AkelHelp-Eng.htm:
Command line parameters -> /Call("Plugin::Function"[, additional parameters])
Manual settings -> CmdLineEnd