Jump to content
Sign in to follow this  
AzgarD

ControlClick() In FlashPlayer problem

Recommended Posts

AzgarD
Posted (edited)

Hello guys. I'm trying to send control left click to a background inactive window, but isn't working.

HotKeySet("{F2}", "StartStop")
HotKeySet("{F3}", "ExitProg")
$On = False
Func StartStop()
    $On = True
 EndFunc
 Func ExitProg()
    Exit
    EndFunc

While 1
    While $On = True
        ControlClick("MicroPower Learning - A Oi - Windows Internet Explorer","","","left",1,666,293)
            Sleep (100)
    WEnd
WEnd

Simple code, has to do only this, but he only works when the window is active.
P.S.: About the code. How can i make him work with just a piece of the window title? Like "MicroPower Learning", and not the full name since that complement can change.

AutoIt Window Info:

Spoiler

 

>>>> Window <<<<
Title:    MicroPower Learning - A Oi - Windows Internet Explorer
Class:    IEFrame
Position:    -8, -8
Size:    1382, 744
Style:    0x17CF0000
ExStyle:    0x00000100
Handle:    0x0000000000320418

>>>> Control <<<<
Class:    MacromediaFlashPlayerActiveX
Instance:    1
ClassnameNN:    MacromediaFlashPlayerActiveX1
Name:    
Advanced (Class):    [CLASS:MacromediaFlashPlayerActiveX; INSTANCE:1]
ID:    321460920
Text:    
Position:    2, 31
Size:    1362, 650
ControlClick Coords:    666, 293
Style:    0x56000000
ExStyle:    0x00000000
Handle:    0x000000000016082E

>>>> Mouse <<<<
Position:    668, 346
Cursor ID:    0
Color:    0xFFFFFE

>>>> StatusBar <<<<
1:    Concluído
2:    
3:    
4:    
5:    
6:    
7:    
8:    
9:    
10:    

>>>> ToolsBar <<<<

>>>> Visible Text <<<<
Barra de Navegação
http://www.oiconhecevarejo.com.br/performa/WebCds/cds.aspx?action=launch&ERL=FF597A08-C980-4E07-B4E5-DD5B1F36C24C&SID=2zp151grrrrrmzmlira00nhy&AL=True&ResumeMode=CP&DCM=ALL&TzOffSet=-3&ServerID=1&LID=00000000-0000-0000-0000-000000000000
Controle de Combinação de Endereços
Controle de Páginas
MicroPower Learning - A Oi - Windows Internet Explorer
Concluído
Nível de Zoom


>>>> Hidden Text <<<<
Barra de Comandos
Barra de Comandos de Favoritos
LinksBand
Barra de Favoritos
Adicionar à Barra de Favoritos
ITBarHost
Barra de Menus

 

 

Edited by AzgarD

Share this post


Link to post
Share on other sites
TheXman
Posted (edited)
On 6/22/2018 at 3:34 PM, AzgarD said:

How can i make him work with just a piece of the window title?

If you look at the help file for the ControlClick function (or any of the GUI or Control functions), look at the "Title" parameter's definition.  You will see a link for special title definitions.  Go there and you will see a few different ways.  Hint: Mode 2 (or Mode -2 for case-insensitive partial match) or you can use a regular expression.

Edited by TheXman

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×