yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Apps and Games] arealityfarbetween:
Ask and ye shall be provided ;)

I've implemented a prototype status dialog and included an ammended English.txt for the new messages presented cos I'm not so much of a language buff.

It doesn't do anything apart from display to the screen various registry settings and whether the script is running but could be used to output to a text file easily.

I updated the StoreCount() function to have an extra debug paramater, it's backward compatible with the old one. Could be done easily elsewhere if we need it but the whole script seems kinda flawless to me.

If anything goes wrong, they can now "Reset Factory Defaults" which disables the script, wipes out all of the registry values that are generated by the gui and resets their monitored programs to the ones they originally had.

You'll notice I've also shifted some stuff about, ie. the start/stop has went into debug. The activate/deactivate auto-start I just used to replace the start/stop. I can't understand why anyone wouldn't have it auto-start :D

Oh, and instead of running any link to find out the exe we pull it straight from the link itself if possible. If we don't get the name of an exe that way then it will run the program and ActiveWindow() it as normal.

A function to regenerate QuickLaunchers would be v.handy too in case we change the way those scripts are made...

Enjoy.
[Windows Mobile Apps and Games] cyber-junkie:
@arealityfarbetween:

Great! With a few little fixes I've created the v2.6.0:

- Renamed the 'old' 'SPWOS_autostart.exe' to 'SPWOS.exe' - to get the correct icon on the Quickstart-Shortcuts

- Changed the header on the debug-site (used LangLoc[1])

- Modified the about-page a bit (I think it's in your mind...)

PS: The idea to read the exe-file direct from shortcut is fine - but

1. I havn't found a way to read the exe from lnk with mortscript ;(

2. a few programs (f.e. navigon) starts only a laucher with the startmenu-shortcut - and the main-exe is startet from the launcher-exe -

if we read the exe from startmenu-shortcut it catches only the launcher-exe...

@all: Now I've created the v2.6.0 - and added to the first post!

Changelog:

2.6.0

Changing language don't need a program-restart

Added 'Debug' - with status of backgroundscript/autostart/program-list/quickstart-shortcuts

Little Bug-fixes
[Windows Mobile Apps and Games] realthor:
Great, many thanks.

The quickstart for igo8 (from startmenu shortcut) doesn't work as expected, it starts igo8 once with sense and closes it immediately but all subsequent starts only shut down sense and when the app is supposed to start the sense is reloaded again and nothing happens.

The quickstart from the exe works as expected. Due to how the hardkeys are set I can go back to programs and start a task manager application and I can find no more manila.exe. I am not very familiar with how sense works but the only thing I can not access from the programs screen is the homepage (the one with clock, weather, etc). I can see the THC black themed applications and also both the upper (with battery, volume, etc) and bootom (with start, etc) bars, as they are in winmo 6.5 . Is this behavior correct? Is the manila.exe the only process stopped when sense is shut down?

I use a 826x_21682_Sense_2019 rom on xperia x1.
[Windows Mobile Apps and Games] arealityfarbetween:
For the about page, I only read your last post about the special mention on that screen once I'd zipped up 2.6.0.areal, i wanted to make it clear, with the version number and putting my addy in there, to people using it that it wasn't your fault if it broke! ;)

I hadn't thought about that case scenario but did imagine that even with the change the user could still set a quicklaunch which would integrate correctly as those scripts still use the ActiveWindow() method. Not sure if the method for getting the exe can be modified to automatically accommodate those. Shame about the loss of speed in adding the monitored programs. :(

EDIT: I worked around the above problem a little. Resorted to asking the user if they want to test the exe we detected. The new function, ExeTest() is just the part of ExeSense() that actually runs the program and detects the active window after sleeping. I used it one more time because I thought it might be useful if we asked the user if they wanted to test an exe they actually chose themselves, for the navigon example they might have selected the wrong exe and it won't get picked up by the background script. This would be very useful in the debug menu, we could loop through each entry and check if they're actually pointing to the program that gets started. :)
[Windows Mobile Apps and Games] mkucuksari:
Hi cyber-junkie ,

Great work. Many thanks for your effort. :)

Please keep continue ;)

Also thanks to "arealityfarbetween" for helping you :)
[Windows Mobile Apps and Games] cyber-junkie:
Hy realthor,

StartProgWOSense does the same as the function under settings/today/items

