| EverythingDigital | RSS Feed | Flickr Photos | What Is Podcasting? |


« EverythingDigital Podcast 2005-04-01 | Main | FlickrIt »

April 04, 2005

iChatterBot

I am happy to announce the release of my iChatterBot script. Upon startup, this app will choose a random name from your iChat A/V buddy list and IM that person in a semi-intelligent manner. You can customize what the bot will say, and who it will contact by downloading the source .scpt file, however, there is also a .app file available.

DOWNLOAD: iChatterBot | iChatterBot Source


--iChatterBot v.b1

--Created by Alan Joyce
--http://everythingdigital.org

--Licensed under Creative Commons 2005


set messagesSent to 0
repeat
if messagesSent is 0 then
tell application "iChat"
set buddyList to name of every account where status is available
set chatAccount to some item of buddyList
set chatMessage1 to "hey"
set chatMessage2 to "how's it going?"
set chatMessage3 to "cool, I'm not really doing much myself"
set chatMessage4 to "yeah, you think so?"
set chatMessage5 to "I agree"
set chatMessage6 to "what?"
set chatMessage7 to "no, I don't think so..."
set chatMessage8 to "really?"
set chatMessage9 to "so, I've got something really cool to tell you"
set chatMessage10 to "I am a bot"
--These messages can be customized to say anything.

set accountStatus to status of account chatAccount


if chatAccount is "Alan Joyce" then
--This should have your name as it appears in your buddy list in quotes
set chatAccount to some item of buddyList
else if accountStatus is available then

--set chatAccount to "Buddy Name"
--The two dashes at the beginning of the above line can be removed, and you can put the name of the buddy you want to have the bot IM in the quotes.

send chatMessage1 to account chatAccount
set chatWindow to "Instant Messages with " & chatAccount
set theWindow to chatAccount
delay 1
close window chatWindow

repeat
delay 1
set windowList to name of every window
if windowList contains theWindow then
delay 4
close window theWindow
send chatMessage2 to account chatAccount
exit repeat
end if
end repeat
delay 1
close window chatWindow

repeat
delay 1
set windowList to name of every window
if windowList contains theWindow then
delay 5
close window theWindow
send chatMessage3 to account chatAccount
exit repeat
end if
end repeat
delay 1
close window chatWindow

repeat
delay 1
set windowList to name of every window
if windowList contains theWindow then
delay 5
close window theWindow
send chatMessage4 to account chatAccount
exit repeat
end if
end repeat
delay 1
close window chatWindow

repeat
delay 1
set windowList to name of every window
if windowList contains theWindow then
delay 4
close window theWindow
send chatMessage5 to account chatAccount
exit repeat
end if
end repeat
delay 1
close window chatWindow

repeat
delay 1
set windowList to name of every window
if windowList contains theWindow then
delay 6
close window theWindow
send chatMessage6 to account chatAccount
exit repeat
end if
end repeat
delay 1
close window chatWindow

repeat
delay 1
set windowList to name of every window
if windowList contains theWindow then
delay 4
close window theWindow
send chatMessage7 to account chatAccount
exit repeat
end if
end repeat
delay 1
close window chatWindow

repeat
delay 1
set windowList to name of every window
if windowList contains theWindow then
delay 4
close window theWindow
send chatMessage8 to account chatAccount
exit repeat
end if
end repeat
delay 1
close window chatWindow

repeat
delay 1
set windowList to name of every window
if windowList contains theWindow then
delay 5
close window theWindow
send chatMessage9 to account chatAccount
exit repeat
end if
end repeat
delay 1
close window chatWindow

repeat
delay 1
set windowList to name of every window
if windowList contains theWindow then
delay 5
close window theWindow
send chatMessage10 to account chatAccount
exit repeat
end if
end repeat
delay 1
close window chatWindow

set messagesSent to 1
end if
end tell
end if
if messagesSent is 1 then
exit repeat
end if
end repeat

Posted by Alan Joyce at April 4, 2005 10:52 AM

Trackback Pings

TrackBack URL for this entry:
http://www.everythingdigital.org/cgi-bin/mt-tb.cgi/429

Comments

Post a comment




Remember Me?



(You must preview before you post. This is to prevent spam.)