本質上,我需要用AppleScript解析CHAT CREATE命令的響應字符串以獲取chatid。響應的樣子:如何使用AppleScript解析Skype響應?
CHAT#my.username/$ 123abc456blah狀態MULTICHAT
我試圖
set chatid to item 2 of response
但回報 'H' - 我也試過
set chatid to word 2 of response
但是,返回'我的'。我想這對於知道AppleScript的人來說是一個簡單的問題。這裏是一個示例腳本...
tell application "Skype"
set response to (send command "CHAT CREATE username1, username2" script name "MyScript")
set chatid to ***WHAT GOES HERE?***
send command "ALTER CHAT " & chatid & " SETTOPIC Hello" script name "MyScript"
end tell
這樣做。謝謝! – 2009-11-09 22:17:07
請注意* AppleScript的文本項目分隔符*技巧非常快速無法讀取。非常好地評論你的代碼 – ZJR 2009-12-16 06:41:01