Jump to content

Has Chrome Created A Way To Block Clicks?


 Share

Recommended Posts

I have tried a few different ways to click and activate Google Chrome Version 79.0.3945.88 (Official Build) (64-bit) but for some reason it won't activate the web page. I know this should work because it will click and activate Internet Explorer or any other window I have open but this doesn't click on a Chrome web page to activate it and make it the focus. 

#include <AutoItConstants.au3>

$click = MouseClick("left",14, 165,2,5) ; should activate the window but to make sure I'll check the return

if $click <> 1 Then MsgBox(0,"","It didn't click")

;still didn't work so add this line maybe it will activate it

MouseDown($MOUSE_CLICK_LEFT) ;nope still no good

Anyone have an idea of what I'm doing wrong? 

 

Link to comment
Share on other sites

  • Moderators

@bigbry2k3 What exactly are you trying to do in Chrome? There are a couple of UDFs, such as WebDriver and UIAutomation, that will make things much easier for you than point and click. If you could elaborate on what you're trying to accomplish, we can make better suggestions.

"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!

Link to comment
Share on other sites

;whatever .....

$title="Has Chrome Created A Way To Block Clicks? - AutoIt General Help and Support - AutoIt Forums - Google Chrome"


if WinExists($title)=1 Then
$Handle=WinGetHandle($title)
WinActivate($Handle)
WinSetState($Handle, "", @SW_MAXIMIZE)
WinSetOnTop($Handle,'',1)
Else
    WindowDoesntExist()

EndIf


Func WindowDoesntExist()
    Run(@ProgramFilesDir & "\Google\Chrome\Application\chrome.exe")  ;your directory may vary
    $HwD=WinWait("[CLASS:Chrome_WidgetWin_1]")
    WinActivate($HwD)
    WinSetOnTop($HwD,'',1)
    WinSetState($HwD,'', @SW_MAXIMIZE)

;the cursor should be in the address bar so type in whereever you want to go....
sleep(500)
Send("https://www.autoitscript.com/forum/topic/201204-has-chrome-created-a-way-to-block-clicks/")
Sleep(200)

Send("{ENTER}")

EndFunc

 

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...