我希望 AutoIt 激活 Firefox 中的特定选项卡.如何才能做到这一点? [英] I want AutoIt to activate a particular tab in Firefox. How can this be done?
本文介绍了我希望 AutoIt 激活 Firefox 中的特定选项卡.如何才能做到这一点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 Firefox 中打开了几个选项卡.我希望 AutoIt 激活 Firefox 中的特定选项卡.这怎么办?
I have several tabs open in Firefox. I want AutoIt to activate a particular tab in Firefox. How can this be done?
推荐答案
有一个名为 FF.au3.看起来你想要的函数是_FFTabSetSelected()
,祝你好运!
There's a UDF (User Defined Functions -include file) called FF.au3. Looks like the function you want is _FFTabSetSelected()
, good luck!
以下是 Jeanne Pindar 方法的示例.这就是我要做的.
Below is an example of Jeanne Pindar's method. This is the way I would do it.
#include <array.au3>
Opt("WinTitleMatchMode", 2)
activateTab("Gmail")
Func activateTab($targetWindowKeyphrase)
WinActivate("- Mozilla Firefox")
For $i = 0 To 100
If StringInStr(WinGetTitle(WinActive("")),$targetWindowKeyphrase) Then
MsgBox(0,"Found It", "The tab with the key phrase " & $targetWindowKeyphrase & " is now active.")
Return
EndIf
Send("^{TAB}")
Sleep(200)
Next
EndFunc
这篇关于我希望 AutoIt 激活 Firefox 中的特定选项卡.如何才能做到这一点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文