yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Apps and Games] badbob001:
Copy and paste can exist on wm6 standard because that is what is on my phone, but each oem do modify the base os for better or worse.

I have see versions of this method where each key is sent to the device one at a time, which is much slower than pasting. Even worse, this method may result in each key occurring twice: aabbcc instead of abc and people have resorted to enter a, delete duplicate a, enter b, delete duplicate b, ...

Before we go there, lets get some info.

Lets assume you have opera mini 4.1 with direct address input turned on. LeftSoftkey (menu), LeftSoftKey (select Enter Address). Address bar up top should be in focus. Press Up twice to select 'Insert Symbol' and hit enter to open address input window. In the upper right of the screen, what input type is selected? ie: abc, t9, 123? On my device it's 'abc'.

JZ SmartMort's tool has a lot of options for testing copying and pasting on devices.

http://xdaforums.com/showthread.php?t=382043

In his tool, an alternative to Ctrl-v is Shift-insert. I know, who uses that!? Lets try it on your device.

Open StartOperaMini.mscr in notepad and find:

SendCtrlKey("V")

replace it with

SendInsert ("",0,1)

and see if it works better. Also, before the paste, the script does a ctrl-home and ctrl-shift-end to select the "www." Does that happen on your device?
[Windows Mobile Apps and Games] badbob001:
When it's 'waiting' at the main screen before the message about the input box not found, did even the left opera menu pop up? I'm guessing I didn't give enough time for opera to fully start before sending keys to it and it missed the first few. In the most recent updates, I've added an extra delay after the script thinks opera has started. I hope that helps.
[Windows Mobile Apps and Games] JZ SmartMort:
mskovrinskie please let us know if this fixes the BlackJack II issue. Very strange how MS emulators (every kind of WM5 & WM6 device) test w/o a problem but some manufacturers stripped out certain API calls on their devices. I keep seeing more and more references to that effect...
[Windows Mobile Apps and Games] dodo-dk:
Hi badbob001

I have made the little German Opera AddOns.

Thank you for your good work. I can´t do something like this because i´m too stupid.

But i have a better thing for your Script.

This is working with or without Direct Adress Input and with Jbed Softkey Bug from Orbit 2 and Star:

SendLeftSoft

Sleep(100)

SendCR

Sleep(100)

SendEnd

SendBackspace

SendBackspace

SendBackspace

SendBackspace

SendUp

SendCR

Sleep(100)

SendCtrlKey("V")

Sleep(100)

SendLeftSoft

Sleep(100)

SendCR

And the 4 Backspaces is to remove the "www." Because with this:

SetClipText(url)

SendHome ("",1,0)

SendEnd ("",1,1)

Don´t work with any SoftKeyboards. With some Softkeyboards-Software this don´t work. You need the 4 Backspaces.

By Dodo, sorry for my bad english.
[Windows Mobile Apps and Games] mskovrinskie:
I just tested following your steps on the BJ II (using Rebeiro Jbed). For the first test, Insert Symbol resulted in 'abc' text entry mode.

I swapped out the SendCtrlKey for SendInsert. This worked better and I could see the URL being pasted correctly, though there were two extra characters at the beginning of thestring. http://www.google.com resulted in $#http://www.google.com. The same occurs with DIA off and resetting the script to run without DIA.

With the original script (SendCtrlKey), I see $#V being inserted (no URL). It seems that these extra junk characters ($#) are being passed no matter what.
[Windows Mobile Apps and Games] monchatsam:
Many Thanks for your script, its perfect.

I just change a line on the script for my french rom for the ink because my Windows\Start Menu\.. is called Windows\Menu Démarrer\..

So thanks again :)
[Windows Mobile Apps and Games] ChefChaudart:
Same comment :D:D:D
[Windows Mobile Apps and Games] smoky334:
Automatically start GPRS connection???

Hello,

I like the script very much.

Would it be possible to start a GPRS connection when the script runs. So that there is already a GPRS connection active when OperaMini wants to connect. That saves some time.

