G33kDude / Chrome.ahk

Automate Google Chrome using native AutoHotkey
https://autohotkey.com/boards/viewtopic.php?t=42890
MIT License
340 stars 83 forks source link

How do I send clicks to all my tabs? #31

Open MasterGota opened 2 years ago

MasterGota commented 2 years ago

NoEnv

Persistent

SingleInstance

SetBatchLines, -1 SetTitleMatchMode 2

Include Chrome.ahk

url:= "https://gota.io/web/"

FileCreateDir, ChromeProfile
ChromeInst := new Chrome winwait, Chrome

if !(Page1 := ChromeInst.GetPage())
{ MsgBox, Could not retrieve page! ChromeInst.Kill() } else Page1.WaitForLoad()

Page1.Call("Page.navigate", {"url": url})
Page1.WaitForLoad()

~$Shift::
Page1.call("Input.dispatchKeyEvent" , {type: "keyDown", windowsVirtualKeyCode: 16}) Page1.call("Input.dispatchKeyEvent" , {type: "keyUp", windowsVirtualKeyCode: 16})
return

This is the code I used and I'm wondering how do I send multiple clicks through specific page like this. When you press shift it sends it to that specific tab . Even better if the page is active even if its not seened or clicked on and it follows the mouse pointer and reacts to it