(when you manually disable 'HTC Sense' or 'Sense').

With igo8 it's the same like navigon - the shortcut from startmenu only starts a launcher.

This launcher starts the main-program-exe...

(and the program needs to be started from the laucher - starting the main-program-exe manually don't works...)

So starting IGO8 with a quicklaunch couldn't work - because:

If you set the quicklaunch to the launcher-exe the quicklaunch exists sense - then starts the laucher.

But when the launcher have started the main-program-exe the laucher closes itself - and sense will be restarted...

If you select the main-program-exe IGO8 isn't started with the laucher...

Best solution for such programs (IGO, Navigon and all other programs that uses a laucher-exe to start the main-program-exe) is to add the main-program-exe to the program-list - and activate the background-script to exit sense automatically .

Hy arealityfarbetween,

nice idea to have an option to check the exe-files - but if you test it with a flag ('was sense closed during the exe was running?') it couldn't check if only a 'launcher-exe' was catched (because the flag is positive 'cause sense was closed during running the laucher..)...

Another little thing I found: I think it should be better if there's a security-check ('Are you sure..?') before restoring factory-defaults...
[Windows Mobile Apps and Games] toadlife:
Excellent

Great job.

A couple of suggestions:

1) As mentioned before, RefeshToday.exe is unnecessary. You can replace it with the "RedrawToday" command in Mortscript. I tested it and it does exactly the same thing as refreshtoday.exe.

2) The refreshtoday/redrawtoday both cause issues with the program "waze", which I wanted this script for. Waze overlays over the taskbar at the top. When refreshtoday or redrawtoday is triggered the taskbar pops up, and the only way to get the top portion of waze to show up again is to minimize the maximize the waze window.

To fix this issue, I adjusted the code after the part where sense is disabled like so:

RegWriteDWord("HKLM", "Software\Microsoft\Today\Items" \ SenseTodayName, "Enabled", "0")
showwindow = ActiveWindow()
RedrawToday
sleep 250
Show("Desktop")
sleep 250
Show(showwindow)

This is just an FYI for other waze users who might be having this problem. I wouldn't recommend adding this hack to the main version.
[Windows Mobile Apps and Games] arealityfarbetween:
:) nice work toadlife, I'd noticed that redrawtoday.exe wasn't needed myself. I have included the mod you made to the new ToggleSense() function. Testing shows no issues with it so far, why wouldn't you recommend it in the main?

I've put the sleep all the way down to a tenth and I didn't think there was a need to sleep between redrawing today and showing the desktop; it seems to work ok for both my test programs (currently just htc Calculator and opera...)

Along with a bunch of other fixes/optimisations/general tinkering, quicklaunchers should now JustWork(tm) no matter whether it's a chained exe (OperaL.exe chains and worked fine) or whether the background script is active or not.

I've moved QuickLaunch scripts into the main script directory so that we can use Include() there but the new gui will rewrite any it finds in the quicklaunch directory to the new format. Also if you ever have trouble you can rewrite the QL script/check if the exe they point to exists in the debug menu now.
[Windows Mobile Apps and Games] toadlife:
There was a problem with my mod that caused it to fail with Bing. It would fail because the Bing window would fail to show for several seconds after the process launched, causing the script to abort with an error.

I fixed it by implementing a check to wait until sense ("Start") isn't the active window.

RegWriteDWord("HKLM", "Software\Microsoft\Today\Items" \ SenseTodayName, "Enabled", "0")
while(WndActive("Start"))
Sleep( 100 )
EndWhile
progwindow = ActiveWindow()
RedrawToday
Show("Desktop")
sleep 100
Show(progwindow)

The sleep between show("Desktop") and show(progwindow) seems to be necessary.
[Windows Mobile Apps and Games] arealityfarbetween:
Do you mean with quicklaunch scripts? Or do you mean the whole background script would fail/crash?

Could you post a cab for bing? I don't have it cooked in to test with. (assuming you mean microsoft bing...)
[Windows Mobile Apps and Games] toadlife:
I'm talking about SPWOS.mscr. The code snippet I posted above seems to work fine with everything I've tried (Opera Mobile, Bing, Waze, Google Maps) so far.

You can get bing from Microsoft my browsing to http://m.bing.com/ from mobile IE.
[Windows Mobile Apps and Games] arealityfarbetween:
Hmm, i got a copy of waze and bing for testing and it's highlighted a few issues I hadn't thought about:

