Jump to content
Sign in to follow this  
SergeySpandaryan

controlsend doesn't work

Recommended Posts

Chrome can easy be automated with ui automation. Search in the forum for ui automation.

jiFfM.jpg

- Chrome is designed to resist automation in a web page. Sure you can click on a Chrome control but you can't automate something in the web page your viewing with chrome. That is what the original poster is asking for. If you bothered to read the entire string you would have gotten that.

Share this post


Link to post
Share on other sites

SergeySpandaryan,

 

Can anyone help?

You have been told several times that Chrome is resistant to automation and have been offered several code snippets which obviously work for the poster. As these snippets do not work for you, it seems that your particular Chrome installation is even more resistant than most to automation - but that is something outside our control. :(

AutoIt uses the Windows API or COM to do its magic - if, as in this case, these avenues are not available then there is little chance of AutoIt being able to do what you want. So there is no point in getting "mad" - if it does not work on Chrome, then it does not work and you will just have to accept that. If you want to automate a browser, then install IE or FireFox as suggested earlier. :)

M23


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Sigh - This works BUT it will only navigate to the URL you specify.

If you want to interact with the controls on the webpage let me make this perfectly clear:

CHROME DOES NOT LET YOU DO THAT.

Opt("WinTitleMatchMode", 2)
$url="https://www.youtube.com"
WinActivate("Google Chrome")
ControlSetText("Google Chrome", "", "[CLASS:Chrome_OmniboxView; INSTANCE:1]", $url)
sleep(10)
ControlSend("Google Chrome", "", "[CLASS:Chrome_OmniboxView; INSTANCE:1]","{ENTER}")

Share this post


Link to post
Share on other sites

NO. YOU CAN NOT USE CHROME TO DO WHAT YOU ARE ASKING FOR. 

 

 

 

I get the feeling you're trying to tell us something... :)


"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites

So anyway, do what junkew member told you. Chrome supports UIAutomation and exposes needed objects. You can use it to interact with the web controls as well as with the Chrome window itself.

I'm sorry that junkew's English (and AutoIt) isn't a bit better. Then you would see what UIAutomation means for all this, not just Chrome automation.

People who want to make you believe things aren't possible because they don't know of the ways, should really learn to shut (the fuck) up and let the people who know how to do things to speak. I'm just saying.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

trancexx,

 

let the people who know how to do things to speak

Then why not take your own advice and actually give the OP an example of how to do it, rather than just the usual cryptic remark about "UIAutomation" and "needed objects". That is probably not a great deal of use to him - even a link would be helpful. :)

And please do not bother replying, I fully realise I am talking to the hand where you are concerned..... :whistle:

M23


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

^^ The OP first needs to show interest and even more - willingness to learn. Otherwise it's pearls and swines thing. And "we" don't want that, right?

 

please, I'd be interested to see this pearl,

thank you!

Oink  :)


small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Share this post


Link to post
Share on other sites

Ehh right.
junkew forum member gave the OP a hint on how to proceed. It's the post in this thread, >here's the link. In that post junkew suggests to the OP to search the forum for UI Automation or as he said "ui automation". If any of you did that you would find couple of threads where UIAutomation is talked about. In one of those threads there would be script that can actually be run. If you bothered to do that you would see that UIAutomation can reference web content inside Chrome browser window. Sure, it's not much in junkew's "form", but you can detect input boxes, buttons, etc.

Then normal person if intigued would search the web for UI Automation to get familiar with the concept and the API itself. Microsoft provides detailed explanation for programmers starting here. If you would try to search for examples you would among others find this particular one. That example is written in C# and VB and you can use it to fill search box on google.com for example inside Chrome browser if the OP wants (even) that, even though the code he want's have already very likely been posted here.

But no, YogiBear MVP started flaming instead, posting face palms, using big fonts and caps lock and moderator felt need to say I was cryptic (OMG) when I pointed to junkew's post as possible solution. Maybe to open eyes and use head next time, moderator. It's been said many times that serving the solutions is not particularly good idea if you want people to learn.

So really what I will do is pay attention to the site index today to see if "User Moderation" forum gets new thread mentioning YogiBear MVP after the flaming he exibited.

Edited by trancexx

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

YogiBear,

Those posts were uncalled for - please would you be so kind as to delete them and apologise. :naughty:

trancexx,

Thank you for posting some links to help those of us with less knowledge of the more arcane stuff - sharing is what the forum is all about. :thumbsup:`

And please do not waste your time looking for anything being added to the "User Moderation" section just yet. ;)

M23

Edit:

YogiBear,

Thanks. :thumbsup:

Edited by Melba23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

sharing is what the forum is all about. :thumbsup:`

Oh wow, thank you for letting me know. :thumbsup:

I guess I have learned something new today then. Not.

The other thing doesn't surprise me. Doing the right thing isn't always simple. I guess some people just don't have what it takes inside them. ;)


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

trancexx,

 

Doing the right thing isn't always simple. I guess some people just don't have what it takes inside them

You could be right - but then you could also be wrong. But keep guessing away if it makes you happy. :)

M23


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

 

Sigh - This works BUT it will only navigate to the URL you specify.

If you want to interact with the controls on the webpage let me make this perfectly clear:

CHROME DOES NOT LET YOU DO THAT.

Opt("WinTitleMatchMode", 2)
$url="https://www.youtube.com"
WinActivate("Google Chrome")
ControlSetText("Google Chrome", "", "[CLASS:Chrome_OmniboxView; INSTANCE:1]", $url)
sleep(10)
ControlSend("Google Chrome", "", "[CLASS:Chrome_OmniboxView; INSTANCE:1]","{ENTER}")

Thank you very much, works like a charm.

Share this post


Link to post
Share on other sites

After my holiday i will make a small chrome demo based on the uiautomation framework.

You have to set a flag when you start chrome or respond to a broadcast sendmessage that chrome sends when starting so accessibility can respond properly.

Then the html elements are exposed to be accessible. You will not have all dom details but more then enough to do the basic stuff.

Edited by junkew

Share this post


Link to post
Share on other sites

junkew,

After my holiday i will make a small chrome demo based on the uiautomation framework

Thank you - that would be very useful to a lot of members. :thumbsup:

M23


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

After my holiday i will make a small chrome demo based on the uiautomation framework.

You have to set a flag when you start chrome or respond to a broadcast sendmessage that chrome sends when starting so accessibility can respond properly.

Then the html elements are exposed to be accessible. You will not have all dom details but more then enough to do the basic stuff.

Oh there you are. Great!

If you do good job maybe I even get that apology from the Yogi character and that other guy finaly stops stalking me.

If you would need something from me just let me know.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

I have started the basic UI automation framework in this thread. Based on that I wil make a further working demo on chrome in a separate thread

'?do=embed' frameborder='0' data-embedContent> title="">

 

For those who are in a hurry they can try themselves als long as you start chrome properly you should be able to access elements thru UIA

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...