Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

pr0413

macrumors newbie
Original poster
Sep 19, 2009
1
0
I wanted a way to execute AppleScript without using Script Editor. Just like Terminal but I can't find a way. I decided to use iChat because that's the application I use most of the time. So I wanted to create a AppleScript so that I can send IM's to my AIM buddy, (a "bot") and it will execute the scripts. I wasn't sure on how to keep my script running. I have no idea how to do this in C++ or Objective-C so I resorted to AppleScript.

tell application "iChat"
set VarMessage to ---last sent message--- as string
if VarMessage is equal to "" then
---script to be executed---
end if
end tell

The problem with the iChat is that I can't find out a way to set a string to the last sent message. Also as I mentioned, I'm not sure how to keep this script running. Should I use repeat end repeat? Or what?

Greatly appreciated.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.