1) QuickLaunchers can't be created for any program outside the windows directory unless you select the exe file itself rather than the link (due to ExeSense only returning the executable name) I've fixed this on the version I have on my phone and will post later with the mod.

2) The bing/waze issues are a bit hit/miss. Yes, the code snippet you posted solves the issue for waze I believe. But I put a trace into the ToggleSense function and quite often, bing is not reported as the activewindow which causes unusual behaviour, on my device anyway...

EDIT: I think i might have a concrete fix for 2). Initial tests look good for both Bing and Waze... Attached are the updated files. 1) is fixed too of course :)

EDIT2: Re-uploaded file because it was on my mind that, for the debug menu, if the user has any language other than english then they won't even see "Debug" at the bottom of the main menu, and if they go into it by tapping that blank entry (accidentally, for example) a similar problem presents itself since not all the translations are there. They also might get a bit worried if they tap a blank portion of the screen and are presented with a blank box asking Yes/No! (Restore Factory Settings).

I've modified the language loading function so that it loads English up first, and when it comes to an empty line, it resets that particular element of the LangLoc array to the english translation after it's finished reading the file. There's gotta be a quicker way to do this (although I couldn't think of one since readline() doesn't take a line number argument :(), but the simplest I could think of was loading english first so other languages will experience a slight delay in load time of the GUI.

@cyber-junkie: This should allow you to put up new releases, even though there's no translations yet for new stuff :D
[Windows Mobile Apps and Games] cyber-junkie:
Now I've made version v2.6.1 - with all modifications from arealityfarbetween - and added it to the first post.

____________________________________________________________________________________________________________________

Edit: Went back to RefreshToday.exe (sorry !) - RedrawToday was my first solution too - but there are a few problems on some devices

(f.e. on my Omnia II: When I start Touchplayer, RedrawToday minimizes the Touchplayer to background after exiting sense... with RefreshToday there are no problems)

Fixed Version v2.6.2 added to first post!

@Hy arealityfarbetween,

BIGTHX!

Could you please post a short changelog (version v2.6.0. to v2.6.1~v2.6.2) - so that I can update first post?

Please use v2.6.2 for next modification - so that I don't have to edit every version with my modifications - THX.
[Windows Mobile Apps and Games] arealityfarbetween:
I'll try and come up with the changelog for you sometime today.

The fix that toadlife provided for Waze should actually do the trick for pretty much any program, I modified his solution a bit to remove the while loop-just burried it in the CheckRunning() routine.

Basically, I bolted on another array with the window name but more importantly, mortscripts unique handle for each of the active processes. That is then passed to toggle sense so that if it does redraw the today screen then the program it was toggled for should come back into the foreground, in Waze's case, it should regain fullscreen too :)

EDIT: I tweaked a couple of things this afternoon so here's the latest & changelog including everything. I didn't bump the version number though...

Here you go bro.

A side note on QuickLaunchers: Since ExeTest waits a full 10 seconds before getting the process name (in case of a chain launched exe) so users need to know not to switch windows/go into the start menu or else the QuickLaunch script will SpinLock infinitely...

EDIT2: Put some protection into the spinlock and background adding to check if it's a system process so that shouldn't happen at all now. Also improved the quicklinks a lot more and went back to your method in the gui for adding links and exe files since it allows chainloaders to be easily added to the background script.

QL's will do the same, though they do take the exe from the link if they can, or the link itself if not so that files outside of the windows directory can be used for quicklinks.
[Windows Mobile Apps and Games] toadlife:
2.6.2

2.6.2 has worked well for me so far.

:)
[Windows Mobile Apps and Games] arealityfarbetween:
Yeah, the spinlock protection isn't needed for anything but the quicklaunchers really-and only to protect against users going to the homescreen or doing stuff in general while the quicklaunch program loads. As only then might the script insert a dubious exe into the background process or lock on one. :)
[Windows Mobile Apps and Games] cyber-junkie:
Hy @ all,

now I've made a new version (added to first post) - but only a beta (because of a little bug that I hope could be fixed soon by arealityfarbetween):

Version v2.6.3b1

Changelog:

Latest mods by arealityfarbetween (see his changelog)

+ Turned again back to RefreshToday.exe - RedrawToday gave different problems ...

