如何使用 AppleScript 创建 Adium 聊天选项卡

发布于 2025-01-07 06:14:04 字数 891 浏览 1 评论 0原文

我使用 AppleScript 脚本通过 Quicksilver 向我的联系人发送消息。它看起来与此类似(链接),但是要发送的行给联系人的消息是:

tell account of im_contact
    set newChat to make new chat with contacts {im_contact} with new chat window
end tell

即:要向 Anne 发送消息,请激活 Quicksilver,按“.”,键入 anne:我的消息,它将创建一个与 Anne 的新聊天窗口,其中包含键入的内容消息输入背景(我喜欢它在后台,因为我不希望新的聚焦窗口中断我的工作流程)。
问题是对于不同的联系人,它会创建不同的聊天窗口而不是选项卡。

我向 Adium 发送电子邮件寻求帮助,他们要求我尝试此操作,但没有成功:

tell account of im_contact
    set newChat to make new chat with contacts {im_contact} at end of chat window 1 with new chat window
end tell 

或者

tell account of im_contact
    set newChat to make new chat with contacts {im_contact} at end of chat window 1 
end tell 

如何修改此脚本以使其在后台创建选项卡而不是新的聊天窗口?

I use an AppleScript script to send msg to my contact through Quicksilver. It looks similarly like this (link), but the line to send the message to the contact is:

tell account of im_contact
    set newChat to make new chat with contacts {im_contact} with new chat window
end tell

i.e: to send a msg to Anne, activate Quicksilver, press '.', type anne: my message here and it will create a new chat window with Anne with the typed message in the background (I like it in the background since I don't want the new focused window to interrupt my workflow).
The problem is for different contacts, it creates different chat windows not tabs.

I emailed the Adium for help and they asked me to try this with no success:

tell account of im_contact
    set newChat to make new chat with contacts {im_contact} at end of chat window 1 with new chat window
end tell 

or

tell account of im_contact
    set newChat to make new chat with contacts {im_contact} at end of chat window 1 
end tell 

How can I modify this script to make it create tabs instead of new chat windows in the background?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

绝影如岚 2025-01-14 06:14:04

我用以下方法解决了这个问题:

set existing_window to first chat window
tell account of im_contact 
    to (make new chat with contacts {im_contact} at end of (chats of existing_window))
end tell

I solved this issue with:

set existing_window to first chat window
tell account of im_contact 
    to (make new chat with contacts {im_contact} at end of (chats of existing_window))
end tell
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文