Reload file silently, without asking

English main discussion
Post Reply
  • Author
  • Message
Offline
Posts: 3
Joined: Tue Aug 17, 2021 4:23 pm

Reload file silently, without asking

Post 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...

Offline
Posts: 1876
Joined: Mon Aug 06, 2007 1:07 pm
Contact:

Re: Reload file silently, without asking

Post 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.

Offline
Posts: 3
Joined: Tue Aug 17, 2021 4:23 pm

Post 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.

Offline
Posts: 1876
Joined: Mon Aug 06, 2007 1:07 pm
Contact:

Post 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
Post Reply