aspirt ,
on my BA SetBacklight runs on 5+, try not to anything else. Try to write about it on the developer forum, it is very fast and adequate reaction _
http://www.sto-helit.de/forum/viewforum.php?f=4Meanwhile, the new beta:
-------------------------------------------------------------------------------------------------------------------------------------
3.2b15 ... _
http://www.sto-helit.de/downloads/pocketpc/MortScript-3.2b15.zip Some bugfixes: RunAt did not work without parameter, GetTime did not regard the time zone (but returned GMT time).
-------------------------------------------------------------------------------------------------------------------------------------
3.2b16 ... _
http://www.sto-helit.de/downloads/pocketpc/MortScript-3.2b16.zip It contains only MortScript.exe for PocketPCs, i.e. no other versions for the time being, and other tools / DLLs must be taken from b15 if required ...
But now to the changes: I made first steps to enable arrays and functions. This means you can use something like% array [% index%]%. You can also use strings and expressions for the index:% array [ "x" & SubStr ( "123", 2, 1)]%.
The latter example shows also what's ment with functions.
Additionally to SubStr (which also works with two parameters if you want all the text to the end), there are currently ToUpper (string), ToLower (string), IsExternalPowered (), and GetBatteryPercentage ().
ToUpper / ToLower return the given string converted to upper / lowercase. In spite to the Make ... commands, the original string is not modified, and you can use expressions - like for all function parameters (e.g. MakeUpper (% x% \% y%)).
IsExternalPowered () returns 1 (true) if the device is charged, and 0 (false) otherwise.
GetBatteryPercentage () returns the current battery level. Depending on the device, this value might be wrong if the device is charged.
Example:
% numberAsText [1]% = "one"
...
% numberAsText [100]% = "hundred"
If (IsExternalPowered () or GetBatteryPercentage ()> = 20)
Message {"Battery level:" &% numberAsText [GetBatteryPercentage ()]% & "%"}
Call backup
Endif
PS: Without false modesty to say that a number of the latest goodies (since beta12 somewhere) came through correspondence with Mort'om on his forum. With stunning speed and quality of implements wild fantasies users :)