Index Project For XDA Device Subforums

Another ambitious project from the collaborative efforts of Recognized Contributors and Forum … more

The Atlas of XDA

A few weeks ago, we asked you “How Does Your Location Affect Your Life As A Power User?”. In the days that … more

New Snapdragons: Some Context & Contrast

It hasn’t been a good year for Qualcomm so far. Every device featuring the Snapdragon 810 … more

Google To Launch Next Gen Android One On July 14

The first gen of Android One devices to be launched in India in September 2014 were … more

StartOperaMini: Mortscript for *easily* launching and controlling Opera Mini!

208 posts
Thanks Meter: 2
By badbob001, Senior Member on 10th April 2008, 11:10 PM
Post Reply Subscribe to Thread Email Thread


10/20/2008: You may or may not notice that I haven't updated the script in a while. I had lost my windows mobile phone (t-mobile shadow) many months ago and I guess that killed my enthusiasm and any practical way to do testing (process detection doesn't work very well on the emulator). It also doesn't help that mortscript is frozen in time as well. Since I don't really see many Windows Mobile Standard devices coming out and I refuse to use a phone that requires a stylus, my next phone will likely be an android device (which interestingly enough, has an opera mini port).

There are probably a few bugs lurking around in the code for some fringe cases, but as always, you are welcomed to examine and update the script to your needs and it would be very appreciated if you would post a link to the update here. Also, I think JZ's SmartMort script is still keeping things interesting so you may want to check that out.

Latest version: 06/17/2008 0.11b
Faster Startup, Better OM control, Select / Copy / Paste (works in smartphone MS Word!), HotKey, and many fixes.



You probably know of Menneisyys' original thread of making Opera Mini behave like the default browser by responding to links in emails and other locations. A component of making that work is a script to launch opera mini and enter the url. I've been enhancing my version of the script to make it easy to everyone to use.

