PPCGeeks

PPCGeeks (http://forum.ppcgeeks.com/index.php)
-   Windows Mobile Hacks/Tweaks (http://forum.ppcgeeks.com/forumdisplay.php?f=27)
-   -   Associate Opera Mobile with .url Favorites (http://forum.ppcgeeks.com/showthread.php?t=62816)

makkonen 03-29-2009 05:32 AM

Associate Opera Mobile with .url Favorites
 
2 Attachment(s)
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.

RonDutt 04-02-2009 02:16 AM

Re: Associate Opera Mobile with .url Favorites
 
Thanks! Been looking for a way to do this so I could export my faves from my PC and import to my phone :)

bpapa9013 05-01-2009 01:44 PM

Re: Associate Opera Mobile with .url Favorites
 
This appears to be working, however whenever I launch a shortcut it leaves the previously visited page/home page at the end of the link url...

So I end up with something like:
http://www.accuweather.comhttp://google.com

Any ideas?

###EDIT###
Nevermind, my url file got jackked up somehow, I fixed it and all is working fine now. Thanks!

Slightly off topic, but it is next on my chain of things to customize, any idea how to use custom icons for favorites? I am using SPB Mobile Shell 3.0 and presently all url/shortcuts just show up with the Opera Icon, I would like to use custom icons for all of my shortcuts...

gadgetfreak 05-01-2009 05:19 PM

Re: Associate Opera Mobile with .url Favorites
 
I'll give this a try this weekend. I'm on my phone right now, and for some reason I'm not seeing any files, so I apologize if what I'm about to ask is already there, but have you thought about cabbing all of that up?

makkonen 05-01-2009 05:36 PM

Re: Associate Opera Mobile with .url Favorites
 
bpapa9013: Glad you got it working. I'm not aware of any way to set custom icons for individual files in windows mobile. I don't know that it can't be done, but I don't know that it can, either. You can set a custom icon for an entire class of files -- the reg key I include there has that, so .url files will show up with an icon for opera instead of ie. But that doesn't help you -- custom icons for individual favorites is a whole other issue. And would be quite nice, as it'd make them much easier to identify at a glance.

gadgetfreak: No, it's not cabbed. I've never actually built a cab file before, but I'll look into it. I've done provxml files for user customizations... I assume that's how it works, just need to wrap all that into a file. A 2 minute search reveals QuickCab over at xda-developers... I'll give that a try this evening.

rstoyguy 05-01-2009 06:04 PM

Re: Associate Opera Mobile with .url Favorites
 
I have it set up in my roms so IE favorites in the registry are opened in opera. Handy when using quickmenu and it lists your favorites.

IE Favorites stored:
HKCU\Software\Microsoft\Internet Explorer\Main\FavoritesEntries

RegEdit:
HKCR\urlfile\Shell\Open\Command
Default=Opera.exe %1

I'll verify it when I get home.

makkonen 05-01-2009 07:43 PM

Re: Associate Opera Mobile with .url Favorites
 
Quickmenu really makes the whole favorites experience much nicer. As good as Opera is in most regards, its bookmark handling is terrible. Bad interface, clunky storage, can't sync -- the whole bit is just bad.

Your method didn't work for me (perhaps it was something specific to your rom?). There are a few favorites stored in that registry entry, but the rest are stored in files in \Windows\Favorites. And those files aren't just URLs, but INI files, so changing the url handler to be Opera leads to opera trying to open an ini file, getting confused, and crapping out. If you've found some way around that that doesn't involve mortscript, I'll be thrilled -- I always prefer a more elegant solution.

I've just spent some time banging on cabwiz (which is a really unintuitive program), so I've got a cab installer that seems to work. I'm updating the first post now.

gadgetfreak 05-01-2009 10:59 PM

Re: Associate Opera Mobile with .url Favorites
 
Loading now, and thanks!

SpoiledK 01-13-2010 09:22 PM

Re: Associate Opera Mobile with .url Favorites
 
Got Opera 10 beta installed, does anyone know how to associate Manila to it? TIA...

makkonen 01-13-2010 09:29 PM

Re: Associate Opera Mobile with .url Favorites
 
I have no idea. Haven't touched Opera 10 myself, and tying it into Manila is a different operation than tying it into the built-in file type associations.

My guess is it's a setting somewhere in the registry under the Manila key. Find the one that points at Opera 9.5, and point it to Opera 10 instead...assuming there's actually a key for that and it's not hardcoded.


All times are GMT -4. The time now is 11:15 AM.

Powered by vBulletin® ©2000 - 2024, Jelsoft Enterprises Ltd.
©2012 - PPCGeeks.com


Content Relevant URLs by vBSEO 3.6.0