Hotline 0913 208 357 - Tel/Fax (028) 3885 6879

Mirc — Script Examples

Build a script that automatically skips a set of participants: command ignore-list var %ignore-list = user1,user2,user3 var %i = 1 while (%i <= $len(%ignore-list)) var %user = $gettok(%ignore-list,%i,44) ignore add %user inc %i That script will exclude a set of users listed in the %ignore-list parameter. Advanced mIRC Script Illustrations Following are a few more advanced mIRC script examples: Demo 6: Personal Command Write a custom command that performs a set of operations: alias custom-command /msg $chan !command1 /msg $chan !command2 /msg $chan !command3 That script will run a sequence of commands when you enter /custom-command. Example 7: Third-party Service Integration Develop a routine that connects with an third-party service, for as a web API: function weather var %city = $1 var %url = http://api.openweathermap.org/data/2.5/weather?q=%city var %response = $sockread(%url) echo -a Weather in %city: %response The program will get the conditions for a given location using the OpenWeatherMap API. Summary

Aliases: Aliases are shortcuts that can be used to execute a script or a series of commands. Scripts: Scripts are files that contain a series of commands that can be executed automatically. Events

mIRC scripting is a powerful way to automate your IRC experience and customize your client. With these mIRC script examples, you can get started with scripting and take your IRC experience to the next level. Whether you’re a beginner or an advanced user, there’s always something new to learn in the world of mIRC scripting. Resources mirc script examples

Automating repetitive tasks Customizing your IRC client Integrating with external services Enhancing your IRC experience

mIRC Scripting Illustrations Below are a few irc scripting examples to get you started: Demo 1: Basic Shortcut Create a minimal nickname who prints “Hey, world!” in the present channel: cmd hi echo -a Hello, all! To run this shortcut, merely input /hi in your mIRC client. Demo 2: Auto-Response Scripted Define a program who automatically responds to a specific pattern: when *:MSG:!hello*:#: if ($nick != $me) say $chan Hey, $nick! This program shall respond with “Hey, $nick!” whenever anyone enters “!hey” in the chat. Example 3: Personalized Alias Make a script which sets your nickname to a custom identifier once you connect to a room: when *:CONNECT:#: setnick MyNick This script would update your nickname to “NewNick” upon you enter a room. Sample 4: Chat Logger Create a script which records all room traffic to a log: on *:TEXT:*:#: append -o room.log $timestamp $nick: $1- This routine shall save all chat traffic to a document called “channel.log”. Demo 5: Block Roster Build a script that automatically skips a set

FAQs

mIRC Scripting Guide: https://www.mirc.com/scripting/ mIRC Scripting Tutorials: https://www.mirc.com/tutorials/ Summary Aliases: Aliases are shortcuts that can be

Q: What is the best way to learn mIRC scripting? A: The best way to learn mIRC scripting is to start with basic scripts and gradually move on to more advanced ones. You can also check out online tutorials and resources. Q: Can I use mIRC scripting to automate tasks on other IRC clients? A: No, mIRC scripting is specific to the mIRC