Go Back   xda-developers > Non-Touchscreen Windows Mobile > Non-Touchscreen Windows Mobile Other


Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 27th November 2007, 05:00 PM
Menneisyys Menneisyys is offline
Moderator
 
Join Date: Jul 2005
Posts: 5,316
Default (MY) MAJOR BREAKTHROUGH: now, you can use Opera Mini as the system-level Web browser!

You, hopefully, already know Opera Mini 4, which, currently, I recommend the most for all Windows Mobile users as the primary browser. It’s especially useful if you are on either a slow (say, GPRS) or expensive (non-flat rate) data plan and/or you also use Opera on the desktop and, therefore, can make use of the excellent, remote (!) favorite synchronization offered by Opera Link.

So far, it was impossible to quickly invoke Opera Mini from any mailer applications by just clicking / activating Web links in them. This was a major stumbling block for many, which is quite understandable. Yes, it’s a major pain in the back to having to rely on Internet Explorer (Opera Mobile, Netfront etc.) for displaying the given Web page - instead of the much faster / cheaper / prettier Opera Mini.

Of course, Pocket PC (using the new terminology, Windows Mobile 6 Professional / Classic) users have always had an escape route. They still could highlight the link and, then, copy it to the clipboard. After that, they could still invoke Opera Mini, go to Menu / Enter Address and paste the URL there. (Assuming, of course, they use a copy/paste-capable MIDlet Manager. The outdated and, unless you have specific needs or an old operating system, in no way recommended TAO isn’t one of them; the recommended Jbed is.) An example of highlighting a link and copying to the clipboard is depicted in the following screenshot:



This, however, resulted in multiple screen taps and has never been so simple as just clicking a link in the mail body and let the system invoke the browser and pass the link to it.

And, of course, the above-explained way of copying URL’s to Opera Mini doesn’t work with touchscreen-less MS Smartphone (in the new terminology, Windows Mobile 6 Standard) models. Not even with external Copy/Paste tools like VITO’s excellent, free CopyPaste.

Because of the acuteness of the problem, I’ve thought very hard on solving the problem and making Opera Mini (OM for short) a browser that doesn’t suffer from this problem. And, during a lengthy swimming & sauna session, it occurred to me how it can be solved. Yeah, it’s mostly during swimming that I get the best, most revolutionary ideas

First, the pros and the cons so that you can see what you can expect of my solution.

Pros
  1. Fully Seamless integration into Messaging (or any other mailer app), Notes, Word Mobile, PDF readers, MobiPocket (or any other text processing / viewing app) etc under ALL Windows Mobile / Pocket PC operating systems before Windows Mobile 6, on both the Pocket PC and Smartphone platforms
  2. While it’s not compatible with WM6 Smartphones (WM6 Standard devices), on WM6 Pocket PC’s, you can still pretty easily invoke OM and pass the given URL to it.
  3. It’s free and pretty easy to set up



Cons
  1. It isn’t compatible with WM6 Smartphones like the HTC Vox (s710) or the HTC Wings (s730). Sorry.
  2. With WM6 Pocket PC’s (unlike previous OS version), some additional manual work is needed, compared to the pre-WM6 cases. That is, just clicking the link won’t suffice.
  3. It will NOT work on local HTM(L) files on your device – that is, not external links. That is, you won’t be able to render a local HTML file if you click it from File Explorer. However, as it’s mostly remote links that you’ll want to view, not local files, this isn’t that big a problem.

Again, let’s emphasize it again:
  1. with WM6 PPC’s (unlike with pre-WM6 ones), you must copy the URL to the clipboard and only after this click the link!
  2. It does NOT work with touchscreen-less WM6 Smartphones (WM6 Standard devices)! That’s because of the operating system’s inability for any kind of copy/paste operation.

Installation, usage
  1. download and install MortScript if you haven’t already done so. Make sure you install it in the main memory (unless you’re ready to modify the scripts I’ve provided).
  2. download THIS file
  3. depending on your operating system version, go to either the WM5 or WM6 directory of the ZIP file downloaded in the previous step. Note that if you’re still using a pre-WM5 operating system, you’ll need the WM5 version.
  4. transfer OMInvokeAndPasteScript.mscr to \Program Files\MortScript on your device
  5. import the registry file into the Registry (WM5: OMInvokeAndPaste.reg; WM6: OMWM6DefBrowser.reg). if you do this on a MS Smartphone, make sure it is application unlocked. I’ve published several articles on (the absolutely legal) app unlock; see for example THIS

