mIRC Home    About    Download    Register    News    Help

Print Thread
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.

Joined: Jun 2003
Posts: 5,024
M
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
Joined: Dec 2002
Posts: 21
T
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) }
}

Joined: Sep 2003
Posts: 4,230
D
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?

Joined: Oct 2003
Posts: 3,918
A
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"
Joined: Feb 2005
Posts: 1
J
Mostly harmless
Offline
Mostly harmless
J
Joined: Feb 2005
Posts: 1
what is good with these site

Joined: Dec 2002
Posts: 208
H
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...
Joined: Sep 2003
Posts: 4,230
D
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.

Joined: Aug 2004
Posts: 147
N
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

Joined: Nov 2003
Posts: 2,327
T
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
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.

Joined: Jul 2003
Posts: 77
B
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

Link Copied to Clipboard