mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2006
Posts: 4,149
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
When you use sendmessage() from an external application to call /reload on a file (a typical external editor) which has an alias of the form:
Code:
alias mainloop {

.timermainloop -ho 1 10 mainloop
}
when the timer is running and you reload, sometimes mIRC will report that the alias cannot be found.
To reproduce you can use mSLDev, available here
Put the code above in a remote file and in mSLDev, just keep hitting control + s.
I don't really understand how this can be happening because mIRC isn't multi threaded and the /reload routine should always finish before timer message are processed from the message loop.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
Can you provide the exact SendMessage() that mSLDev is sending? I tried setting up my own external Sendmessage() on a timer that passed a "/reload" command to reload the script that included your mainloop timer, with the mainloop timer running, and was not able to reproduce this.

Joined: Jul 2006
Posts: 4,149
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
I cannot, I don't have access to the source, only Wiz126 on this forum knows. Though there should not be anything fancy going on, just a /reload -rs "completefilename".
Did you try mSLDev yourself? If you can reproduce I suppose you could actually see what is being sent by debugging mIRC.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
I have not been able to reproduce this with mSLDev so far. I also performed more intensive tests with your timer loop and an external SendMessage() using /reload -rs filename and was not able to reproduce the issue.

Is it possible that the file is not being reloaded at all sometimes? eg. if the file is locked by anti-virus software that is scanning it?

Joined: Jul 2014
Posts: 34
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Jul 2014
Posts: 34
I have also faced this situation countless times.

I was able to replicate the problem multiple times, by doing the following: calling the command /main_loop inside mIRC, then in mSLDev deleting the "{" after the word main_loop, next I would type the "{", so that the script wont break, and save the file. (Which is just a simple edit to the file and saving.) If you check mIRC, the following line will be displayed in the status window: * /main_loop: not connected to server

Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
Unfortunately I have not been able to reproduce this here. I have just tried again and, with the mainloop timer running in mIRC, edited and saved the file with the mainloop alias in mSLDev forty or fifty times without any issues being reported in mIRC.

If you test this in a clean copy of mIRC, installed a new, empty folder, with no other aliases/scripts loaded, do you see the same issue?

Are you using anti-virus software? If so, which type? If you disable it, do you see the same issue?


Link Copied to Clipboard