+ deleted ExeCheck when adding a program with a exe... (because when I want to add a special exe it don't have to be checked)

Known bug:

Quickstart-Lauchers don't be shown on status-site ;(

@arealityfarbetween: Could you please try to fix it?
[Windows Mobile Apps and Games] arealityfarbetween:
Not sure about the QuickLaunch bug you mention. They show OK over here. Users will need to rewrite them using the tool provided in the status menu for them to show and be able to check if they point to an existing exe/lnk file.

It can be changed to let them select any script (as it just does an exe sense on the QL for now) but it'll be a file selection dialog (like with the rewrite option) instead of the nice list menu... I guess the validity checking could scan for function use and if they're not in the correct place (ie. the SPWOS directory) then it can tell the user that they won't work because of that.
[Windows Mobile Apps and Games] cyber-junkie:
After a lot of testing I've made a (last) version: v2.6.3b2 (added to first post).

Changelog:

Same Version as v2.6.3b1 - but with RedrawToday - and not RefreshToday.exe.

(works better on Navigon - but RedrawToday gave sometimes an error on my device - see below)

.. this is my last version - because I'm changing to an Android-HD2 soon ;)

@arealityfarbetween:

My prob: With RedrawToday I get sometimes the following error:

Window " could not be found

Line 323

(\Programme\StartProgWOSense\SPWOS_functions.mscr):

Show (Window)​

And: I've tested a lot of times: On both versions (v2.6.3b1/v2.6.3b2) there will no quicklaunchers be listed on the status-page... but when I want to delete the quicklauchers (on menu-site) the entries will be listed correct! Even with rewriting the quicklaunch-scripts there don't be shown on status-page!

While I'm changing primary to android - If there are any updates needed - could you 'cab' them please?
[Windows Mobile Apps and Games] arealityfarbetween:
Weird, looks like the window handle isn't being passed to spinlock()... is that across a variety of programs or just the one? And is it a QL or background monitored?

I aint that great at cabbing stuff but will surely give it a go. Lucky you getting an android device, have to say I'm green with envy at that!

Very weird bug with the QL's not showing in the status screen. Is that when checking if the quicklaunch is valid?
[Windows Mobile Apps and Games] cyber-junkie:
It's only on monitored programs - when running it with quicklaunch everything is fine...

Had the problem at a couple of programs - last testet program was f.e. the samsungs 'touchplayer.exe'...

After the error-message Sense is still off + the spinlock is on (still llocked on the last exe...) - so I have to activate Sense manually an reset StartProgWOSense to factory defauts ;(

With the QL-status-bug: While validation everything is fine - all QL's are listed correct - but when showing 'status'-page there are no QL's listed...
[Windows Mobile Apps and Games] arealityfarbetween:
ah, they're not meant to at most times. Try running a QL script with the background script on and it'll hand control over to the watcher and the QL script exits. So you'll only see QuickLaunchers mentioned there when a QL program is running and if the background script was running when it was started.

As soon as I've got a mo I'll take a look at that other bug...

Cheers.
[Windows Mobile Apps and Games] blueeagle:
I use Energy's 21863 ROM, after config of SPWOS v2.6.2 ( I added iexplorer and a navigation software into list), every time I launch the WOSense iexplorer (or the navigation software) and close it, the Sense can't be reloaded because the shell32.exe is automatically added into the list and still running. how to fix it? thanks!
[Windows Mobile Apps and Games] arealityfarbetween:
1) Stop the background script.

2) Remove value "shell32.exe" from HKEY_CURRENT_USER\Software\StartProgWOSense\List

3) I'd soft-reset at that point and then just restart the background script.

4) Make sure you wait a full ten seconds before pressing any key on the diamond after starting the QL and it shouldn't happen. Or upgrade to 2.6.3-it has protection for exactly that bug ;)
[Windows Mobile Apps and Games] arealityfarbetween:
Hi everybody, wanted to share the latest development release with you all. (Hence the 2.7.x version number) There may be many bugs due to the change in this version being quite major so I shan't cab this one up until reports have came back, although my initial tests look good.

Changelog in a nutshell:

We now hijack the today screen entirely which;

- Allows freedom from redrawtoday and window juggling which should fix the bugs described previously with Waze/Bing and also the unfound window bug

- Now Supports SPB Mobile Shell! Set this in the Advanced Menu

