View Single Post
  #1 (permalink)  
Old 03-29-2009, 05:32 AM
makkonen's Avatar
makkonen
TouchPro Android Guy
Offline
 
Join Date: May 2007
Posts: 585
Reputation: 3280
makkonen is still contributing even after becoming a VIPmakkonen is still contributing even after becoming a VIPmakkonen is still contributing even after becoming a VIPmakkonen is still contributing even after becoming a VIPmakkonen is still contributing even after becoming a VIPmakkonen is still contributing even after becoming a VIPmakkonen is still contributing even after becoming a VIPmakkonen is still contributing even after becoming a VIPmakkonen is still contributing even after becoming a VIPmakkonen is still contributing even after becoming a VIPmakkonen is still contributing even after becoming a VIP
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Associate Opera Mobile with .url Favorites

Update (2008-05-01):
I've just made a Cab file for this, so most of what follows is now redundant. Instead of all the manual registry editing and file copying, all you have to do is:

1. grab a copy of MortScript (if you don't already have it) and install it.
2. grab OperaURLs.CAB (below) and install it.

I'm pretty sure if you uninstall this, you'll need to manually change the registry entry back to point to internet explorer. Otherwise, you shouldn't need to deal with the registry.

Hope it helps.

Original Post:
(Mods: If there's a better spot for this, please move it. I don't think it's specific to any one device -- anything running opera mobile should work. But I also don't know how much people check this forum, or if this would better qualify as software or a reg tweak.)

It has bugged me for a while how the system mobile favorites always open in Pocket IE, when I try to use Opera almost exclusively. This is separate from setting Opera as the default browser. So, if you want to use QuickMenu and have the favorites come up in Opera, or if you want to sync favorites through activesync and have them come up in Opera, here's the story:

The problem is .url files (in \Windows\Favorites\) are not just URLs, but INI files with pointers to URLs. So there's no native way to parse them (that I'm aware of).

The solution is MortScript. It's a very useful program for running lightweight scripts, and it can parse INIs.

1. Install MortScript. I'm using v4.2, but it's literally a 2 line script I'm using, so I doubt the version matters that much.
2. Put the file ParseURL.mscr (in the attachment below) in \Program Files\MortScript\.
3. Import the registry file urlfile-modified.reg (also in the attached zip). You can do this by putting it on your device and opening it in file explorer, or any number of other methods.
3 (Alternate). If you don't want to bother with my registry file, just go to the following key with your favorite registry editor:

HKEY_CLASSES_ROOT\urlfile\Shell\Open\Command
And change the default value from:
iexplore.exe -u%1
to:
"\Program Files\MortScript\MortScript.exe" "\Program Files\MortScript\ParseURL.mscr" "target=%1"

A Couple Caveats: This assumes Opera is installed in the \Windows folder. If you have it installed to a storage card, this might not work out of the box. In that case, just open ParseURL.mscr in a text editor and change the part where it says "\Windows\OperaL.exe" to point to wherever OperaL.exe is on your system. Also, I think it's no longer passing the URL in unicode format, so urls with non-english characters might not load correctly.

If you want to undo the registry changes, I'm also including the stock (at least on my device) urlfile.reg. Import this if you want to go back to the default behavior of having the system favorites open in PIE.

For the sake of completeness, if you want to make Opera your default browser (which affects opening links in emails, etc.), apply the following registry edits:

HKEY_LOCAL_MACHINE\Software\Microsoft\Shell\Rai\: DEFBROWSER
"0"=Opera Browser
"1"="\Windows\OperaL.exe\"

(I think most ROMs -- stock and custom -- already have this set, so there's no need to bother with it. It has no effect on the other stuff above; it just might also be necessary in some cases to make sure Opera opens everything..)

No warranty express or implied. Always make a backup. Enjoy.
Attached Files
File Type: zip OperaURL.zip (978 Bytes, 125 views) Click for barcode!
File Type: cab OperaURLs.CAB (1.9 KB, 136 views) Click for barcode!

Last edited by makkonen; 05-01-2009 at 07:55 PM. Reason: added cab
This post has been thanked 4 times.