If you absolutely don’t know how the Registry import file needs to be imported, do either of the following:
  1. either get (and, even better, purchase - they DO deserve it as it’s a REALLY excellent app) SOTI’s Pocket Controller. Install it, connect to your device, click the Registry icon. Then, select Edit / Import in the new remote Registry Editor window. Search for the registry file and import it.
  2. or, get Resco Explorer. Install it on your mobile device; make sure you don’t disable the Registry editor install. Start the latter and, then, just exit it – this makes sure .REG files become associated with the Registry editor. Now, after you’ve transferred the REG file to your handset, just click it from inside File Explorer. Voila: it gets imported into the local Registry.

That’s all – from now on, clicking links in mails, documents etc. should fire up OM and pass the URL.

How you can (and when you must) modify OMInvokeAndPasteScript.mscr ?

The majority of the application logic is, in both the WM5 and WM6 versions, in OMInvokeAndPasteScript.mscr. Therefore, you’ll need to modify it in the following cases:
  1. first, the most important instruction you’ll need to modify is the second row Run("\Windows\jbed.exe", "-run sX_"), where X is either 0 or 1 (I’ve set it to 0 in the WM5 and to 1 in the WM6 script).

    As is explained in my earlier Opera Mini & Jbed-tutorial and posts (see for example THIS) , along with other people (see for example THIS), X stands for as how manieth OM was deployed under Jbed.
  2. also note that, if you have to use a pre-WM5 operating system, it’s here that you need to define your TAO / IMB J9 links. Please consult the related section in the MIDlet Bible for more info on how these links need to be created.

    Just remember the following: the Run() function requires two parameters, both enclosed in “’s. First is the executable; the second is the passed parameters. The latter string, of course, can (and with both IBM J9 and TAO, will) consist of several parameters.
  3. the script is geared towards Opera Mini 4 users. Under Opera Mini 3 (or previous versions), the initial two SendLeftSoft calls will NOT result in the “Enter address” dialog coming up. With Opera Mini 3, therefore, you will need to change the second SendLeftSoft to SendCR as follows:

    #SetClipText(url)
    Run("\Windows\jbed.exe", "-run s0_")
    Sleep(6000)
    SendLeftSoft
    Sleep(400)
    SendCR


    Note that the above code snippet has SetClipText(url) commented out (note the # at the beginning of the row). This is only needed under WM6; under previous operating systems, you MUST NOT comment it out.
  4. finally, you can fine-tune the parameters of Sleep() in the code so that OM is still reliably invoked. With the code above, for example, I let MortScript wait for 6 seconds (6000 milliseconds) before starting to emulating left softkey presses.
__________________
Microsoft MVP - Mobile Devices, 2006, 2007, 2008. Make sure you follow my PPC & SP Mag Expert blog HERE.
Reply With Quote
Sponsored Links

  #2  
Old 27th November 2007, 05:03 PM
Menneisyys Menneisyys is offline
Moderator
 
Join Date: Jul 2005
Posts: 5,316
Default

Quick explanation for the different behavior under WM6 (only for geeks / hackers / programmers!)

Under WM6, invoking the default Web browser isn’t any more done the same way as under previous operating systems. There, the contents of HKEY_LOCAL_MACHINE\ SOFTWARE\Microsoft\ Shell\Rai\ : DEFBROWSER\1 tell the system what to invoke. Here, unfortunately, it’s impossible to define additional command-line parameters. Parameters DO get passed (in the background), but you can’t name them. MortScript, however, relies on the latter – that is, named parameters referable under their name, NOT their index.

Under pre-WM6 operating systems, it was easy to name the parameters you passed to programs as can clearly be seen in the WM5-specific Registry import file, which just overwrites the old value of HKEY_CLASSES_ROOT\ http\Shell\Open\ Command:

@="\"\\Program Files\\MortScript\\MortScript.exe\" \"\\Program Files\\MortScript\\OMInvokeAndPasteScript.mscr\" url=\"%1\""

Here, I’ve named the parameter “url”. This is why the first row in the MortScript file is as follows:

SetClipText(url)

This just instructs MortScript to copy the contents of the “var” variable (which, now, comes from the “outside” of the script) to the clipboard so that, later, it can be pasted back to the URL input field.

Feel free to quickly scrutinize the two, WM6- and pre-WM6-specific Registry import files so that you can see this for yourself.

Currently, I don’t know a way of naming parameters under WM6. Of course, when I come up with a solution, I let you all know.
__________________
Microsoft MVP - Mobile Devices, 2006, 2007, 2008. Make sure you follow my PPC & SP Mag Expert blog HERE.
Reply With Quote

  #3  
Old 29th November 2007, 10:52 PM
Menneisyys Menneisyys is offline
Moderator
 
Join Date: Jul 2005
Posts: 5,316
Default

UPDATE (11/29/2007): thanks to badbob001 on my blog, now, as opposed to the initial case, WM6 devices (both Pocket PC's and Smartphones) are FULLY supported!!!!!!!

This all means there is no longer a difference between how WM6 and pre-WM6 operating systems behave. You only need to make sure to get the right .MSCR and Registry import files from the already-updated ZIP file, depending on your operating system version. That is, for WM6, get the files from the WM6 subdirectory, for pre-WM6 operating systems, from the WM5 one. And, of course, modify the scripts if Opera Mini isn't deployed as the first app under Jbed, the, by default, supported (and highly recommended) MIDlet manager.

Again: Under WM6, manual link copying to the clipboard is no longer needed and, again, it works 100% on WM6 Smartphones as well!

(note that now that WM6 is fully supported, I haven’t edited the original article; its WM6-related parts are now outdated. Again, WM6 is fully supported now and there's no difference between the usability on pre-WM6 and the WM6 platforms any more.)
__________________
Microsoft MVP - Mobile Devices, 2006, 2007, 2008. Make sure you follow my PPC & SP Mag Expert blog HERE.
Reply With Quote

  #4  
Old 30th November 2007, 06:13 PM
drcompton drcompton is offline
Junior Member
 
Join Date: Nov 2007
Location: Coeur d'Alene
Posts: 9
Default Undo

I hate to be a pain, but I am trying to view the registry file. Can you suggest a product to view the file? I followed the instructions and was having problems, so I am trying to undo the registry changes.
Thanks

Never mind. I found the registry entry.

Last edited by drcompton; 30th November 2007 at 07:01 PM..
Reply With Quote

  #5  
Old 1st December 2007, 11:39 PM
EazyVG's Avatar
EazyVG EazyVG is offline
Senior Member
 
Join Date: Jan 2007
Location: Moscow, Russia
Posts: 441
Default

Tnx for sharing this great idea ... always wanted one, at least until Opera Mobile 9 will be released.

I have HTC Artemis = WM6 Pro, Cloudyfa Jbed 20070802.2.1 on Storage Card and Opera Mini 4. This is the only midlet so far installed, none other present as of now.

Following is my experience:
1. When Opera Mini is not running, and has to be launched I always get a message "Could not find suite s0_", and then later Opera Mini does get launched but no address input happens. Simply the browser is launched in other words.

2. If Opera Mini is already running, everything works nicely ... no probs here.

3. I use this app, RSS Reader, Spb Insight (I think the best, beats NewsReader except that it has no podcast download support). When I click on the link address in the article (btw, I even cannot copy them in this app), PocketIE/Opera Mobile 8.65 is launched. How can this be resolved.

The script that I am using is that of badbob001, with small mod:

If (ProcExists("jbed.exe"))
Run("\Storage Card\Program Files\Jbed\jbed.exe", "-run s0_")
sleepmessage(3, "Please Wait...")
Else
Run("\Storage Card\Program Files\Jbed\jbed.exe", "-run s0_")
sleepmessage(6, "Please Wait...")
EndIf
SendLeftSoft
Sleep(100)
SendLeftSoft
Sleep(100)
SendEnd
SendHome( "",0,1 )
Sleep(100)
url = substr(url,2)
SetClipText(url)
SendCtrlKey( "V" )
Sleep(100)
SendLeftSoft

I have tried with the original one as well .... same results.
__________________
Device: HTC Touch Pro 2
ROM: EnergyROMs

Linux & Open Source World Blog
My Personal Blog

Last edited by EazyVG; 1st December 2007 at 11:45 PM..
Reply With Quote

  #6  
Old 1st December 2007, 11:57 PM
EazyVG's Avatar
EazyVG EazyVG is offline
Senior Member
 
Join Date: Jan 2007
Location: Moscow, Russia
Posts: 441
Default

Ok, I got rid of s0_ error. After trying 0-10, I decided to delete the string all together and it launches now without any error. So the line now looks like:

newer --> Run("\Storage Card\Program Files\Jbed\jbed.exe")
older --> Run("\Storage Card\Program Files\Jbed\jbed.exe", "-run s1_")

So, why then we need this s0_ string anyway !!!

But then again, if Opera Mini is not running, after clicking on the link in e-mail, the midlet manager is launced and OM fired, and then no URL input happens. If OM is already running, then all is fine. And still haven't found how to resolve URL linking with Spb Insight application.

BTW, for my Artemis @260Mhz, sleep strings of "If= 2 and Else=4" seconds is perfect.
__________________
Device: HTC Touch Pro 2
ROM: EnergyROMs

Linux & Open Source World Blog
My Personal Blog
Reply With Quote

  #7  
Old 2nd December 2007, 12:13 AM
moneytoo's Avatar
moneytoo moneytoo is offline
Senior Member
 
Join Date: Feb 2007
Location: Prague
Posts: 837
Default

Quote:
And, of course, the above-explained way of copying URL’s to Opera Mini doesn’t work with touchscreen-less MS Smartphone (in the new terminology, Windows Mobile 6 Standard) models. Not even with external Copy/Paste tools like VITO’s excellent, free CopyPaste.
Well, it works for me. If I recieve link in email I just click Reply to be able to select and copy the link. Open Opera Mini and paste the link (using Vito CopyPaste). The copy & paste works in intent Midlet Manager (v10.1.7.559) fine.
Reply With Quote

  #8  
Old 2nd December 2007, 05:58 AM
badbob001 badbob001 is offline
Senior Member
 
Join Date: Mar 2005
Posts: 164
Default

Quote:
Originally Posted by EazyVG View Post
Ok, I got rid of s0_ error. After trying 0-10, I decided to delete the string all together and it launches now without any error. So the line now looks like:

newer --> Run("\Storage Card\Program Files\Jbed\jbed.exe")
older --> Run("\Storage Card\Program Files\Jbed\jbed.exe", "-run s1_")

So, why then we need this s0_ string anyway !!!
That is strange that just by running jbed.exe, opera mini is launched automatically or am I not understanding you?

Quote:
Originally Posted by EazyVG View Post
But then again, if Opera Mini is not running, after clicking on the link in e-mail, the midlet manager is launced and OM fired, and then no URL input happens. If OM is already running, then all is fine.
Perhaps opera mini is taking longer than your script expects. In the original script with sleep(6000), it expects opera to run in 6 seconds. On my device, that is too short and I had to increase it to sleep(8000) or sleep(8500). Just launch opera and count how long it takes to get a rough idea.

Last edited by badbob001; 10th April 2008 at 09:36 PM..
Reply With Quote

  #9  
Old 2nd December 2007, 09:25 AM
EazyVG's Avatar
EazyVG EazyVG is offline
Senior Member
 
Join Date: Jan 2007
Location: Moscow, Russia
Posts: 441
Default

Yes, you are right. I have deleted the string mentioning s0_ all together, and it does work without it. So, what you think.

Basically, here is what I tried:

Code:
If (ProcExists("jbed.exe"))
Run("\Storage Card\Program Files\Jbed\jbed.exe")
sleepmessage(2, "Please Wait...")
Else
Run("\Storage Card\Program Files\Jbed\jbed.exe")
sleepmessage(10, "Please Wait...")
EndIf
SendLeftSoft
Sleep(100)
SendLeftSoft
Sleep(100)
SendEnd
SendHome( "",0,1 )
Sleep(100)
url = substr(url,2)
SetClipText(url)
SendCtrlKey( "V" )
Sleep(100)
SendLeftSoft
What it does with that 10 seconds command is that, it launches Jbed, waits 10 seconds at the menu option (where there is a list of Midelets installed, in my case for now only Opera), and then only launches OM, and again there is no auto address input. So increasing seconds doesn;t give me anything. What can be the problem?

And what about handling of links in apps such as Spb Insight ... I haven't tried clicking links in any other 3rd party app, but perhaps the result will be same, i.e. not launching the OM but going straight to PocketIE.

MOVED our discussion
.... as this one is for Smartphones. The link to your other General post:
http://forum.xda-developers.com/show...20#post1707520
__________________
Device: HTC Touch Pro 2
ROM: EnergyROMs

Linux & Open Source World Blog
My Personal Blog

Last edited by EazyVG; 2nd December 2007 at 12:03 PM..
Reply With Quote

  #10  
Old 2nd December 2007, 09:48 AM
moneytoo's Avatar
moneytoo moneytoo is offline
Senior Member
 
Join Date: Feb 2007
Location: Prague
Posts: 837
Default

I have problems with the url parameter on WM5 Smartphone.

If I have in the registry entry like this:
"\Storage Card\Program Files\MortScript\MortScript.exe" "\Storage Card\Program Files\MortScript\OMInvokeAndPasteScript.mscr" url="%1"
It says "There is no application associated with http://something.com. Run the applicaition first and open this file inside the application."

"\Storage Card\Program Files\MortScript\MortScript.exe" "\Storage Card\Program Files\MortScript\OMInvokeAndPasteScript.mscr"
This runs the script fine (except the address of course).

"\Storage Card\Program Files\MortScript\MortScript.exe" "\Storage Card\Program Files\MortScript\OMInvokeAndPasteScript.mscr" url=
This launches the script as well but it dosnt paste the url. I have moddified the script for my intent Midlet Manager but I still have "SetClipText(url)" and "SendCtrlKey( "V" )".

Any help?
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:50 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.