Starting browser (Firefox, Safari, Opera, Chrome) from batch/bash script

todiadiyatmo 17 Jan 2013 < 1 Menit 3

Last week i got a project to develop a small HTML5 web pages as that behave like a powerpoint slide. This web application is going to act like a flash replacement. So the user must be able to run this web app with a double click on the file. One way to accomplish that task is by using command line script either in mac or windows.

We’re going to use bat file in Windows to do this task.

File : [windows]autostart_browser.bat

@ECHO OFF START CHROME.EXE %~dp0index.html

In Mac we’re going to use a command file :

File : [mac]browser_autostart.command

#!/bin/bash # Opening Safari cd `dirname $0` open -a /Applications/Chrome.app file://$PWD/index.html

Replace Chrome with your prefered browser and index.html with your desired file.

Remember that your HTML file must be in the same folder with the script file

Last Updated on Januari 17, 2013 by todiadiyatmo

Bagikan ke:
todiadiyatmo
Ditulis oleh

todiadiyatmo

engineer | keyboard warrior | founder @tonjoostudio

Post comment

3 Comments

  • Akhilesh Dahat says:

    Februari 15, 2013 at 15:57

    Hi
    The Slider is awesome but unfortunately it does not supported in IE7.This slider is having excellent features and also lightweight.So I personally request you to make this slider IE supportive.
    Thanks.

    • Todi Adiatmo says:

      Februari 18, 2013 at 12:01

      Hi , we plan to update the plugin on the next release, the last IE we test is IE 8. We try to provide the support on upcoming release

  • Arrosyad Fikri says:

    Februari 8, 2016 at 01:44

    awesome

Tinggalkan Balasan ke Todi Adiatmo cancel

Alamat email Anda tidak akan dipublikasikan.

Situs ini menggunakan Akismet untuk mengurangi spam. Pelajari bagaimana data komentar Anda diproses.