image
image

Go Back   macosx.com > Design, Media, Programming & Scripting > Software Programming & Web Scripting

Reply
 
Thread Tools
  #1  
Old March 22nd, 2004, 09:56 AM
Registered User
 
Join Date: Nov 2000
Posts: 948
Thanks: 0
Thanked 0 Times in 0 Posts
kainjow is on a distinguished road
Arrow iChat screen name via AppleScript

I am trying to get the screen name that is logged in on iChat using AppleScript and can't figure out how (or maybe it's not possible?).

This code works for me on iChat AV Beta 2.1 (v151) with 3 different screen names:

tell application "iChat"
set a to (handler of every account in (every service where name is "AIM") where status is available or status is away or status is idle)
display dialog last item in a as string
end tell

However a few other people have reported this code doesn't work and I am not able to test it out on other machines. Can anyone tell me if this shows your screen name? And what iChat version you're running?

(I'm writing a new iChat utility program...beta soon)
Reply With Quote
  #2  
Old March 22nd, 2004, 12:18 PM
I Switched.
 
Join Date: Mar 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
frdumlao is on a distinguished road
I tested the script on my iBook and it works fine. I am running 10.3.3 and iChat Version 2.0 (v145). However, I did notice that if you run the script while iChat is not running, it will open iChat and not give you the alert window. You should add an if statement to open the app first in case it's not open, then it should work perfectly.
Reply With Quote
  #3  
Old March 23rd, 2004, 04:53 PM
iZero's Avatar
Registered User
 
Join Date: Jun 2003
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
iZero is on a distinguished road
nice let me know how it comes out, i would like to try it(beta test it even , cheers.,
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 03:12 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.