Sign in to follow this  
Followers 0
DaleMahalko

Digital Signage: Auto-launch URL in Chrome fullscreen

1 post in this topic

This is a really simple script to auto-start a URL in Chrome fullscreen when a Windows computer reboots.

This allows me to have digital signage created with Google Slides auto-launch fullscreen in a Chrome browser window, but also allows me to schedule automatic Windows updates with auto-restart at 1 am. When Windows reloads, it automatically logs on and goes to the desktop, and then this script relaunches Chrome where we left off.

The target URL is placed in a folder on the desktop called "AutoURL". To change to a new launch target simply replace the URL file in there, close Chrome, and relaunch this script.

It only reads the first matching *.URL file and ignores everything else.

 

; Auto-launch any URL in Chrome fullscreen at Windows startup
; by Dale Mahalko  - dmahalko@gmail.com
;
#AutoIt3Wrapper_Change2CUI=y

$URLFile=FileFindFirstFile ( @DesktopDir & "\AutoURL\*.url" )
IF $URLFile <> -1 Then
    $TheFile = @DesktopDir & "\AutoURL\" & FileFindNextFile($URLFile)
    ConsoleWrite("Found first *.url file: " & $TheFile & @CRLF)
    $sURL=IniRead( $TheFile,"InternetShortcut","URL","")
    ConsoleWrite("URL: " & $sURL & @CRLF)
    $Params = " --start-fullscreen " & Chr(34) & $sURL & chr(34)
    ConsoleWrite("Params: " & $Params & @CRLF)
    ShellExecute(@ProgramFilesDir & "\Google\Chrome\Application\chrome.exe", $Params )
EndIf
FileClose($URLFile)

Setup:

0. Install Google Chrome.

1. Enable Windows Automatic Update, to run at some time when the sign doesn't need to be viewed.

2. Create either a local user account on the machine, or a network domain account.

3. Using the Registry editor, set up Windows AutoAdminLogon so this account automatically logs on and goes to the desktop at system startup. Be sure to specify the username as either LocalMachineName\Username or DomainName\Username   ... the password is plaintext in the registry using AutoAdminLogin, so don't give this account administrative privileges.

4. Using the auto-login account, create a desktop folder called "AutoURL"

5. Compile this script, and put the program in the Startup folder of the auto-logon account. Also put a shortcut to this program on the desktop.

Usage:

6. In Chrome highlight the text in the address bar of the page you want to auto-launch. Now point at the highlighted text and drag the it onto the Windows desktop, onto the "AutoURL" folder. This will create a *.URL file in the folder, pointing to that address.

7. If there is old/previous URL file present in the "AutoURL" folder, delete it or move it out.

8. If Chrome is open, close it, and run this script via the shortcut on the desktop to relaunch the URL fullscreen.

 

Simple sample kitteh Google Slides slideshow I created for testing this:  

 

 

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  
Followers 0

  • Similar Content

    • fenhanxue
      By fenhanxue
      Q 1:
      How to judge whether the Chrome has been installed. How to get the complete route of chrome if it is installed?

      Q 2:
      How to judge whether the Adobe Flash Player has been installed.
    • FMS
      By FMS
      Hello,
      I'm trying to wright a automated process to show some URL's in chrome browsers on multiple screens.
      I've 4 screens and want to show on each screen another instance of chrome whit its own URL.
      In mine search on the site i din't find any topic for this specific problem.
      The way I was trying is something like :
      ShellExecute("chrome.exe", "http://URL1 --start-maximized") so I'll not see the addressbar but it was not opend full screen .
      I've some questions about this way:
      -Is there a way to maximize it on a dedicated screen ?
      (like URL1 on screen 1 , URL2 on screen 2 etc...)
      -Shellexecute will add a tab on a existing browser and will not open another instance, is there a way to work around this?
      Is there somebody who had the same problem whit chrome?
      thanks in advanced.
      edit: I've checked the chrome UDF but it din't same to get the job done....
    • BlazerV60
      By BlazerV60
      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
    • BOUNCER
      By BOUNCER
      I'm trying to get the output data from https://www.guilded.gg but it uses a web app that generates that output on the fly and this doesn't show up in the page source.
      Only in web inspector of each browser does this data show up. How do I read this data in autoit (equivalent to the web inspector)
       
      thank you
    • dilligence
      By dilligence
      Hello everyone,
      I could use some help with the following: 
      I'm a speech recognition user and recently I've started to use AutoIt for additional scripting because sometimes it works faster. 
      I would like to create an AutoIt script that will open the Chrome link on my desktop which is a a symbolic link, so that the Chrome cache is on my Ram drive:
      "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disk-cache-dir="A:\Browser Cache"
      Next I want to send the website address, in this case: https://autochords.com/ (with SendKeys) to the address bar.
      Then another SendKeys to send Enter.
      I want to use this script when I'm working on my girlfriend's computer, where speech recognition isn't installed.
      I could use ShellExecute ("Chrome", "https://autochords.com/") but then it won't run via my ram drive.
      I am a Dragon NaturallySpeaking user. The program has a scripting language similar to VBA. In Dragon the command is as follows:
      HeardWord "open","chrome" ; HeardWord acts as if I literally said "open Chrome" this command opens any desktop shortcut no matter which window I'm working in.
      Wait 1500 
      SendKeys "https://autochords.com/"
      SendKeys "{Enter}"; these last three lines are similar to AutoIt language I think.....
      Any help would be appreciated.
      Rob