- Allows a nifty background Today screen (for when HTC Sense/SPB is disabled) which can be set from the Advanced Menu (think of mToday)

WRT QuickLaunchers: I'd ask all users to rewrite their quicklaunch scripts one final time with the menu option provided (Sorry!!!) but I promise you that this will be the very last time as they will now simply call a function that was already included so any modifications to the quicklaunch routine will propogate in future with no fuss! :D

@cyber-junkie: Due to the extension of functionality; Do you mind if we rename the program UIFlex or something similar? If we could put it under the GPL that would be cool too ;)
[Windows Mobile Apps and Games] cyber-junkie:
Hy areal,

I think renaming should be fine too, UIFlex - or something like StartProgWOTodayUI...

GPL is also fine (you got my agreement to that!)...

An Idea (so that you can update thread-title - and post updates on first post):

When changing to a new name - I think it's the best, when you create a completely new thread (someting like '[APP] StartProgWOTodayUI - auto-disable TodayUI to free RAM !!') - and then I can link from here to this new thread (where your the 'thread-master' ;) ).
[Windows Mobile Apps and Games] blueeagle:
i upgraded to 2.6.3b2 then fixed the bug. but the error report as cyber-junkie described appeared.
[Windows Mobile Apps and Games] blueeagle:
i used the files you attached to override the corresponding files in my setup folder. it works fine!

but i don't know why SPWOS need to open the added program and then close it for adding it to the list. i want to add a program to the list. but SPWOS can't close it after opening it so that i can't add it. btw, the program is a loader which launchs a navigator program and configures some parameters for it.
[Windows Mobile Apps and Games] arealityfarbetween:
what program?
[Windows Mobile Apps and Games] blueeagle:
the loader program is xLoader.exe, and the navigator program is NaviOne.exe.

these programs are attached as files.rar in this post.
[Windows Mobile Apps and Games] arealityfarbetween:
Identified the bug: I can't post a full file as the source has been modified a lot for the release of UIFlex which I'll try and get out today.

There is a line in SPWOS_gui.mscr that reads thusly:

AddEXE = Part(AddEXE, "\", -1)

You need to remove it, this bug affects adding exe files from anywhere that's not in the windows directory.

Well spotted! :)

EDIT: Evening boys and girls! UIFlex is here!

@cyber-junkie: I stole your icon because it looks cool, and I have no idea how to make my own! Besides that, however creative I can get with code i'm not very arty so I'm pretty sure any effort from me there would produce something that looks a bit rubbish! Hope you don't mind bro, say so if you do and I'll change it ASAP!
[Windows Mobile Apps and Games] cyber-junkie:
Hy areal,

using my icons isn't a problem - and if you want to change it, just replace it with 'ressource hacker' ;)

And: Now I've updated the first post with a link to your new thread - again thx4all !
[Android Apps and Games] Carpet161:
The vibrate died on my old Vibrant. They are sending me a new one. I play Homerun Derby ALL the time. How can I copy my old save data to the new phone so I don't have to start over? Thanks!!!

EDIT: This worked for me

1. Install root explorer

2. Load up Nanroid backup that has your data and all your gear.

3. Open root explorer, go to data folder,again data folder,then open "com.com2us.HB3D ....long press "jesus.dat" and copy

4. Once you copy go back 3 times, now go under sd card and paste. Now jesus.dat should be inside your sd card to access.

5. Load up your desired backup or rom

6. Once new rom is loaded, run root explorer and go to sd card, copy jesus.dat inside sd card folder.

7. Now navigate to data folder, data folder, com.com2us.HB3D, delete the existing jesus.dat and paste your old jesus.dat

8. Run HR Battle 3D, i logged in to match up and i had all my gear and rankings.
[Android Apps and Games] oshizzle1991:
i just use titanium backup

http://xdaforums.com/showthread.php?t=748686 works for apps too.
[Desire Q&A, Help & Troubleshooting] roscoe141:
I have a Nokia BH-102 Bluetooth headset. I can't seem to get my phone to detect it.

Does anyone know how to get it paired with my HTC Desire?
[Desire Q&A, Help & Troubleshooting] harolds:
If your headset was paired with another device, you may need to un-pair it. Check the headsets documentation.
[Desire Q&A, Help & Troubleshooting] roscoe141:
Worked a treat, thanks matey! :D