While this script has some powerful options, its main purpose is to make it easy to launch opera mini directly and use opera mini to handle links.

  • At first run, an auto-detection process will try to automatically figure out how to launch opera mini and update your device so links are opened by Opera Mini. No more worrying about what jbed.exe parameters to use. Launching the script directly will open Opera Mini so you can just reference the script in shortcuts and launchers.

  • In previous versions of the script, you had to manually guess how much delay is needed before opera mini is ready for the script to enter the url. This script has method to detect if Opera Mini is running and if it's ready automatically.

  • If anything changed on your system that affects Opera Mini, just run Setup to re-detect your settings or tweak a setting. No text editing of the script required.

  • Make Opera Mini your default browser
    When you run the script, the script will automatically find and launch Opera Mini. Optionally, update your registry so links in emails, contacts, appointments, documents, and other apps are handled by Opera Mini. Optionally, create a Start Menu shortcut with icon to launch Opera Mini.

    Works with both Opera Mini 3.1, 4.0 and 4.1. Landscape and fullscreen mode is supported. Will work with 4.1 with Auto-complete Address Input enabled or not.

  • Quickswitch
    Invoke the script with OM visible and you can have the script automatically option open the current page in IE and vice versa. This is handy when you encounter a page that would render better in the other browser. For example, in Opera Mini, you encounter a page with a youTube video so you quickswitch to IE to view the video.

  • Hotkey
    You can assign a single hardware button to the HotKey shortcut and have quick access to most script features, including text select, copy, and paste commands.

  • Customizations / Special features
    • Enable prompting of what action to take when invoking a link or starting the script, such as asking which browser to use or sending the url to the clipboard. Timeout option available.
    • Add your own custom applications as choices to respond to links, so you can add browsers like netfront or opera.
    • Exclude list for sites that you want to automatically open in an alternative app like IE, such as your provider's private-network MMS server. Also good for automatically using IE to download files that Opera Mini may not handle correctly. Prompt and timeout option available.
    • Patch selector.utf file to eliminate permission prompting by midlets.
    • Create shortcuts to all your midlets in your Start Menu.



  • 11/29/2007 0.01b: Initial version (based on Menneisyys' script) [details]
  • 04/06/2008 0.02b: Next version (based on info from JZ's script) [details]
  • 04/10/2008 0.03b: Enhanced and uploaded to this thread
  • 04/11/2008 0.04b: Fix: will find jbed.exe if even no quotes are around the registry value [details]
  • 04/11/2008 0.05b: landscape support, address input optimizations, improved DAI tolerance, shortcut with icon created, filename change to ini file. [details]
  • 04/12/2008 0.06b: tweaked delay b/t keys and delay after paste [details]
  • 04/15/2008 0.07b: Shortcuts created in localized Start Menu location, Prompt-less auto-configuration, Alternative url input methods, What to do options list, To kill jbed or not, 'Start Opera Mini Setup' [details]
  • 04/22/2008 0.08b: More url paste options, Improved opera control scheme, Shortcuts add/remove options, More Setup functions, selector.utf patching, Reworked logic on when to kill jbed.exe [details]
  • 04/25/2008 0.09b: Exclusion list, Last Link saved, Improved shortcut icons, help file [details]
    Update: 04/25/2008 2:50pm EST: found a bug where trim would repeat forever. Fixed and re-uploaded. [details]
  • 05/15/2008 0.10b: Custom Commands, Improved Exclude options, Prompting with timeout, Quickswitch, Special Commands, JVM selection improvements, Fixes [details]
    UPDATE1: 05/15/2008 11PM EST 0.10b sp1: found some bugs with quickswitch if Use Direct Address Input is enabled. Fixed and re-uploaded.
    UPDATE2: 05/16/2008 12PM EST: 0.10b sp2: got quickswitch working on my WM6 PDA by introducing context-menu methods for copy, paste, and select-all. Of course, only touch-screen devices have a context-menu. Also, you can choose different copy, paste, and select methods for use in OM and IE, which is important since context-menus don't appear to work within my JVM. Also added prompt and prompt timeout options to quickswitch [details]
    UPDATE3: 05/20/2008 1:30PM EST: 0.10b sp3: more quickfix tweaks, more commands when using quickswitch prompt so the prompt is more like a context menu allowing to perform an action with the current url or task-switch between browsers. Also added a sample bookmarks.mscr script that you can add to your list of commands and use with quickswitch prompt to have a unified bookmark list between IE and OM. [details]
  • 06/17/2008 0.11b: Faster Startup, Better OM control, Select / Copy / Paste, HotKey, and many fixes. [details]



  • On some platforms, Mortscript will crash if it tries to read the clipboard containing a large amount of text (around 16KB+ on my smartphone). This is easy to do if you are editing a large document and do a select-all + copy. My script will detect the crash and offer to clear the clipboard contents so mortscript will not crash again if you repeat the same action.
  • When viewing a script dialog window, like a prompt window or a setup window, it is possible for another application come into focus and you will lose access to the script window. A common way this can happen is when you receive a phone call and the call window appears. My script will automatically check if its dialog windows is in focus and if not, it will try to bring it to focus. This usually works but I've seen where the script only manages to get the title bar to appear but the rest of the screen still shows the previous application. User inputs will be focused on the script though you can't visually see the results. If this scenario occurs, just wait a few minutes and mortscript will eventually bring the dialog window back in focus. If you can't wait, you can kill mortscript via HotKey > StopScripts or manually run \sub\stop_scripts.

Be sure to download the version you want. I'm keeping some of the previous version up in case of bugs or undesired behavior in the latest version.
Last edited by badbob001; 20th October 2008 at 04:33 PM.
10th April 2008, 11:11 PM |#2  
OP Senior Member
Thanks Meter: 2



  • Jbed JVM
    Jbed 2.1: (recommended)

    Jbed 3.1:

    Jbed 3.1 has a bug on smartphones where if you switch away from jbed and then switch back, the screen may not refresh. Workaround is to manually start the JVM, select Menu > Background Running, and finaly start Opera Mini. Script setting 'Kill JVM First' will need to be set to 'No'. This is also a good method to allow you to switch away from Opera Mini while it's still loading the page and come back when it's done. This will work for Jbed 2.1 as well.

    If you have multiple versions of jbed installed, then the script may not correctly find the version you are using. You can run the Setup application and manually select your JVM executable and the selector.utf file that catalogs the midlets you have installed.

    If you start the script to start Opera Mini and briefly see a flash of white, then either the script has chosen the wrong JVM/selector.utf pair or you recently installed a JVM that is of a different version from your last one. In the latter case, your currently installed midlets may not work with the newly installed JVM and you may need to uninstall all your midlets and reinstall them.

  • Opera Mini (3.1, 4.0, 4.1 beta, 4.1 Final)

    To get the signed version of Opera Mini 4.1 Final so you're not prompted for permissions:

    1. On the device, use IE mobile and go to
    2. The version shown is probably 4.1 US English, No signature, which is probably what you don't want so don't download that. If you're fine with the chosen language, skip to step 5. Otherwise, see the next step.
    3. Click Download in another language.
    4. Now a list of all language versions appear so choose one. I prefer to download Opera Mini 4.1 International for foreign language websites.
    5. Click 'If this version fails to install or you would like to install a previous version, please click here.'
    6. Choose the signed version you want.

  • Mortscript (4.1 or higher)

  1. Download Mortscript (4.1 and up), Jbed (2.1 preferred), and Opera Mini (signed version preferred) and install them. Make sure you can run Jbed and then run Opera Mini. You should run Opera Mini at least once to get pass all the initial installation and license agreement screens.

  2. Extract the script contents to anywhere on your device. The zip file contents are stored in a \StartOperaMini\ folder so you can just extract that folder like to '\Program Files\Mortscript\StartOperaMini\'.

    In version 0.09b and 0.11b, the OperaIcon.dll is updated with better or additional shortcut icons. You may not be able to directly overrwrite the existing OperaIcon.dll file so rename the file to something else like OperaIcon.dll_, and then transfer the new OperaIcon.dll. A reboot may be needed before the old OperaIcon.dll can be deleted.

    To support the new icons, the shortcuts have been modified, so you may need to update your shortcuts from the correct ones in the script folder or run Setup and toggle the Start Menu shortcut option to No and then back to Yes.

    Also, you may be asked for permissions to load OperaIcon.dll when you access your Start Menu and the OS tries to load the icon graphics. Just allow it and the message shouldn't appear again.

  3. Open file manager, navigate to where you copied StartOperaMini to, and run StartOperaMini.mscr. If this is the first time you're running the script from the current location, then the script will initialize by detecting your JVM and Opera Mini settings and ask you some initial setup questions.

    One important question is if you want to register the script so the script is run when you click on a link in emails, documents, etc. This step is optional, but is helpful in making Opera Mini behave like the default browser. If you skip this step but have another version of the script installed elsewhere that is registered, then clicking an email link will open up the other version of the script.

    When Opera Mini opens up, installation is complete. Note that version 0.11b does not support the settings from previous versions so you may need to revise the initial settings.

  4. If you want to run the script from an application launcher, either link to the 'Start Opera Mini' shortcut or link directly to the StartOperaMini.mscr script.

    If you want to use the HotKey feature to easily access other script commands like copy/paste, you should map a hardware key to the shortcut 'Start Opera Mini Hotkey' and then customize the HotKey function in Setup. View the help file if you need more information.

    If you need to change any settings, just run the shortcut 'Start Opera Mini Setup'. View the help file if you need more information.

  • When opening links to local files or to sites on private carrier networks (portals, MMS server), Opera Mini will fail to get to that address. Run setup and add the host to the exclude list of those links will open in IE instead.
  • If Internet Explorer is opened, links in contacts and appointments may automatically still use Internet Explorer. Workaround is to kill Internet Explorer first, which is an option in the Setup program.
  • Some paste and control methods may not work on certain devices, so try different settings in Setup.

  • Run the Setup Program and then select the Uninstall option.
  • Delete script files from the script folder. You may not be able to directly delete the OperaIcon.dll file since the system may still be using it to display the shortcut icon. Rename the file to something else like OperaIcon.dll_, reboot, and then it should be deletable.


Much thanks to Menneisyys for giving birth to this breakthrough idea and for JZ SmartMort for bringing new innovations to the table (check out his JZ SmartMort tool). Much ideas and help is from the community so it's really due to everyone's efforts.

Feel free to enhance the script to your own needs and use it in your own projects.

Attached Thumbnails
Click image for larger version

Name:	1.jpg
Views:	7382
Size:	38.3 KB
ID:	93188   Click image for larger version

Name:	2.jpg
Views:	7312
Size:	35.1 KB
ID:	93189   Click image for larger version

Name:	3.jpg
Views:	7326
Size:	28.5 KB
ID:	93190   Click image for larger version

Name:	0.jpg
Views:	7362
Size:	12.5 KB
ID:	93192  
Last edited by badbob001; 30th June 2008 at 06:18 PM.
10th April 2008, 11:12 PM |#3  
OP Senior Member
Thanks Meter: 2
[reserved for future use 2]
11th April 2008, 01:26 AM |#4  
Senior Member
Flag Nashville
Thanks Meter: 47
Hi badbob.

I kind of like the script that you made way back when (Nov.?) that opens up a popup that lets you choose between PIE and OM and the clipboard. It also works for 4.1. It would be neat if the installation script allowed that as an option, and also detected Opera Mobile (and skyfire in the future) and would allow that as an option. Having said that dont make these additions for me as I am happy running the old script. Just thought id give you a suggestion.
11th April 2008, 01:52 AM |#5  
famewolf's Avatar
Senior Member
Thanks Meter: 452
Great script..does what it's supposed to and does it you have any issues with it being included with a rom?
11th April 2008, 04:39 AM |#6  
Senior Member
Flag San Jose, CA
Thanks Meter: 2
Thanks for the script; nice little workaround using the color of the upperleftmost pixel. One thing I've noticed is that I have direct address input turned off in my Opera Mini 4.1. However, I must check "Yes" when asked if it's turned on. Only then will it work properly. Don't know if I'm just reading wrongly, but other than that, it's working perfectly.

By the way I'm using the JBed_20071119.3.1_3dMod_HeapSizeFix_v2_wm6(lovetz1 ) cab.
It found my jbed.exe, even though it's in a "Jbed3dmod" folder on my storage card.

Overall, it's working great now that I marked off "Yes". Thanks!
11th April 2008, 04:45 AM |#7  
OP Senior Member
Thanks Meter: 2
Originally Posted by famewolf

Great script..does what it's supposed to and does it you have any issues with it being included with a rom?

No problems. Go ahead.
11th April 2008, 05:06 AM |#8  
OP Senior Member
Thanks Meter: 2
jbed_exe_ini = Part(RegRead("HKCR","jarfile\Shell\Open\Command",""),"""",2,1)
jbed_exe_ini = replace(RegRead("HKCR","jarfile\Shell\Open\Command",""),"""","")
jbed_exe_ini = SubStr(jbed_exe_ini, 1, find(jbed_exe_ini, "jbed.exe")+7)
So finding the location of jbed.exe from the registry doesn't depend on the quotes being around the command.
11th April 2008, 05:22 AM |#9  
OP Senior Member
Thanks Meter: 2
Originally Posted by Azimuth21

One thing I've noticed is that I have direct address input turned off in my Opera Mini 4.1. However, I must check "Yes" when asked if it's turned on. Only then will it work properly.

When you have direct address input (DAI) turned off in both OM and the script, at what point does the script fail?

The following two block of instructions is what the script does when it thinks DAI is turned off.

LeftSoftKey [open menu]
LeftSoftKey [select Enter Address]
[select all text]
[paste url over selection]
LeftSoftKey [click OK]
By just being lucky, leaving the script with direct address input turned on will perfectly work even if OM has it turned off. It's just that the extra keys sent don't cause any problems. In your working scenario, having the script think DAI is on will essentially put an extra 'enter' after the first instruction block and then another 'enter' after the second block. Which 'enter' is the one helping you?
11th April 2008, 05:41 AM |#10  
OP Senior Member
Thanks Meter: 2
Originally Posted by volwrath

Hi badbob.

I kind of like the script that you made way back when (Nov.?) that opens up a popup that lets you choose between PIE and OM and the clipboard. It also works for 4.1. It would be neat if the installation script allowed that as an option, and also detected Opera Mobile (and skyfire in the future) and would allow that as an option. Having said that dont make these additions for me as I am happy running the old script. Just thought id give you a suggestion.

It's relatively easy to slap on the menu option to my script, which tmknight did here.

I'm sure many "power" users will want total control and it's pretty easy to make a script that defers the decisions to the user. But I wanted to try a script that is a bit more friendly and tries to handle decisions on its own... a script that I won't be afraid to put on my wife's phone. Easy is hard.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes