[Windows Mobile Development and Hacking General] MichelDiamond:
Hi - thanx for looking (I will answer a little longer, to understand the system of JMLToday itself)

Yes - it's bizarre... but explainable :) Therefore that JMHL is from France and I am from Germany, it was my fault, that we didn't notice, that the alarm time was displayed in military format - we both are used to this format. And in my final test I forgot to wake up in afternoon :) In next Version it will be corrected.

But: That wouldn't help you in your thinkings - because of the Format. 12/24h-Format is easy to compare - e.g. 3 & p.m. = 15 :)

But the day... it's not compareable - because of that JMLToday is multilanguage. The day of week has in each countries almost other names - and so you cannot extract the UNIX-Time Format.

JMLToday is a "View" for Titanium - for all languages and also for the time format in the chosen country. So in value of Alarm can't be a Unix-Time Format - then the alarm time would be e.g. "003498398934983983483338489348" - and the user would think it's the "star time" of Star Trek - but not his next time, he will be waked up :)

You need the source, were JMLToday also finds the alarm... and that's to find in HKEY_CURRENT_USER\System\State\Shell\Alarms - and the value there "NextRunNormalInterval" - contains the time in Unix-Format.

To know the current time - there's in MortScript TimeStamp() - also in UNIX-Format.

Then it's compareable in only a few lines and will work for all countries.

I saw a bigger problem in changing the icon in JMLToday, if the alarm is longer than 24 hours. Because there it should have a effect to the view of JMLToday.

But: nextAlarmWithin24hours will be called by JMLSpecial (or of another notification, which will be added in 5.4) - and so it's an instance - because it is bound to one style in this moment (therefore developers uses libraries - you can use it for all - but each user-call is an instance).

You only have to look, which AlarmPNG is used... the .png is located in one of the "sys"-Subdirectories of JMLToday.

And you an find out, which is used - if you look in Registry into HKLM/Software/Microsoft/CHome/JMLToday -> Key "sys" - the value contains the current used subdirectory of the user, e.g. "sys.original" or "sys" or whatever.

Then - you only need an icon, which should replace it, without loosing it. I would propose a new .png, which has no colors and is quite transparent, so in no style it would disturb. This .png is located in JMLLibrary - in essential graphic path...

An if necessary (because alarm is NOT within 24 hours) :

- rename Alarm.PNG in JMLToday-Directory to Alarm_original.png

- copy new (transparent) Alarm.png from JMLLibrary to current sys-Directory

- Toggle in HKLM/Software/Microsoft/CHome/JMLToday the value "updated" (0 or 1)

Done :)

And if Alarm is within 24 hours - then:

- check if Alarm_original.png exists

- if no: do nothing, it's still allright

- if yes: delete Alarm.png, rename Alarm_original.png back to Alarm.png

- Toggle in HKLM/Software/Microsoft/CHome/JMLToday the value "updated" (0 or 1)

Also Done :)

But think about, if this operation is safe enough, not to loose the users Alarm.png

I only thought about it just during writing this answer.

Therefore I made this easy,middle Scripts - so everybody can learn some tricks for mortscript, Titanium and Windows Mobile-System... and to understand JMLToday.

With the time - you will know how you can develop very powerful AddOns for JMLToday with this knowloedge :)

The other script (BatterPercentage) looks fine!!!! Thank you - have you tried together with a JMLSpecial-Call for your Skin, to check, if it's running properly. But I personally would say - it should work.

Thank you, TrashMan! I will add it to next library (I hope your nickname is in the comments of the mscr) - Good job!

@loulourp: Yes, that's possible. An good next possible Script for JMLLibrary.

Will work with Buttons, which JMHL will present soon.

I will add your proposal to wishlist

@ultravox: Many Thanx! Are you able to use this Script as template for a JMLLibrary-Script? ('course you can ask for special questions)

Thanx 2 All of you!

Micha