Reputation: 75
I have created the following script to enable or disable a chrome extension, the script runs perfectly until it tries to use {ENTER} on the enable or disable button. This action works manually on the keyboard and I have tried different sleep times between this command.
The button id is div#button, is there a way to get this working?
Dim shell
Set shell = wscript.CreateObject("Shell.Application")
set x = CreateObject("Wscript.shell")
shell.Open "C:\Users\steve.newton\Desktop\Google Chrome.lnk"
WScript.Sleep 1000
x.sendkeys("chrome://extensions/")
WScript.Sleep 1000
x.sendkeys"{ENTER}"
WScript.Sleep 800
x.sendkeys"{TAB}"
WScript.Sleep 100
x.sendkeys"{TAB}"
WScript.Sleep 100
x.sendkeys"{TAB}"
WScript.Sleep 100
x.sendkeys"{TAB}"
WScript.Sleep 100
x.sendkeys"{TAB}"
WScript.Sleep 400
x.sendkeys"{ENTER}"
Upvotes: 0
Views: 1944
Reputation: 11
[Remove Google Chrome extension by a VBScript? - your solution in different thread, also refer one more thread [Using VBScript to find and replace all multi-line text between curly braces of a node within a JSON file
Upvotes: 1