mIRC Home    About    Download    Register    News    Help

Print Thread
Scripts not responding #223495 26/07/10 03:38 PM
Joined: Apr 2010
Posts: 24
L
lassyakjedi Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Apr 2010
Posts: 24
Hi guys,
I have a funny little problem with my mirc(i think)
When eve i add new scripts to the script editor ,some scripts dont work.
So i was wondering is there any particular way of adding scripts to the script editor?
Example:
on *:TEXT:!calc *:#: msg $chan $nick $+ : The answer is $calc($2-)

Next i add
ON *:TEXT:bye everyone:#: {
msg $chan cya $nick ^^
}

Now when i add the second one the !calc script dosn't respond frown


Re: Scripts not responding [Re: lassyakjedi] #223496 26/07/10 04:31 PM
Joined: Apr 2010
Posts: 957
F
FroggieDaFrog Offline
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 957
open the scripts editor, click file -> click "new" -> paste new code in fresh editbox, click ok

laugh

Last edited by FroggieDaFrog; 26/07/10 04:32 PM.

I am SReject
My Stuff
Re: Scripts not responding [Re: lassyakjedi] #223497 26/07/10 04:34 PM
Joined: Jun 2007
Posts: 933
5
5618 Offline
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
Those two on TEXT events should work perfectly fine, since their matchtext sections do not overlap.
If you would do something like:
Code:
on *:TEXT:hello *:#: command
on *:TEXT:hello people:#: command
...then the second one wouldn't trigger since it would already be dealt with by the first.

1) make sure you don't have any scripts loaded that already respond to your new script's matchtext
2) make sure all scripts are aligned properly (all { } and match up for instance)
3) make sure your matchtext is correct (e.g. don't you need wildcards, is the person triggering the script perhaps using colour/bold)

Re: Scripts not responding [Re: 5618] #223498 26/07/10 04:49 PM
Joined: Apr 2010
Posts: 24
L
lassyakjedi Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Apr 2010
Posts: 24
Hey thanks smile
i tried loading the scripts in a new script editor window and worked perfectly fine.
Also, can we have have 2 script editing windows loaded at the same time ,so that all the scripts in the first window can carry on running as usual?

Re: Scripts not responding [Re: lassyakjedi] #223502 26/07/10 05:47 PM
Joined: Jun 2007
Posts: 933
5
5618 Offline
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
You cannot have two script window open at the same time.
However, "can carry on running as usual" doesn't really apply, I think.
Script changes do not take effect until you press the Ok button or until you switch over to another tab in the editor window.

Re: Scripts not responding [Re: 5618] #223504 26/07/10 06:34 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
It's not necessary to press "Ok" and close the editor to effect changes. You can also hit Ctrl-s (File -> Save) to save the file, which will immediately update mIRC without closing the editor.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: Scripts not responding [Re: lassyakjedi] #223531 27/07/10 02:28 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Why not use:
Code:
on *:text:*:#: {
 if ($1 == word1) { do stuff }
 elseif ($1 == word2) { do stuff }
 elseif ($1 == word3) { do stuff }
}

This way you only need 1 on text event for all words you want to add.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Scripts not responding [Re: argv0] #223643 31/07/10 05:25 AM
Joined: Apr 2010
Posts: 24
L
lassyakjedi Offline OP
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Apr 2010
Posts: 24
Originally Posted By: argv0
It's not necessary to press "Ok" and close the editor to effect changes. You can also hit Ctrl-s (File -> Save) to save the file, which will immediately update mIRC without closing the editor.

Hmm i thought only after you press 'ok' your scripts will work?

Re: Scripts not responding [Re: lassyakjedi] #223644 31/07/10 05:28 AM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
There are a number of ways to make mIRC run newly-entered scripts. Ctrl+S, Ctrl+H (Check Brackets) and toggling between tabs/files all work.