Smoky
[Windows Mobile Apps and Games] cheesiest:
Yep, that fixed it for me. Well done!
[Windows Mobile Apps and Games] Azimuth21:
Something curious I've noticed. I was reading RSS feeds earlier today, and I clicked a link to Read More. Opera Mini opened up, opened up the page, all was good. So I minimized Opera Mini when I was done, for faster access when I want to Read More on something else. When I got to the new feed I wanted to read more about, I clicked the link, and Jbed closed itself, opened again, then the Opera Mini process worked through. Is there a way to prevent Jbed from closing itself? Perhaps add a line in the script to check if it's running already?
[Windows Mobile Apps and Games] JZ SmartMort:
You can always check the Opera history :)

MortScript allows us to use 2 things: Process name and window title.

I had issues trying to use either for this purpose. Especially with multiple versions of Opera. It all runs under one process, jbed.exe... it's a false assumption to think that it's Opera, it could be some other game or app running under jbed.exe. The window title just shows "Java" which gives us the same issue. I gave up on it (after about 2 hours) and said, kill and restart will work every time, guaranteed...
[Windows Mobile Apps and Games] dodo-dk:
Hi, the new Version Works very good.

Can i have your Permission to change the Script a little (language in Dialogs and the Shortcutname) and upload in my german Thread?

I upload the Link to the german Thread too, and put your Name and your DonationLink too in my german Thread -> only when you give me your permission.

Thank you very much!!

Sorry for my bad english.

Dodo
[Windows Mobile Apps and Games] mskovrinskie:
I really like version .7 as far as the menu options, setup, shortcut, and configuration settings for prompting or just setting a default browser. Great work!

I'm still seeing inconsistent results on various phones:

1) Tilt - almost any settings work. Great experience

2) BlackJack II - The new insert method pastes the URL but now adds a '-' at the end. Type and delete is the only 100% accurate (and slow) method.

3) Pantech Duo - None of the paste methods full work. It seems as if the ability to insert characters or paste doesn't happen on this phone (maybe an issue with Mortscript?). I don't see any characters being pasted for any of the 4 options and combinations of DIA. Is there a way to further troubleshoot on this phone model?
[Windows Mobile Apps and Games] badbob001:
I don't think mortscript has the ability to control GPRS settings. I don't really know all the in's and out's of GPRS, but on my t-mobile usa phone, gprs/edge is always on. How do you turn yours on and off?

I'm guessing you turn off GPRS because you're charged per data or time usage and you don't want to accidentally have a program connect. I'm sure you can find a program that can turn your data connection on and off, and it would simple to have a script turn on gprs when starting, but when do you want it to turn off? When opera mini is closed? That would probably require another script to constantly check if opera mini is running. But this can get complicated if you use other internet applications at the same time which may be using the connection when the script turns it off.
[Windows Mobile Apps and Games] tmknight:
Very slick badbob001!!!

I have one suggestion for the creation of the shortcuts. There may be instances where mortscript.exe is not associated with .mscr files so might be safer to create links explicitely calling mortscript.

