简体   繁体   English

AutoIt-Control点击Flash内容

[英]AutoIt - ControlClick on Flash content

Ok, I'm trying to automate closing multiple tickets on my job's ticketing system, which is browser based and built on flash (it's atrocious). 好的,我正在尝试在工作的票务系统上自动关闭多个票证,该系统是基于浏览器并基于Flash构建的(糟糕)。 Using the AutoIt v3 Window Info, I was able to get most of the information, but the clicks aren't registering. 使用AutoIt v3窗口信息,我可以获取大多数信息,但是单击并没有注册。 I understand that the window has to be active for ControlClick to work, but nothing progresses. 我知道该窗口必须处于活动状态才能使ControlClick正常工作,但是没有任何进展。

Code: 码:

While 1
$msg = GUIGetMsg()
Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $AutoClose
        $NumTickets = GUICtrlRead($NumTicketsBox)
        $iState = 1
        $i = 0
    Case Else
        If $iState = 1 Then
            If $i >= $NumTickets Then
                $iState = 3
                ContinueLoop
            EndIf
            ControlClick("[CLASS:MacromediaFlashPlayerActiveX]", "", "", "left", 1, 143, 474)
            $iState = 2
            $iTimer = TimerInit()
        ElseIf $iState = 2 Then
            If TimerDiff($iTimer) < 2000 Then ContinueLoop
            ControlClick("[CLASS:MacromediaFlashPlayerActiveX]", "", "", "left", 1, 700, 337)
            $iTimer = TimerInit()
            $i = $i + 1
            $iState = 1
        ElseIf $iState = 3 Then
            If TimerDiff($iTimer) < 1000 Then ContinueLoop
            If $i <= 0 Then
                $iState = 1
                ContinueLoop
            EndIf
            ControlClick("[CLASS:MacromediaFlashPlayerActiveX]", "", "", "left", 1, 59, 337)
            $iTimer = TimerInit()
            $i = $i - 1
        EndIf
EndSelect
WEnd

And this is the output of the >>>> Control <<<< section of the Window Info: 这是窗口信息的>>>>控件<<<<部分的输出:

>>>> Control <<<<
Class:  MacromediaFlashPlayerActiveX
Instance:   1
ClassnameNN:    MacromediaFlashPlayerActiveX1
Name:   
Advanced (Class):   [CLASS:MacromediaFlashPlayerActiveX; INSTANCE:1]
ID: 172092576
Text:   
Position:   8, 194
Size:   760, 620
ControlClick Coords:    59, 339
Style:  0x56000000
ExStyle:    0x00000000
Handle: 0x0002117A

Any help would be greatly appreciated. 任何帮助将不胜感激。

----EDIT---- - - 编辑 - -

The closest thing I can come up with to a similar solution is located here: http://www.autoitscript.com/forum/topic/94736-noob-controlclick/ but this doesn't appear to be working for me. 我可以找到与最接近的类似解决方案最接近的内容: http : //www.autoitscript.com/forum/topic/94736-noob-controlclick/,但是这似乎不适用于我。 Once again, any help would be appreciative. 再一次,任何帮助将是感激的。

试试这个

ControlClick("[CLASS:MacromediaFlashPlayerActiveX]", "", 172092576, "left", 1, 700, 337)
Opt("WinTitleMatchMode", 2) ; 2=subStr
$sTitle = "Mozilla"
ControlClick($sTitle, "", "[CLASSNN:MacromediaFlashPlayerActiveX1]", "primary", 1, 700, 337)            

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM