yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Themes] j101399j:
[EDIT] Shoot I realized my icons were not updaating, I fixed the code and uploaded the script file. XDA time 03:56pm

This is a great place to put these ++1 for starting the thread :)

Here is my version of chancer63's battery script, just like holdemdogg said, thank you goes out to chancer63 for starting that battery script idea. This version of the battery script runs every 15 minutes during normal daytime hours and every hour and a half during the night. It also displays when charging (you have to tap the icon to start it, unless you want to wait). When charging, it updated every 60 seconds. I have also built in a "kill" for the old location of the script, so help avoid errors.

To install;

Download and unzip the file

Copy the file into your iPhoneToday folder

Create an icon, and set the image to \iPhoneToday\battery\battery.png and set the executable to \iPhoneToday\battery\mybatterylevel.mscr. Now tap the icon and the script will do the rest. Please note that when you 1st start it, the level will be 100%; it will update in a few seconds from there.
[Windows Mobile Themes] j101399j:
I wanted to repost this here; I also have not tested it, but going to soon:
[Windows Mobile Themes] mickael91210:
Normally the file "1" is a programmed alarm for working days.

I will try to program a quick and a "programmed" alarm ASAP and export the reg.

EDIT : Programmed alarm is in file "1" and quick alarm is in file "2".
[Windows Mobile Themes] Sir.John:
SWeet, thanks for all your efforts :-)

edit: need to go home now, first. But will have a look at your output tonight.

John
[Windows Mobile Themes] holdemdogg:
Running battery percentages from storage card

I'm rewritng the script now so peeps can put there battery folder (the one with all the icons) on there storage card to save space I should have it done in a few. This should help with low memory devices
[Windows Mobile Themes] Sir.John:
As you seemingly still expierience problems I assume using RefreshToday.exe didn't do the trick. Just thought to mention it to spare others the hassle to mention it and think of something else (aka. complete the information at hand)

John
[Windows Mobile Themes] DarkPrinceByWWW:
Hi, i'm using iPT only as a today plugin,because of using rlToday eithr ;)

I'm thinkin abot to mod ur toggle scripts to disable the icon reload feature because of the problem,maye caused by iPT.
[Windows Mobile Themes] Sir.John:
I'm not sure whether I understand you correctly. You want to disable the reload_icons functions in my scripts as you suspect they cause the error in switching the wallpaper? Did I get this right?

Well, I can hardly see how that may be caused by the reload function but by any means: feel free to modify whatever you feel like ;-) Actually, you won't need it anyways if you intend to do a "hard reload" by using redrawtoday mortscript function or refreshtoday.exe.

John
[Windows Mobile Themes] DarkPrinceByWWW:
Ur scripts and my attempt to change the wallpaper are two separated things.

1) Ur scripts: the data script doesn't update the icon all the time, because of the key which has just disappeared. So i edited one line to check the other key (as mentioned in the iPT thread). The volume toggle script doesn't update the icon all the time either and sometimes the icons changes on its own :confused:

And one more thing: If i start some app that is establishing the data connection by itself, the data icon doesn't update for the good reason (because the icon wasn't touched). (solution: using Sys-to-Reg and creating a data module http://rotlaus-software.de/forum/index.php?topic=1192.0 )

So i was thinking about just to reduce the scripts to be only toggle scripts without updating the icons (or just to link the icon directy to VJVolubilis.exe and adding the parameter in iPT itself)

2) Wallpaper: I'm using iPT and rlToday. rlToday hasn't the same ability as iPT to change the skin by rotating the screen. So i need to use mort script to change the rlToday skin. I'm using Sys-to-Red and the screen module to change the rlToday skin path and to reload the whole today window, but only in the case the today window is in the foreground. My last mod is just to deactivate the rlToday plugin by rotating to landscape and to reactivate by rotating to portrait. The problem is: i created a special portrait wallpaper for the portrait, but it of course messed up in the landscape mode, so i tried to change the wallpaper with the same module (in StR), but i failed. The redraw folder seems not to be enough to load the wallpaper again :(
[Windows Mobile Themes] 12gage:
Sir.John, I just started having this issue with a message popping up and your scripts not working, it states :

"Another script is running. Please try again later. Exiting script now."

I'm able to execute other mortscripts but for some reason none of your toggles. Can you offer any help?
[Windows Mobile Themes] DarkPrinceByWWW:
@Sir.John: Hi, there are some things i wanna suggest to your scripts.

1) Next alarm: for this you could use the Reg value HKCU\State\Shell\Alarms "Next". Its in hexadecimal so you could use emerym's MSTime2Str function to translate http://rotlaus-software.de/forum/index.php?topic=1176.0:

Sub MSTime2Str
time=argv[1]
TimeFmt=argv[2]
pano=2343750
udif=194074440
time1=""
i=15
Repeat 7
time1=time1 & substr(time,i,2)
i=i-2
EndRepeat
ForEach x in charsOf ( time1 )
data[i] =HexToNumber(x)
i=i+1
EndForEach
i=1
last=0
ForEach val in array data
r=(last MOD pano)*16+val
data[i] = r/pano
last = r
i=i+1
EndForEach
i=14
p=1
tmin=0
Repeat 8
x=data[i]*p
tmin=tmin+x
i=i-1
p=p*16
EndRepeat
tmin=tmin-udif
tmin=tmin-TimeOffset
tmin=tmin*60
gtime = FormatTime(TimeFmt, tmin)
If (SubStr(gtime,1,1) eq "0")
gtime=SubStr(gtime,2,Length(gtime)-1)
EndIf
return (gtime)
EndSub

This value is only set if windows alarm is set (galarm uses the windows alarm).

I'am using it for rlToday (in sys-to-reg as a module).

2) Volue toggle script: If you choose the ON - VIBRA - ON and set the volume to off manually, so nothing happens if you touch the toggle button. Maybe you could complete this script like:

Before:

ElseIf ( voltoggle = 2 )
If (RegRead("HKCU", "\ControlPanel\Notifications\ShellOverrides\", "Mode") eq 1 )
Run(exepath&"\SetVolume.exe","-o")
Endif
If (RegRead("HKCU", "\ControlPanel\Notifications\ShellOverrides\", "Mode") eq 0 )
Run(exepath&"\SetVolume.exe","-v")
Endif

After:

mode=RegRead("HKCU", "\ControlPanel\Notifications\ShellOverrides\", "Mode")
ElseIf ( voltoggle = 2 )
switch(mode)
case (0) {.....}
case (1) {.....}
case (2) {.....}
Endif
... and so on for all 3 if loops...

Its not that necessary, but useful if one set the volume manually to off and wanna use the toggle button later without to set the volume back to off or vibration.
[Windows Mobile Themes] cpatchag:
Please don't shoot a guy for asking, but every time I follow the instructions for the battery Icon, I get "there is nothing associated with the file" Is there something else i am supposed to be running before the script? Fuze w/6.1 on ATT if that helps. Sorry for simple questions, just happy someone understands and keeps the rest of us in good usable stuff. Thanks
[Windows Mobile Themes] chancer63:
@cpatchag:

The title of this thread says it all: " Mortscripts for Icon based plugins". You have to install MortScript:

--> http://www.sto-helit.de/downloads/mortscript/MortScript-4.2.zip

CU
[Windows Mobile Themes] j101399j:
Mortscript is a really cool program that uses a simple script to do stuff on your phone; from something as simple as copying a file from one location to another, or opening a program with vibration; to opening and using the mouse (finger tap) to automate stuff. 1st install mortscript, then go from there.
[Windows Mobile Themes] mikemullin6:
Looks interesting. Any chance to get it modified to show 24 hour instead of 12 hour?

thx
[Windows Mobile Themes] j101399j:
Sure; all you really need is 12 more icons (13 - 24); and a modified code, since there is more abilitys with iPT; it should flow a lot better. I'll try and rewrite the code in the next few days, and will post it.
[Windows Mobile Themes] mikemullin6:
Thanks. If you want someone to beta test it, let me know
[Windows Mobile Themes] j101399j:
I have one that shuld work but it is not refreshing the icons correctly.

@scripters, any ideas?

[edit] never mind, found the issue. I was using runat and had it point to \iPhoneToday\Clock\clock.mscr and it should have been \iPhoneToday\clock\clock.mscr stupid caps. Oh well... Here is the new 12 and 24 hr version and it uses the new ReloadIcon; if you use it; let me know, if you find mistakes, let me know.

New two icon digtal clock

Install

1. Download attached zip file

2. Unzip and place "clock" folder into your iPhoneToday folder on your phone's root (\iPhoneToday\clock)

3. Edit the clock.mscr file; 1st part is where the hour icon is located. It will automatically place the minute icon next to it.

4. Set Milt to 1 if you want a 24 hr clock; or anything else for a 12hr clock

5. If you do not want this to overide existing icons; create 2 icons in the location where the hour and minute icons will be (for example, the default is the 1st page and 1st 2 icons). Press and add an icon, leave set the exec=\iPhoneToday\clock\clock.mscr and the icon to the blank minute icon in the clock folder; do it again (same options or you can use the blank hour icon; it does not matter since they will be replaced).

6. Tap one of the icons to start the script

Updates from 0.0.4

Uses new iPT reload icons feature

Added 13-24 hour icons

Fixes 1-9 hour icons to they don't say 01 they just say 1...

and minor changes to script

as a side note, turns out my clock is more acurate then the one programed into iPT, and mine is easier to read
[Windows Mobile Themes] j101399j:
Yes; edit the clock.mscr file on your PC and change the nScreen = 1 it will look like this:

###################################
#Set icon position and screen here#
###################################

# Icon Position
nScreen = -1
nIcon = 0

Remember it will take over 2 icons down there
[Windows Mobile Themes] Luroco:
I also get this message every time.

Any way to avoid this?
[Windows Mobile Themes] j101399j:
Voicemail script

1 Unzip the file

2 Place the vmail folder in your iPhoneToday folder, by default the icon that is changed is set to the 1st icon on page 1. (you can edit the vmail.mscr so it knows where the icon is if you want it in a different location).

3 Just set the icon exec=vmail.mscr and give it any icon.

4 Press the icon the start the script. This will run every 15 mins, and at noght every 2 hours; along with everytimke you turn it on.
[Windows Mobile Themes] Sir.John:
Hi everybody

Sorry for being gone for a while but life is a bit hectic workwise atm, so I don't find the time to actually work on the scripts right now. Sorry :-/

Anyways, just a quick note on the "Another script is running message".

this pops up if you have another script running that locks the registry (ipt-wise) for its own needs.

I.E. this means my toggle scripts contain the following strings:

is_registry_locked = RegRead ("HKLM","Software\iPhoneToday","lockRegistry")
if ( is_registry_locked <> 0 )
# If the registry is locked, exit now.
Message("Another script is running. Please try again later. Exiting script now.")

This means, if the registry is set to 1 it is locked and shouldn't be modified, so I put an exit here.

Problems may be caused if some other script that initially locked the registry and forgot to unlock it again.

How to solve it? Good question....

You can either comment this verification out. But this means you may run into problems if registry is actually altered when you run a toggle script

or

you can manually set the lockRegistry value in HKLM\Software\iPhoneToday to 0 again. Chances are, it reverts back to 1 whenever you run the faulting script.

kind regards,

John
[Windows Mobile Themes] coolsac32:
does anyone have an oem or ext package for all the mortscript toggle icons and functions. like gprs toggle, battery, wifi, bluetooth, phone, volume, and data? i tried to make one that works while cooking but i had no good results.
[Windows Mobile Themes] j101399j:
Nope, becasue these scripts are just text files, there is nothing to install. Just include mortscript as a pre-installed program along with the mscr files in your rom.
[Windows Mobile Themes] piet8stevens:
Toggle scripts and WM6.5

I have been using Sir John's toggle scripts with iPhoneToday buttons, and everything worked well under WM6.1.

Yesterday, I upgraded my TP2 to WM6.5 (with the official release from HTC), and while the scripts still toggle correctly, I now receive an error message each time I use them.

Has anyone else seen this problem? Any solutions known?
[Windows Mobile Themes] j101399j:
What does the error say?
[Windows Mobile Themes] piet8stevens:
WM6.5 error

I cannot find the error message - it just brings up the screen that tries to report the error to Microsoft. After having had that screen a few times, I disabled error reporting. But I would still like to know what is going on here. And also, by disabling the error reporting, I do not know what else is generating errors on my phone (if anything).
[Windows Mobile Themes] Sir.John:
Sorry to hear that :-(

I never had the chance to even see, let alone test, a wm6.5 device, all the scripts are untested.

My best, yet totally blind, guess would be that the registry keys to toggle the settings have changed in WM 6.5

If you open the scripts in a texteditor like notepad you should be able to find the registry keys I query to read out and modify the status of any of the settings. Have you checked whether these keys still exist on your WM6.5 and still do what they did in WM6.1?

John
[Windows Mobile Themes] piet8stevens:
WM6.5

Sorry, I forgot to mention the error is specifically re. VJVolubilis. But no detail on what the error does. And when I switch off error reporting, things seem to work.

Count on Microsoft to create confusion. BTW, WM6.5 is not worth it. No meaningful change compared to 6.1, as far as I can tell.
[Windows Mobile Themes] Sir.John:
What happens if you run vjvolubilis directly? If the error persists, I'm afraid tehre is nothing much I can do but look for anpther tool to make use of. The problem of vjvolubilis will be best addressed with vj555 directly. Dunno, if he still supports this app, though :-/

John
[Windows Mobile Themes] 12gage:
i too was having problems with 6.5, only with bluetooth so far. I toggled then tried to pair a headset and it said there was a problem with hareware. Is there a reg edit that I can undo?
[Windows Mobile Themes] freepc:
thank you

holdemdogg: I wanted to share my Battery percentage script and icons for iphontoday plugin.

This could not be possible without Chance63 Sir.John j101399 MiToNiOeS

Biglittlewhateva

thank you all, battery works good with wm6.5 on htc diamond2,

going to test other scripts for iPT

have a nice year 2010
[Windows Mobile Themes] holdemdogg:
Thank you very much to everyone maintaining this thread I have taken a break from windows mobile for a while and doing some stuff for vista and iPhones just trying to expand my knowledge I hope everyone understands. I still keep and eye out on alot of threads my email should be in my profile if I can help in anyway just send me a buzz.
[Windows Mobile Themes] freepc:
hi again

i made some experiments with battery.mscr script and now iPT produces error :(

so time to return a backup of iPT and start again :-)

yes, unfortunately development of iPT is stopped? so if you have a short free time it will be nice to make some graphical interface for setting of script, but it is not necessary of course...

have a nice day/night

F.
[Windows Mobile Themes] mustela7:
Hi,

I just played around to adapt sjtoggle to iPhoneToday v.1.4 upwards. It now works for me, but as I am not a professional here I just describe how I adapted the script files and let you or others do a clean update...

Besides adapting all shortcuts and some variables within sjtoggle.ini to match the new storage location of iPhoneToday (which is in the programs folder now), there are 3 things to change in (almost) all script files (mscr-files) to make it work:

change every occurrence of

"\iphonetoday\"...

to

"programme\iphonetoday\"... (normal path for german system)

"program files\iphonetoday\"... (should be the equivalent for english system?)

change every occurrence of

my_scriptname = SystemPath("ScriptPath") & "\" & SystemPath("ScriptName") & SystemPath("ScriptExt")

to

my_scriptname = "\" & SystemPath("ScriptName") & SystemPath("ScriptExt")

Because: from iPhoneToday v1.4 ongoing, the icons.xml file may store relative pathes, and so my_scriptname cannot be found anymore within icons.xml. this just reduces the variable to the script name, without any path. So beware of any scripts with the same name in different pathes...

Change every occurrence of

"<screen>"

to

"<screen header="

As iPhoneToday now accepts screen headers, and the syntax ist <screen header=... . There are normally two occurrences in every script file
[Windows Mobile Themes] Sir.John:
Hi mustela,

thanks for your elaboration. I'll try to update the scripts accordingly to reflect the changes to work with the new version(s).

Just the tidbit of your instructions I quoted above I will leave out for now, as to the best of my knowledge the paths are still absolute.

John
[Windows Mobile Themes] Sir.John:
Hi everybody,

after crawling the net for a while I had to learn that my beloved MortScript severly lacks support of Syntax-Highlighting in my favourite text-editors: UltraEdit and Notepad++

Alas, I decided to create them myself. Hoping this may proof helpful for you other MortScripters, here they are for download.

I assume, you know how to install it in UE and N++ ;-)

Enjoy!

John
[Windows Mobile Themes] Cerberus_tm:
Thank you, Sir John! Good work. (Now I only need to learn writing in Mortscript.)
[Windows Mobile Themes] howdykeith:
Those are very cool. I added em at the Mortscript Source Compendium under Mortscript Code Dictionaries.

Thanks much,

Keith

Long live Mortscript

Down with wm7
[Windows Mobile Themes] paulojdaniel:
Hello

I can not get this clock running the latest version of the IPT.

Any help?

Thank you.
[Windows Mobile Themes] tito12:
Same problem here: it's running but all the time and reduces the performance of the device seriously. I couldn't stop it with task manager, had to reset and delete the mscr to break the loop. Yet great idea if corrected :)
[Windows Mobile Themes] howdykeith:
Shouldn't that be:

SystemPath( "ProgramFiles" ) \ "iphonetoday"

Then it is localized and will work on all languages...
[Windows Mobile Themes] cdkbzh:
Hello,

Sorry for my broken English...

Is there the same thing as "battery level script" with IphoneToday but about used memory and the size of used or free storage spaces (sdcard, nandflash...) ? (with nice icons...)

Thanks.
[Windows Mobile Themes] wildcardspv:
Mortscript help

Hi,

I've recently started creating my own WAD themes and could do with some scripts for Mortscript, but I have no idea how to write them!!

My question is:

Would it be possible to write a script which would eliminate steps in the author menu?

For example:

I have a 'favourite contacts' screen and currently to add someone to it I have to go through the following steps to get to where I need to be:

enter author mode>>add widget>>speed dial

Is it possible to write a script which when executed jumps straight to the 'add speed dial' step, so that I could set up a button to execute the script and add a new speed dial in one press?

If so, is it also possible to write scripts to jump straight to 'add widget>>button/shortcut/dock' etc?

If this is possible, can anyone write them for me please?

Or give me some help to write them myself?

Many thanks,

wildcardspv

:)
[Windows Mobile Themes] j101399j:
UPDATE: I have a new and better script for 12/24 hour clock that works a lot better later in this thread

Here is my clock script. Now that IphoneToday has a clock, this is not that useful, plus it is very choppy since it has to relaod IPT every 60 seconds. Other then that it worked great.

I am posting it more as a learning script for anyone wanting to learn. It is long but simple. If you have questions on it, please feel free to PM me
[Windows Mobile Themes] holdemdogg:
First post updated with the instructuions to run battery folder on sd card for low memory devices
[Windows Mobile Themes] j101399j:
Do you guys know if there is a way to keep a veriable active after the script runs, like a global variable? When settings the battery icon, if the icon displayed is still active, then it could skip the steps of re-replacing the icon and resetting IPT. I think it would speed things up and save a little battery life.

Maybe use MortScript to create, look at and edit a dummy Reg value?

Ie:

#set reg value at end of code
If (batt > 95)
RegWriteDword ("HKLM","Software\battery\iPhoneToday","IconUsed",1)
ElseIf (batt > 84)
RegWriteDword ("HKLM","Software\battery\iPhoneToday","IconUsed",2)
...
Else
RegWriteDword ("HKLM","Software\battery\iPhoneToday","IconUsed",0)

Then when the code reruns it would check that value and if the current % sets the same value (uses the same icon), it would competly skip replacing the icon and resetting IPT. I have not worked out the coding for that, as it would take a little more thought; but is it possible, will this work?
[Windows Mobile Themes] holdemdogg:
I see where your going and this would help tremendously because at this point using the scripts you will get an error that states bad icons.xml because when Iphonetoday refreshes itself and on the screen your not displaying the battery.png anymore which is wrote in the icon settings. the problem is that its not updating the .xml quick enough and it gets caught between the 2 icons the battery.png and which ever one is displaying. This seems like it only happens when charging?

Am I off here or are others getting this error to besides me and Biglittlewhateva

@ Biglittlewhateva try this script over write the other one see if error goes away only took out some new stuff thats was added (if your still running on your sd card). Only thing is it will not show a charging icon.
[Windows Mobile Themes] Sir.John:
@mickael91210

thanks to your rawdata, I was able to try to incorporate g-alarm in my alarmscript.

May I bother you to try it out, as I myself haven't g-alarm installed.

Find the two files required enclosed. Just get rid of the "test.txt" extension and do the adjustments evtl. neccessary. Thanks in advance :-)

John
[Windows Mobile Themes] j101399j:
I know how to make this work, I just need to know what the MortScript commands that look to see if a reg entry even exists, and how to create a new one (step 2). Here is the layout (and this would work with any icon changing code)

1. Test if charging

-----Yes: Set charging icon and end ecript with RunAt(...

-----No: Setp 2

2.Test if reg entry exists

-----No: Create one = 0

-----Yes: Read value and store in variable named "last"

3. Get batt %

4. Use if/elseif/else to test batt % and set result (0,1,2,3,4,..11) into variable "current" This will also be used to set the icon

5. Test if ("last" = "current")

-----Yes: End script with RunAt(...

-----No: Step 6

6. Use if/elseif/else (current = #) to overide icon

7. Reset iPT

8. End script with RunAt(...
[Windows Mobile Themes] Sir.John:
read regkey:

regkey = RegRead("HKCU", "\Software\...\", "key")

If (regkey ne "")

...

write regkey:

RegWriteDword ("HKCU","Software\...\","key",value)

test if charging

this should work:

if ( ExternalPowered() = 1 )

...

Hope this helps!?

Good luck :-)
[Windows Mobile Themes] j101399j:
Yes, big help, thank you :). I have the new code almost done, I'll post it for testing.
[Windows Mobile Themes] mickael91210:
Hello and Thanks John,

I think it's a very good idea to gather both (maybe more...) Alarm Softwares. I will test your ini and script but I think there will be an error because if I suppress an alarm or if I disable a "programmed" alarm the "ID" stays the same. It is the reason why i test if "programmed" alarm is "active" and if the file "ID" exists.

I'm testing . . .