mIRC Home    About    Download    Register    News    Help

Print Thread
#223495 26/07/10 03:38 PM
Joined: Apr 2010
Posts: 24
L
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


Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
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
Joined: Jun 2007
Posts: 933
5
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)

Joined: Apr 2010
Posts: 24
L
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?

Joined: Jun 2007
Posts: 933
5
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.

Joined: Oct 2003
Posts: 3,918
A
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"
Joined: Feb 2003
Posts: 3,432
S
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,.) }
Joined: Apr 2010
Posts: 24
L
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?

Joined: Dec 2002
Posts: 3,138
C
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.


Link Copied to Clipboard