mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2006
Posts: 5
C
CSC2YA Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Nov 2006
Posts: 5
I'm trying to do a basic script that simply messages chanserv to reset a channel topic:

The code i've got as a menu item to do this is:

Code:
set #4-irc topic: /msg chanserv topic #4-irc Welcome To 4-IRC. This Room Is ENGLISH ONLY !! For All Other Languages Please Join #TheWorld | The 4-IRC Website Is Now Online As Well As The WebChat. Please Feel Free To Visit And Sign Up On http://www.4-IRC.Com


However, due to the pipes, it reads the code as seperate parts when it executes the script obviously, and errors partway through.

I'm wondering if there's any way to turn off that part of how mirc scripting works temporarily, then turn it back on afterwards?

At the moment, i'm going into the script editor, copying the code into the clipboard, then pasting it in the status window, which works, but when running it as a script, it doesn't for obvious reasons.

Last edited by CSC2YA; 02/09/09 07:17 PM.
Joined: Jul 2006
Posts: 4,164
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,164
Use $(|) instead of simple |


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Nov 2006
Posts: 5
C
CSC2YA Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Nov 2006
Posts: 5
Thanks....I had the feeling it was possible, but didn't know how. You learn something new every day.

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
You can also use the line break identifier to chop up the command into segments:
Code:
set #4-irc topic: /msg chanserv topic #4-irc Welcome To 4-IRC. $&
This Room Is ENGLISH ONLY !! For All Other Languages Please Join #TheWorld $&
The 4-IRC Website Is Now Online As Well As The WebChat. $&
Please Feel Free To Visit And Sign Up On http://www.4-IRC.Com
The script will execute successfully like this.


Link Copied to Clipboard