Guides

 
 
 


Beginners Guide
(An applied scripting guide for Ircle)

 

 

This guide is an attempt to give users, who don't know AppleScript, never made any
scripts for ircle or even used a script with Ircle, a starting point for writing and using
their own scripts.

This guide will touch only a small part of the richness of the scripting possibilities from
Ircle and AppleScript simply because it is to much for a beginners guide.
So this is no way an attempt to make a full guide for learning AppleScript to the full length.

There are better resources on the internet like the AppleScript Language Guide from Apple that gives all the info you need.

We will take you on a quick tour around the very basics of AppleScript and we go further with some (handy) script examples which you can use right away.
These scripts go from an easy scripting level to a more difficult one.
We also provide the scripts used in this guide for download.

In this guide we will refer to the page numbers of the AppleScript Language Guide (ALG) when appropriate so you can dig out the subject at your leisure with first class info from Apple.
We will use the syntax : (ALG reference: page(s) <page number(s)>).

Enjoy your reading :)

-- Possible

 

NOTE: Some knowledge of the IRC commands is required to understand this guide.

 

Comments or suggestions on this guide can be send to possible@scriptersguild.com

 


Index
Chapter 1 : Ircle and scripts
How to use AppleScripts with Ircle

Chapter 2 : A scripting quickstart

What is AppleScript and how does it work...
The ScriptEditor
Talking to applications
How to let a script type in the channel
Displaying info on your screen
Using variables
Making scripts 'smarter'
Sending information to your scripts
Making a script recognize hostmasks
Using subroutines
Ircle handlers

Chapter 3 : Making scripts for Ircle

Msg command-alias script
Kick command-alias script
Channel bot login script
Random Color script
Autogreet script
Auto-DCC script for sounds
Simple FServer script
Auto-away script with message log
(smart) Ban-kick command-alias script

 

Chapter 1 : Ircle and scripts

 

How to use AppleScripts with Ircle

To use scripts with ircle you have to put the scripts in the scripts folder which you have set in the Ircle preferences.
(check the preferences help on this site for how to set it)

To execute a script in that scriptfolder you simply use the command character, which is normall the slash character, in front of the script name.

Example

To start a script with the name 'colorgreet' you type :

/colorgreet

Trying to execute scripts that has the same filename as an IRC command will not be executed.
Ircle will recognize the IRC command and sends the IRC command, so the script will not start.
For instance, if you have a script called 'invite' then the invite command will be send to the IRC server instead of executing the script called 'invite'.

Here you will find all your scripts from your script folder which you had set
the preferences of Ircle.
Choosing one of them will execute this script as well.

There are some scripts that are loadable scripts, wich means they have to be loaded in Ircle to make them work.

Example

To load the script with the name 'channelgreet' you type:

/load channelgreet 

To remove the loaded script you type:

/unload 

Ircle can only hold one script at a time so you don't have to give a script name when you unload.
You don't have to unload first to load another script. Ircle will do that for you.

 

TIP: When you hold the OPTION key when you choose the script menu in the menu bar then the script you choose will be loaded instead of executed.

 

Scripting Guide's

Index

Next chapter > > >


Nothing of this guide may be published without written consent of the author
© 2000-2005 Scripters Guild - Email : webmaster.