Jump to content

ControlSend for Chrome


Recommended Posts

Hi guys, i'm trying to send a command to Chrome with ControlSend, but i can't, i had read some @junkew post about this, but is too much information for now, i need some fix quickly, can you guys help me please.

This is the code i tried, with no success:

ControlSend("[CLASS:Chrome_WidgetWin_1]", "", 199624464, "Test")
Link to comment
Share on other sites

Hi Chiitus,

It will be difficult to help without knowing some background info on the webpage, Are you able to provide a screenshot of the AU3info.exe output, when you select the control you're trying to access? (I assume this is what you were using?)

Also the additional code around this line would be useful, as it may not be an issue with this command, but the code leading up to the controlSend function.

It may be worth adding the following to your script for testing:

local $Test = ControlSend("[CLASS:Chrome_WidgetWin_1]", "", 199624464, "Test")
ConsoleWrite($Test & @CR)

What does that return? If it returns 0 to the output window in ScITE, then the control cannot be found.

Thanks

Javi

give a man an application, and he'll be frustrated for the day, Teach him how to program applications and he'll be frustrated for a lifetime.

Link to comment
Share on other sites

ControlSend works fine on chrome for me, just needs to be active.

EDIT:

WinActivate("[CLASS:Chrome_WidgetWin_1]")
WinWaitActive("[CLASS:Chrome_WidgetWin_1]")

ControlSend("[CLASS:Chrome_WidgetWin_1]", "", "[CLASS:Chrome_RenderWidgetHostHWND; INSTANCE:1]", "Test")
Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

First here is the Summary of Auto It Info Tool:

EDIT: Is a window of Google Sheets.

 

>>>> Window <<<<
Title: #HIDE TITLE BECAUSE SOME INFORMATION#
Class: Chrome_WidgetWin_1
Position: -8, -8
Size: 1382, 744
Style: 0x17CF0000
ExStyle: 0x00000100
Handle: 0x0001042E
 
>>>> Control <<<<
Class: Chrome_RenderWidgetHostHWND
Instance: 1
ClassnameNN: Chrome_RenderWidgetHostHWND1
Name:
Advanced (Class): [CLASS:Chrome_RenderWidgetHostHWND; INSTANCE:1]
ID: 175092584
Text: Chrome Legacy Window
Position: 0, 93
Size: 1366, 643
ControlClick Coords: 651, 277
Style: 0x56300000
ExStyle: 0x00000020
Handle: 0x001503C2
 
>>>> Mouse <<<<
Position: 651, 362
Cursor ID: 0
Color: 0xFFFFFF
 
>>>> StatusBar <<<<
 
>>>> ToolsBar <<<<
 
>>>> Visible Text <<<<
Chrome Legacy Window
 
 
>>>> Hidden Text <<<<

 

- Thanks Everyone, i tried @javiwhite:

local $Test = ControlSend("[CLASS:Chrome_WidgetWin_1]", "", 175092584, "Test")
ConsoleWrite($Test & @CR)

This return 0. A error  >_<

 

- Yes @bert i will try this, attention for some updates  :thumbsup:

 

- @JohnOne, this doesnt work for me, i tried with the code from $javiwhite and still return as error(number 0)

Edited by Chiitus
Link to comment
Share on other sites

  • 7 years later...
On 3/19/2015 at 8:09 AM, javiwhite said:

Hi Chiitus,

It will be difficult to help without knowing some background info on the webpage, Are you able to provide a screenshot of the AU3info.exe output, when you select the control you're trying to access? (I assume this is what you were using?)

Also the additional code around this line would be useful, as it may not be an issue with this command, but the code leading up to the controlSend function.

It may be worth adding the following to your script for testing:

local $Test = ControlSend("[CLASS:Chrome_WidgetWin_1]", "", 199624464, "Test")
ConsoleWrite($Test & @CR)

What does that return? If it returns 0 to the output window in ScITE, then the control cannot be found.

Thanks

Javi

I get 1 in my result, but doesn't sendcontrol any string to my chromium based app.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...