BlazerV60 Posted October 16, 2017 Share Posted October 16, 2017 Hello all, I've been trying to figure out how to launch Google Chrome in the background (hidden) but it doesn't seem possible. I've tried the following methods: ShellExecute("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", "", "", "", @SW_HIDE) Also I've tried: ShellExecute(@ComSpec, "/c start chrome.exe","","",@SW_HIDE) Lastly I tried: RunWait('"'&@ProgramFilesDir&'\Google\Chrome\Application\chrome.exe" --silent-launch',@ScriptDir) But all of them launch my chrome browser without hiding it. Does anyone know a workaround for this or if AutoIT just can't Chrome? Bonus points if you know how to make it launch chrome hidden and make it go to https://www.autoitscript.com Thank you, Brian Link to comment Share on other sites More sharing options...
Danp2 Posted October 16, 2017 Share Posted October 16, 2017 $pid = Run("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --silent-launch") This seems to work ok for me. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
BlazerV60 Posted October 16, 2017 Author Share Posted October 16, 2017 2 hours ago, Danp2 said: $pid = Run("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --silent-launch") This seems to work ok for me. For me, that just launches chrome but doesn't hide it. Also would you happen to know how to make it go to https://www.autoitscript.com after launching the hidden chrome browser? Link to comment Share on other sites More sharing options...
BlazerV60 Posted October 16, 2017 Author Share Posted October 16, 2017 Maybe Chrome doesn't like to be run on hidden/background mode. Link to comment Share on other sites More sharing options...
genius257 Posted October 19, 2017 Share Posted October 19, 2017 Any way to start Google Chrome in headless mode? chrome --headless --remote-debugging-port=9222 http://example.com BlazerV60 1 My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser Link to comment Share on other sites More sharing options...
BlazerV60 Posted October 20, 2017 Author Share Posted October 20, 2017 That works! Thank you genius Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now