Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Opera Portable Launcher


  • Please log in to reply
No replies to this topic
coro
  • Members
  • 2 posts
  • Last active: Aug 24 2005 05:43 PM
  • Joined: 07 Aug 2005
Here are my script / utilities intended to run Opera browser from any portable devices. Please keep in mind that inorder to run correctly, first of all Opera should be configured exactly the way this script set (or just alter it your self though :D ). I also uploaded the precompiled one if you prefer, so which one that suites your need best is up to you. The script it self are heavily commented but still simple and stupid enough :p. Please give your comment, suggestion or bug report about this script / utilities, because eventhough I already try it for awhaile but who knows?

Here are the precompiled one of the script :
Launcher.exe

And here are the full script :
;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Windows all
; Author:         darKstalKer <visynu at gmail DoT com>
;
; Script Function:
;	An attempt to do automating Opera browser launching (with dynamic path linking then the absolute one),
; from any portable devices (e.g. USB Flash disk, Compact Disk or another portable devices).
; This script are wrote because the native of opera browser that it is somehow could be categorized as a nearly
; green application that can be run without installing it. What to do is just a little hint, so it can find
; all the files and folder it need and that's it (well close enough to what the definition install it self but 
; my point of view are to make it more "mobile" while it's still save to run it). I do use opera browser for 
; my common internet browsing, and I do use a lot of different machine (with different setting and OS too)
; in order to launch it. This way, I couldn't find any convenience enough way to make it portable without first
; set the environment variable manually (or by batch file which in my opinion are powerful but not flexible enough
; since it still depend on the system characteristic, -i.e. protected to run a batch file or any other dos based
; command directly in the CLI- so I couldn't run it for that very reason). Basically, someone else has already
; been attempt to do this by using batch file (which doesn't fit my condition).
; For the record, Opera browser it self has to be set some way to meet some pre condition so it can be run portably.
; So this what I call "Opera Portable Launcher" still has one dependent thing from my point of view, that it relay
; on the correct pre condition Opera browser like I said above so it can be run correctly.
; Here are few people who already has a nice site that discuss and teach how to made raw Opera Portable, please
; visit one of the following site for further information :
;
; http://www.obermair.net/feedbacko.htm
; http://chooseopera.com/CDProject/portable.html
; And couple of others that I forgot.
;
; This launcher has been made with BoBo's famous 'ideology' to make an application as a KISS (Keep It Simple and
; Stupid) so there aren't anything fancy and beautiful, just a plain and simple launcher.
; This utility are made on the base of open source. You may distribute it either as a script or as binary (compiled),
; modify it to suit your need or whatever you want with it ;p. You are welcome and encourage to give a correction,
; an addition or just a comment about this utility.
#SingleInstance force

; Ask if the user really wanted to run opera from the portable device
MsgBox, 1, Launcher, Launch Opera from Portable Device ?
; If this app fired by coincidence then terminate it now
IfMsgBox, Cancel
	{
	Gosub, Quit
	Return
	}

; Here are the main launcher section begin
; ========== Sub Routine Start ===============
Start:
; Find the current directory of this script and set it as the path directory
; This section maybe didn't necessary but it's better to be playing save
appdata = %A_ScriptDir%\

; Go look for the opera binary it self if it's in the same directory
IfNotExist, %appdata%opera.exe
	{
	Gosub, Error
	Return
	}

; Start the main routine for preparing the environment variable for opera and
; declare the new created env var so everyone knows it
EnvSet, operadir, %appdata%
EnvUpdate

; Run the application with current dir as a working directory parameter
Run, opera.exe, %operadir%
Return

; ========== Sub Routine Error ===================
; This routine are here to deal with an error when it occurred. Currently it only trap a single error
; (the check of is there actually an opera.exe in the same directory of the script)
Error:
	MsgBox, , Error, Could not find the executable file "opera.exe" !`nTo proceed make sure you have the opera.exe in directory :`n"%appdata%"
	ExitApp
	Return

; ========== Sub Routine Quit ===================
; Sub routine to lead the whole launcher to terminate it self either if it find the launcher has fired
; incidentally or when all the launching process has been completed successfully.
; Mission accomplished, let's get out of here :-D
Quit:
ExitApp