mIRC Home    About    Download    Register    News    Help

Print Thread
controlling the mIRC payload (multi threading) #109980 03/02/05 04:41 PM
Joined: May 2003
Posts: 32
Q
quizer Offline OP
Ameglian cow
OP Offline
Ameglian cow
Q
Joined: May 2003
Posts: 32
when my mIRC preforms a long procedure (alias) it gets stuck, the OS "thinks" that mIRC is not responding (it is not in an endless loop), mIRC doesn't echo anything- and I don't know the progress of the operation (no /echo).
the operation I am doing is long, and requirs from mIRC about 150 secs of proccesing.
when the mIRC changes the file it is currently proccesing it is scripted 2 echo that, but the echo is disabled when mIRC is doing some long operations. When mIRC completes its operation then all the echos r displayed at once.
My workaround 4 that problem (reporting status while "not responding") is 2 open a new mIRC instance, and use the OS's DDE capability 2 send the status information 2 the new instance 2 echo it there. Using sockets 4 the same purpose is also applicable.

the feature suggestion is 2 think about a way 2 solve that issue.
My idea 4 solving that is to embedd some of the multithreading capabilities from the OS into the scripting language. or mayb just a simple command such as "/pause -m <N>" when N is the number of seconds (-m 4 ms's) that the current script should pause proccesing. Implement it with /timer requires 2 save the binary data, and the local variables, as well as restoring the contents of some global variables that have been changed by the remote script during the pause duration.

My suggestion 4 the problem mayb stupid, and not applicable, but solution 4 that problem is a required feature.

10x in advance, Gaby.

p.s.: sorry 4 my English, but its enough 2 understand the mIRC help file.

Re: controlling the mIRC payload (multi threading) #109981 03/02/05 05:31 PM
Joined: Jun 2003
Posts: 5,024
M
Mentality Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
This sort of thing has been suggested before, a /sleep alias was made by Online (I think there have been others too) - Online's can be found here though.

P.S. Your English is fine, the hardest thing about reading your post is the fact that you replace 'to' and 'for' with '2' and '4', which is nothing to do with not knowing English :tongue:

Regards,


Mentality/Chris
Re: controlling the mIRC payload (multi threading) #109982 03/02/05 07:36 PM
Joined: Dec 2002
Posts: 21
T
Techster Offline
Ameglian cow
Offline
Ameglian cow
T
Joined: Dec 2002
Posts: 21
The way I always got around this, was to use an alias with parameters for the current position. Then call that alias with a timer at the end of itself if it needed to process more. Yeah, it will take a bit longer to do, but it doesn't stop mIRC from processing events.

Quick and dirty example, started with /test 1...
Code:
alias test {
  echo -es Count $1
  if ($1 &lt; 10) { .timer 1 0 test $calc($1 + 1) }
}

Re: controlling the mIRC payload (multi threading) #109983 03/02/05 07:37 PM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
What are you doing thats taking 150 seconds to complete?, Is it One mirc command, or one section of a script? I ask becuase you say you can get a responce from the other mirc so I would have thought its a script, and if it is maybe you can just interupt it, with a WhileFix.dll or a timer delay?

Re: controlling the mIRC payload (multi threading) #109984 04/02/05 12:34 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
There is generally no need to implement a /pause or /sleep. /timers can do the same thing, its just another method.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: controlling the mIRC payload (multi threading) #109985 04/02/05 12:43 AM
Joined: Feb 2005
Posts: 1
J
JayMoney Offline
Mostly harmless
Offline
Mostly harmless
J
Joined: Feb 2005
Posts: 1
what is good with these site

Re: controlling the mIRC payload (multi threading) #109986 04/02/05 03:20 AM
Joined: Dec 2002
Posts: 208
H
Hrung Offline
Fjord artisan
Offline
Fjord artisan
H
Joined: Dec 2002
Posts: 208
I have no objection to adding a /pause command, or something along those lines. Anybody that has spent a decent amount of time writing mirc script will know that there are usually at least 2 or 3 different ways of doing any given thing. Why else would we have goto and while? Or /tokenize and $gettok? Or /set %var and %var =? Just because there's already a way to do something, doesn't mean that we can't have another method. In some cases, it is just easier or more efficient to use one method than another.

For the time being, though, timers work just fine, as long as you are careful to write your code in a semi-convoluted fashion.


If I knew now what I will know then... maybe things will have been different...
Re: controlling the mIRC payload (multi threading) #109987 04/02/05 06:27 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
I would say tho, it would be nice if internal events at least could still be processed, even if scripted events were ignored. IE: dcc gets or sends not fail while a overly large mirc "freeze" is in process, maybe server pings responded to to keep you connected. Other stuff i guess can be left to run after the "freeze" is over. I mean there are some freezes that you just cant script around well not without reinventing the wheel at least.

Re: controlling the mIRC payload (multi threading) #109988 04/02/05 08:59 PM
Joined: Aug 2004
Posts: 147
N
nalAAlan Offline
Vogon poet
Offline
Vogon poet
N
Joined: Aug 2004
Posts: 147
there is a whilefix dll on www.mircscripts.org that stops mIRC from freezing

Re: controlling the mIRC payload (multi threading) #109989 04/02/05 09:13 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
It also slows down loops, it's not as good as multi-threading capabilities would be.


New username: hixxy
Re: controlling the mIRC payload (multi threading) #109990 12/02/05 04:40 PM
Joined: May 2003
Posts: 32
Q
quizer Offline OP
Ameglian cow
OP Offline
Ameglian cow
Q
Joined: May 2003
Posts: 32
I don't want the /sleep to pause the proccesing and execute the events waiting- I want "/echo" to work even in long operations. the method to implement it is ur side.

Re: controlling the mIRC payload (multi threading) #109991 21/02/05 11:12 PM
Joined: Jul 2003
Posts: 77
B
bamaboy1217 Offline
Babel fish
Offline
Babel fish
B
Joined: Jul 2003
Posts: 77
actually there is almost no slow down outside of the calls to the windows msg loop and letting the mIRC winproc do what it needs to do during a PeekMessage call. WhileFix is your best bet if you dont wanna use timers in my opinon at least...


hmmm signed by me