Windows Phone Thoughts - Daily News, Views, Rants and Raves

Check out the hottest Windows Mobile devices at our Expansys store!


Digital Home Thoughts

Loading feed...

Laptop Thoughts

Loading feed...

Android Thoughts

Loading feed...




Go Back   Thoughts Media Forums > WINDOWS PHONE THOUGHTS > Windows Phone Talk

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-27-2007, 04:58 PM
Menneisyys
5000+ Posts? I Should OWN This Site!
Join Date: Jun 2007
Posts: 5,067
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.

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.
 
Reply With Quote
 


Thread Tools
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:34 AM.