mIRC Home    About    Download    Register    News    Help

Print Thread
mIRC Doesn't save Variables upon Computer Shutdown #260119 03/03/17 12:45 PM
Joined: Jan 2017
Posts: 57
KubosKube Offline OP
Babel fish
OP Offline
Babel fish
Joined: Jan 2017
Posts: 57
My problem is rather straight-forward.

My computer automatically shuts down every Wednesday morning at 3 am. The code used to look like "shutdown.exe /r /t 5" I changed it to just "shutdown.exe /r" because using /t caused it to 'force' programs to quit. However, in both situations, I seem to be missing variables I've set over the past week when I wake up Wednesday morning.

What I'm trying to figure out is how to use a /timer in mIRC to shut down mIRC before my computer does.
I know timers can determine a specific time, such as 3am, but can timers also tell the day of the week? This is my biggest hurdle here.

tl;dr - I need to use an mIRC command to close mIRC 'nicely' so I don't lose variables when my computer automatically shuts down.

Re: mIRC Doesn't save Variables upon Computer Shutdown [Re: KubosKube] #260120 03/03/17 04:43 PM
Joined: Feb 2003
Posts: 2,787
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,787
You might try setting a timer that issues the command /saveini every 3600 seconds (hourly) or better. See if that works first. I used to have positive results with that 10 years ago.

To answer your question, if ($day == Wednesday) will happen on a Wednesday. Somebody just asked this on freenode ##mIRC a couple days ago. Maybe you?


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: mIRC Doesn't save Variables upon Computer Shutdown [Re: KubosKube] #260121 03/03/17 05:37 PM
Joined: Dec 2002
Posts: 5,035
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,035
Thanks for your post. I was able to reproduce this issue. mIRC processes the Windows WM_ENDESSION message (that tells an application that Windows is about to shut down). However, some aspects of the shutdown process in mIRC are slightly delayed (in order to handle custom dialogs, trigger exit scripts, and so on) and were not being performed as Windows terminated mIRC immediately. I have made a change that should resolve this issue in the next beta. In the meantime, the suggestion to use /saveini with a /timer should work.

Re: mIRC Doesn't save Variables upon Computer Shutdown [Re: Khaled] #260128 04/03/17 04:22 AM
Joined: Jan 2017
Posts: 57
KubosKube Offline OP
Babel fish
OP Offline
Babel fish
Joined: Jan 2017
Posts: 57
Originally Posted By: Raccoon
You might try setting a timer that issues the command /saveini every 3600 seconds (hourly) or better. See if that works first. I used to have positive results with that 10 years ago.

To answer your question, if ($day == Wednesday) will happen on a Wednesday. Somebody just asked this on freenode ##mIRC a couple days ago. Maybe you?


Thanks for the suggestion! I look forward to implementing this! smile I didn't ask that question on freenode earlier though. Never been on any other channel than Twitch's TMI.

Originally Posted By: Khaled
Thanks for your post. I was able to reproduce this issue. mIRC processes the Windows WM_ENDESSION message (that tells an application that Windows is about to shut down). However, some aspects of the shutdown process in mIRC are slightly delayed (in order to handle custom dialogs, trigger exit scripts, and so on) and were not being performed as Windows terminated mIRC immediately. I have made a change that should resolve this issue in the next beta. In the meantime, the suggestion to use /saveini with a /timer should work.


That's great news! I appreciate what you do for us Khaled. laugh