AppleScript 'make new text chat' cannot sign into Jabber chat room
| Originator: | morgan.aldridge | ||
| Number: | rdar://10473199 | Date Originated: | 18-Nov-2011 06:48 PM |
| Status: | Open | Resolved: | |
| Product: | Mac OS X | Product Version: | 10.7.2 |
| Classification: | Major Bug | Reproducible: | Always |
18-Nov-2011 06:48 PM Morgan Aldridge:
'JoinChatRoom.applescript' was successfully uploaded
18-Nov-2011 06:48 PM Morgan Aldridge:
Summary:
In Mac OS X 10.7.2, an AppleScript call to iChat to "make new text chat with properties {name: ..., chat type:chat room, service:...}" would successfully open log the user into the chat room, but under Lion it fails to do so. It creates an hidden window for the chat which can only be brought to the foreground by the user (not programmatically via AppleScript). Even then they must manually click the "Rejoin Chat" button and can open the participants drawer, send chats, and hear received chats, but they cannot see chat window contents until minimizing & un-minimizing the window. This defeats the purpose of automating opening chat windows.
Steps to Reproduce:
1) Launch iChat & configure a Jabber account to the chat.smalldog.com server (or another Jabber server, but edit the script for such a case).
2) Run the attached JoinChatRoom.applescript file which will do the following:
a) Activate iChat.
b) Verify that you have a "chat.smalldog.com" (or other, if you edit the script) Jabber service.
c) Ensure that you're not already in the named chat room.
d) Then attempt to join the named chat room with the following command ("chatRoomName" having a valid chat room name stored in it & "theService" being a valid service):
make new text chat with properties {name:chatRoomName, chat type:chat room, service:theService}
Expected Results:
That chat room window should open in iChat and you should be able to see conversation there & participate in conversation there.
Actual Results:
1) If you had run this from AppleScript Editor, you would get the events output found in the attached JoinChatRoom-output.txt file.
2) Notice that the chat room window never opens.
3) Select the named chat room window (which is not visible on screen) from iChat's Window menu.
4) Notice that it's not actually signed into the chat room.
5) Click the "Rejoin Chat" button.
6) Notice that you now have a text input field.
7) Select View -> Show Chat Participants to show the other participants of the chat room and confirm that you are logged into the chat room.
8) Type "test" into the text input field and hit the return key.
9) Notice that you can hear the sound for the message being posted in the chat room & can confirm that others in the chat room will have received the message, but you cannot see anything in that chat room window.
10) Minimize the chat room window to the Dock.
11) Expand the chat room window from the Dock.
12) Note that you can now see the contents of the chat room.
Regression:
In Mac OS X 10.5.x & 10.6.x, this would correctly open the chat window, but in 10.7.2 (and 10.7.0) it no longer does.
Notes:
If you log the window ID of the window that's created, it is "-1". If you try to change the visible state via AppleScript, it'll fail with error.
18-Nov-2011 06:49 PM Morgan Aldridge:
'JoinChatRoom-output.txt' was successfully uploaded
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!