Jump to content
Sign in to follow this  
DaleMahalko

Digital Signage: Auto-launch URL in Chrome fullscreen

Recommended Posts

DaleMahalko

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  

  • Similar Content

    • stafe
      By stafe
      Hello
      I am trying to get chrome to save it's current webpage to a pdf using autoit.  I wold like to save the file into a folder on the desktop called "ChromeFiles" .  However when I use the send command chrome only occasionally responds.
      Thank you
      Simon
       
    • nooneclose
      By nooneclose
      I want to check some Excel data against data on a website in Chrome. I use Chrome because the site I use does not function properly in Internet Explorer or Firefox. I know how to do the Excel stuff I just can not figure out how to send to Chrome, let alone check to see if the data matches or not. I am also having trouble finding any help online while searching for Chrome functions for Autoit. I have a Chrome UDF installed but I still can not figure out how to get my code to properly function. (I am not posting code because I am  sure my code isn't right, to begin with)
      As usual, any and all help would be greatly appreciated. 
    • rudi
      By rudi
      Hello,
      usually I do Win automations, so I have no skills at all to handle HTML forms :-/
      The script to catch and syntax check  the required information from Excel is done.
      Now I'd like to automate the upload using this form, too:
       
      http://flashcardsdeluxe.com/flashcards/Upload.aspx
      What browser is easiest to do so? (IE, Chrome, FF) The Values $DeckCode, $DeckName, $DeckDefinition shall go to their HTML form fields finally "click" the button "upload flashcards" <table width="70%" class="cssCenter" border="0"> <tr> <td style="width: 1%">Deck&nbsp;Code</td> <td style="width: 100%"><input name="ctlDeckCode" type="text" id="ctlDeckCode" style="width:50%;" /> (no spaces allowed)</td> <td></td> </tr> <tr> <td style="width: 1%">Deck&nbsp;Name</td> <td style="width: 100%"><input name="ctlDeckName" type="text" id="ctlDeckName" style="width:50%;" /> (optional)</td> <td style="width: 1%" align="right"><input type="submit" name="ctlUpload" value="Upload Flashcards" id="ctlUpload" /></td> </tr> <tr> <td valign="top" style="padding-top: 5px" >Flashcard&nbsp;Text</td> <td colspan="2"><textarea name="ctlFlashcardText" rows="2" cols="20" id="ctlFlashcardText" style="height:280px;width:100%;"></textarea></td> </tr> </table> If someone kindly could jump in showing how to address just one of the input fields and how to "click" the "upload flashcards" button, I should be able to do the rest myself.
      TIA, Rudi.

    • TheWizEd
      By TheWizEd
      It seems AutoIt for Chrome is no longer working.  It's not in Google Store so not able to enable.  I can download the crx and drag to chrome but I can't figure out any way to enable the extension.
    • zxc3
      By zxc3
      Are there any examples of a script for Сhrome that allows you to check whether the information in the browser window has changed with a certain periodicity and signal this for 32-bit Windows.
×