Sub createShortcuts
if (not fileexists(SystemPath("StartMenu") &"\Start Opera Mini.lnk"))
WriteFile (start_menu &"\Start Opera Mini.lnk", "89#""" & mort_exe & """ """ & this_script & """?" & SystemPath("ScriptPath") & "\OperaIcon.dll,0")
WriteFile (SystemPath("ScriptPath") &"\Start Opera Mini.lnk", "89#""" & mort_exe & """ """ & this_script & """?" & SystemPath("ScriptPath") & "\OperaIcon.dll,0")
endif
if (not fileexists(SystemPath("StartMenu") &"\Start Opera Mini Setup.lnk"))
WriteFile (start_menu &"\Start Opera Mini Setup.lnk", "89#""" & mort_exe & """ """ & this_script & """ setup=1")
WriteFile (SystemPath("ScriptPath") &"\Start Opera Mini Setup.lnk", "89#""" & mort_exe & """ """ & this_script & """ setup=1")
endif
endsub

I'm also not a fan of forcing links in the startup menu (would rather choose to place it there).

start_menu = SystemPath("StartMenu") & "\Programs"

Again, these are merely suggestions - the script is VERY SLICK indeed! :D

Cheers!
[Windows Mobile Apps and Games] badbob001:
You have a lot of phones. I'm sure they belong to members of your family or friends, but even if you really own all these 'toys'... I"m glad. 99% of my code is for making the script super friendly and tolerant but I didn't spend too much time on testing different devices / configurations.

Anyway, I'm not really sure where that '-' is coming from. Try this:

1. Open the following attachment and save testtext.mscr to your device.

2. Open Opera Mini and open the address input window.

3. Switch away from Opera Mini and run testtext.mscr and it will guide you through some text input test.

See where this '-' is coming from or other anomalies. You may want to also try this on your Duo to see what happens.

Interesting finding 1:

The Address Input window when opened shows this:

[line 1]WWW.

If you press 'enter', rightsoftkey, 'enter' (to clear the screen), the window now shows:

[line 1]WWW.[]
[line 2]

where [] is a square. I suspect that square is a either the CR or LF portion of a newline character CRLF with the other half on line 2. This happens with Opera 4.0 and 4.0 under jbed 3.1 (20080222.3.1). This must be the mysterious [] character I reported earlier.

Interesting finding 2:

The address input window has a window title of 'Enter Address' so I may look for that window instead of doing another pixel color test for it. One possible reason it's not working on the Duo is that somehow the script is focused on another window when sending the keys. Perhaps if I specifically tell mortscript to send the keys to 'Enter Address'...

Not so interesting bug:

Also found a bug that only affects people that have Kill_Jbed_first set to NO (you freak), run opera 4.1, and had opera already running when invoking a link. Basically, I didn't properly comment a comment. On line 528, change

special case where 4.1 is chosen but 4.0 is already running

to

#special case where 4.1 is chosen but 4.0 is already running

Thanks!
[Windows Mobile Apps and Games] badbob001:
Go ahead. But please let me know here if your thread readers report any problems or have any fixes or suggestions. I'm sorry to say that I needed google translate to read that thread...

It would probably be a good idea to move most of the text from the script to variables in the beginning for easy localization... maybe for a later version.

Thanks!
[Windows Mobile Apps and Games] badbob001:
Good point.

The script will always create the shortcuts in the same folder as the script, so you can copy them to where ever you like, but I was a little torn about creating them in the Start Menu or not. I didn't like creating files outside of the script folder without permission, but the Start Menu does offer access to the shortcuts without the user first opening File Explorer. But the user most likely used File Explorer to first invoke the script so it should be ok for the user to go back there to run 'Start Opera Mini Setup' if needed and optionally use the option to add the shortcuts to the Start Menu.

I'll probably remove the auto-creation of the shortcuts in the Start Menu in the next version. Also doesn't hurt to make 'Start Opera Mini Setup' a little harder to access initially for those dangerously-curious types.

Thanks for the input.
[Windows Mobile Apps and Games] tmknight:
You got me thinking, that since you are now prompting to use the existing JBED session, that it would be good to throw in a check to see if it is running opera and not some other applet. It seems this might be done by checking to see that "S#_d1.db (or any S#_d#.db) has the most recent last modified time stamp - the "S#" needs to correspond to the selector position of the identified opera version either in the script TXT file or through some other check, but the TXT file seems most appropriate. The ".db" file is modified as soon as opera is opened so if it has the most recent time stamp, then it is safe to assume that if JBED is running, then opera is running.

I'm only picking up on mortscripting as I follow along here, so won't be any help in accomplishing this, but thought it would put a nice bow on the script and all the other nice checks it is already doing.

Keep up the good work!

edit: mort 4.1 has a FileModifyTime function so just a matter of determining what file to look for and then seeing if it is newer than any other file in the directory...easy right ;)
[Windows Mobile Apps and Games] badbob001:
I only prompt if you enable the prompting of what to do. The default setting is to kill kill kill. :)

That is very interesting information. Thanks.

I'm rethinking the whole kill jbed before running idea. While killing jbed can potentially make the script work 99% of the time, it does cause some delay. I have reworked the opera detection system so it works even if an existing opera mini is in fullscreen mode and NOT on the home page... except in some rare situations.

Your .db timestamp idea will give me a clue if the existing jbed.exe process is opera mini, and if it is, to also know what version it is. So I would only kill jbed if opera mini is not running or if it's a different version from the user's choice.

How did a ten line script turn into this monster?
[Windows Mobile Apps and Games] JZ SmartMort:
It's still an assumption because you have to believe that somebody could just open JBed by itself w/o launching a java app...
[Windows Mobile Apps and Games] badbob001:
You're right. Too bad mortscript doesn't support reading how much memory a process is using. If it did, I guess I can check how much memory Jbed.exe is using when running and not running opera. On my device, just running jbed uses less than 5MB of ram. Launching Opera Mini uses more. No idea if it'll be the same on other devices and other versions of jbed. I guess one can do a baseline test: run jbed.exe, record memory usage, save to .ini file, kill jbed.exe.

Another idea is to have the script create some file when running opera mini and then launch another script that just constantly checks if jbed.exe (opera) is still running. If jbed.exe quits, delete the file. So if jbed.exe is running without the file, then it's not opera. If it's running and the file exists, then it's 'likely' to be opera. If the device gets reset while opera is running, something in the startup needs to delete the file if it exists. Of course, someone can quickly kill opera and run another midlet before the watcher script catches on... Or someone can kill the watcher script... Or someone runs opera outside of the script...

No real idea solution but this whole script is one big hack held together with sweat and luck anyway. :)
[Windows Mobile Apps and Games] JZ SmartMort:
That's my point. We're writing a PDA level hack, not a desktop experience suite. Some things are overkill, I'm perfectly happy to restart my JBed everytime, Opera has a history after all. The more code, the slower the script... it's a tradeoff like anything else.
[Windows Mobile Apps and Games] mskovrinskie:
Yes, I have too many devices. BJ, BJII, Wizard, StarTrek, Pantech Duo, and Tytn II. They are toys AND used for customer work.

Interesting results from the test...

Pantech Duo: The test ran fine, though I had to turn off DIA or the first step failed tring to find the window 'Enter address'. After disabling DIA, all the test steps worked up until shift-insert abcdefg. Nothing was inserted!

BlackJack II:

0) OK

1) # entered with the END key

2) backspace leaves a W because extra # and not enough backspacing

3) ok

4) shift insert abcdefg adds '-' at the end
[Windows Mobile Apps and Games] tallglasowater:
i have this program running great thanks to you guys. have it as my default browser. only problem im experiencing is that opera mini is not displaying all images and pictures on links and sites. but pie does. somebody please help
[Windows Mobile Apps and Games] badbob001:
If you're talking about ALL sites, then perhaps you have this unchecked in Opera Mini:

[ ] Load images
[Windows Mobile Apps and Games] noellenchris:
.7b seems to recreate the "Start Opera Mini Setup" shortcut in my startmenu everytime I start Opera with the shortcut "Start Opera Mini"..

Not a huge issue. I have to delete them after awhile....

Chris
[Windows Mobile Apps and Games] monchatsam:
It's really a good script.

There is just a small thing for me to be perfect, to remove requests for permission before launching the connection ..

For this I am constantly forced to edit Windows \ Appdb \ selector.utf and change one line:

Put Domain = tckmax with the same number of characters, ie add spaces if necessary.

Is it possible to add this parameter choice from the menu of your script?
[Windows Mobile Apps and Games] nathrinder:
Same problem here :D
[Windows Mobile Apps and Games] tmknight:
edit: my bad, oops!
[Windows Mobile Apps and Games] badbob001:
0.08b

More url paste options

shift-insert+trim (removes last character)

control-v+trim (removes last character)

type (for devices where mortscript doesn't send double characters)

Improved opera control scheme

When sending keys to control opera, some devices produce unexpected characters when sent certain keys. For example, when 'end' is sent, instead of moving the cursor to the end of the line, a # is produced. Key input is now reworked and limited to:

The DAI_enabled option is removed as the script is able to determine if DAI is enabled or not by seeing how the screen responds.

Also, there are two opera control methods: method1 and method2.

Shortcuts add/remove options

Start Menu shortcuts are no longer created by default. You can run Setup and choose the option to create or remove them. Shortcuts are always created in the script folder so you can copy them to where-ever you like.

More Setup functions

In Setup, added option to kill jbed.exe / iexplore.exe and to delete .ini file to return everything to defaults.

Also, setting Internet Explorer to be the default browser no longer simply restores the registry, but instead makes the script launch IE for you. To actually restore the registry to before, a Registry Setting uninstall option is available.

MSPIE

JZ SmartMort told me that some applications use :MSPIE to refer to the browser. On my WM6 smartphone, email links went to :DEFBROSWER while links in contacts and calendar went to :MSPIE. So I've updated the registry update function to include :MSPIE.

One side-effect of messing with :MSPIE is that it may cause the Internet Explorer shortcut to open the script instead, which may not be what you want. I've modified the :MSPIE value so that it passes an extra variable to the script so the script will know that you just want to launch Internet Explorer and then will launch it for you.

Also, each registry backup is now in a separate file in the script folder instead of a single file.

selector.utf patching

Someone asked about patching the selector.utf file to eliminate the permission prompts. I have done this but be *warned*: selector.utf is a binary file and mortscript can only work with text files, so it may result in jbed not seeing any of your installed midlets. So far, it seems to work, but I don't use that many midlets. Of course, a backup of the selector.utf is copied to the script folder before making changes.

What the patch does:

replace "domain=untrusted," with "domain=tckmax ,"
and
replace "domain=trusted," with "domain=tckmax ,"

Reworked logic on when to kill jbed.exe

When the ini file is missing or invalid.

When Kill Jbed first: Yes, default opera specified, url specified.

When choosing which opera to use for a link and not selecting [Switch to already running Opera Mini].

When the opera interface fails to be detected and a single retry is automatically attempted.
[Windows Mobile Apps and Games] badbob001:
Update: found a small bug affecting settings from saving. Please re-download.
[Windows Mobile Apps and Games] nathrinder:
It works well now ! Thanks for your work :D
[Windows Mobile Apps and Games] badbob001:
I hope the new release will work for you since it now doesn't send an 'End' and has a shift-insert+trim option to get rid of the trailing '-' hopefully.

And perhaps some combination of the new options will allow it to work on your DUO as well.
[Windows Mobile Apps and Games] badbob001:
After some browsing on this forum, I think I understand what your problem is and I responded here:

Anybody else interested in an user defined exclude list so things like mms works? I'm don't use mms much so this issue slipped my mind a long long time ago.
[Windows Mobile Apps and Games] mskovrinskie:
Sorry, I should have confirmed this earlier. The shift-insert+Trim absolutely does work on the BlackJack II. I had customized .8 to do this but now .9 does it out of the box!

Unfortunately, the Duo is just broken. I have tried everything, but it doesn't seem to be able to paste any text (maybe it failed on the copy), though the other keyboard commands seem to work in the script. The paste function (no matter what option I choose) results in nothing being pasted.
[Windows Mobile Apps and Games] badbob001:
So even the direct-type non-paste input methods don't work on the Duo? It would be strange if backspace and enter work but not other keys.
[Windows Mobile Apps and Games] mskovrinskie:
If I select Paste Type: type, then here is what happens

- click URL from email

- JBED launches

- Go to, insert symbol, blinking cursor with no text in the input field (it is apparently waiting for something). If I wait long enough, it goes back to the Opera Mini screen and a square is in the text entry field. Strangely, while it is waiting, if I hit OK early then I can see it pasting double characters in the address field.

- If I hit OK early and the paste type is type and delete, then I can see it putting in the correct URL.

I added some debugging and verified that the URL is indeed copying. The issue seems to be with pasting into the address. The script might be confused about the state or window detection on this device.

Also, I noticed that the script isn't able to detect portrait/landscape on this device. It always thinks it is portrait, regardless of the actual state. All of my testing above was done in portrait.
[Windows Mobile Apps and Games] badbob001:
0.09b

Exclusion list

Anything you add to this list will be searched against when invoking a link. If there is a match, Internet Explorer is automatically used instead. This is useful for sites on private networks that the central Opera Server has no access to, such as your carrier's portal site or MMS server.

Last Link saved

The last link is saved and visible in Setup so you can:

Open it again (perhaps after changing your browser choice)

Add the link's hostname to the exclusion list

Add the link to the exclusion list (for later editing to filter beyond the hostname level)

Improved Shortcut Icons

As you can see in the latest screenshots, I've changed the shortcut icon to a high-resolution one and have also given one to the Setup program.

Help File

The help file in Setup now gives you info on the options in Setup.

Attached for your preview.