mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
Re: Feature: On *:FILECHANGE:MyScriptSettings.txt: [Re: Protopia] #263694 05/09/18 06:05 PM
Joined: Feb 2003
Posts: 2,624
Raccoon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,624
Correct. And mIRC would keep tabs of its own changes to a file in order to discount some of those changes... such as when a script is edited or new /alias added or /enable|disable group is toggled or /set variable change or direct /write or /writeini and flushing /saveini... so on and so forth. I conceive that mIRC notes the file size/dates of all files under its custody before and after any of its own actions, which is why the daylight savings bug happened. Not because Windows alerted of a file change when the clock changed, but because there were suddenly date-time (calculation) mismatches when mIRC attempted any routine file activity. Like anything Khaled does, it's going to be a highly convoluted nest of patchwork code. wink (by his own admission! <3 )

Which may be why we don't see this feature quite yet.

But I really would like to write scripts that could detect when any of its constituent resources are modified from outside of mIRC, whether they be script config files (like a linux/bot .conf), or a theme /background image file, or when an external console process like wget.exe outputs a new entry to a file without hammering it with a /timer. A collection of settings files might only be changed once per month or never, but a /timer would have to relentlessly check on them every second or minute just in case.

(edit) On a side-topic. It would be nice to disable mIRC's file monitoring warning messages. I assumed it was disabled with 'Initialization Warning' but it's separate. I just considered a hack using mIRC's own 'Monitor File Changes' by creating a small remote script with an On Load event on top, followed by an open ended /* comment block so that everything that follows is ignored, whatever it is (like a wget output log). This works, but it inundates the user with a constant warning/confirmation dialog.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: Feature: On *:FILECHANGE:MyScriptSettings.txt: [Re: Raccoon] #263697 05/09/18 07:24 PM
Joined: Aug 2003
Posts: 232
P
Protopia Offline
Fjord artisan
Offline
Fjord artisan
P
Joined: Aug 2003
Posts: 232
Originally Posted By: Raccoon
A collection of settings files might only be changed once per month or never, but a /timer would have to relentlessly check on them every second or minute just in case.

(edit) On a side-topic. It would be nice to disable mIRC's file monitoring warning messages. I assumed it was disabled with 'Initialization Warning' but it's separate. I just considered a hack using mIRC's own 'Monitor File Changes' by creating a small remote script with an On Load event on top, followed by an open ended /* comment block so that everything that follows is ignored, whatever it is (like a wget output log). This works, but it inundates the user with a constant warning/confirmation dialog.

It was the monitoring warning messages that prompted me to create an autoScriptReloader script which reloads scripts whenever I save them from my external editor. But, as you will guess, it works on a 1 second timer. Hence my interest in this functionality.

P.S. Happy to share if you want a copy.

Page 2 of 2 1 2