【问题标题】:How can you send text to a Google Hangouts window then alt-tab to another window and keep on sending text to the minimized window, in AutoHotKey?如何将文本发送到 Google Hangouts 窗口,然后 alt-tab 到另一个窗口并继续在 AutoHotKey 中将文本发送到最小化窗口?
【发布时间】:2020-05-30 18:32:51
【问题描述】:

我想在 Google Hangouts 中向我的朋友(我是个好朋友,我知道哈哈哈)发送垃圾邮件。扭曲的是,我希望 alt-tab 到另一个窗口,并且我希望垃圾邮件发送者在后台运行以向我的朋友发送垃圾邮件。这是我的代码:

#NoEnv
#SingleInstance Force
SetBatchLines -1 ; maximum speed

^!m:: ; Ctrl + Alt + m: starts the spammer
sleep 500
BreakLoop := 0 ; 0 - Don't break the loop, 1 - Break the loop
Loop {
    if (BreakLoop = 1) {
        BreakLoop := 0
        break

    }
    ControlSend,, text to spam, Google Hangouts - Google Chrome ; types the text
    ControlSend,, {enter}, Google Hangouts - Google Chrome ; sends the text
    sleep 5000 ; spams every 5 seconds
    return
}


Esc:: ; stops the spammer
    BreakLoop := 1
    sleep 500
    return

问题是我无法让它工作。当我 alt 选项卡到另一个窗口时,它不会发送或键入文本。我该如何解决?提前致谢,如果我的代码乱七八糟,我很抱歉。另外,我使用的是最新版本的 AutoHotKey。

【问题讨论】:

    标签: google-chrome autohotkey


    【解决方案1】:

    简短的回答是,这对于 AHK 来说是不可能的。 AutoHotkey 模拟键盘和鼠标输入,虽然您可以通过 JavaScript 调用获得更高级的功能,但环聊窗口本身仍然需要成为 AutoHotkey 生成的任何文本输入的活动窗口,并且您不能使用键盘/鼠标在它做它的时候。

    您最好在 Gmail 的 Hangouts 网络客户端中通过 Javascript 执行此操作,或者您知道,完全不要向人们发送垃圾邮件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-04-28
      • 1970-01-01
      • 1970-01-01
      • 2012-09-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-11-13
      相关资源
      最近更新 更多