PDA

View Full Version : Active Battery Icon in Settings: Updated with CAB


showaco
17th June 2008, 05:35 AM
Here's a little mortscript package I put together so that the icon displayed in the battery page of settings panel will be active and change with battery percentage remaining.

Just install the cab and then goto program files\battery and run either battery.mscr or battery.exe. This is only one time to get it started, then it should run updates itself and restart itself after a reboot so you can forget about it. Note: if you get a message about the battery file isn't associated with an application, then run the mortscript.exe first and then the battery file.

I only included the rainbow battery images in the cab. The zip files are other battery images packs. To change image packs, download one of the zips and copy the images folder within it over your current program files\battery\images folder. If you want to save the rainbow images, rename the images folder before copying the new images folder over it.

NRGZ28
17th June 2008, 06:08 AM
Nice.. I ve always wanted to do this but I never had the time... I ve got some nice PNGs for you to use with about 10 increments :)

Question though.... do you have to open up some other application that takes the focus away from the homescreen in order to see the battery icon changes.... or not ?

showaco
17th June 2008, 06:33 AM
No other app needed, just run the battery.exe one time and forget about it. It only updates and replaces the icon that is already located on the battery/settings panel. This way the icon changes with the percentage more or less shown on the panel. And since the name of the icon in the reg never changes after being set the first time on installation, as you rewrite the icon, no homescreen reload is needed. It just updates automatically. The icon battery packs I got from my ipod touch, which is set up as 17 images for about every 6 percent change.
I just wrote this today so if it doesn't work let me know or feel free to fix and post changes. If you have more icon packs, go ahead and post them. If they're not 17 images, then we would have to slightly modify the script.:D

Svoms
17th June 2008, 07:02 AM
nice work man, looking forward to see it!

lukybandit
17th June 2008, 07:13 AM
Great job, Showaco. Will install it and let you know. Keep up the good work.

NRGZ28
17th June 2008, 07:45 AM
No other app needed, just run the battery.exe one time and forget about it. It only updates and replaces the icon that is already located on the battery/settings panel. This way the icon changes with the percentage more or less shown on the panel. And since the name of the icon in the reg never changes after being set the first time on installation, as you rewrite the icon, no homescreen reload is needed. It just updates automatically. The icon battery packs I got from my ipod touch, which is set up as 17 images for about every 6 percent change.
I just wrote this today so if it doesn't work let me know or feel free to fix and post changes. If you have more icon packs, go ahead and post them. If they're not 17 images, then we would have to slightly modify the script.:D

You didn't understand me at all. What I'm asking is... does the icon on the homescreen update in REALTIME or is a homescreen "refresh" needed. Let's say you're on the settings page with the battery icon... Let's also say your script replaces the icon with something else RIGHT NOW. Now.. does the icon change in front of your eyes, or will you need to go away from page, or open up another window that covers the homescreen and go back.. to see the new icon ?

showaco
17th June 2008, 08:13 AM
I haven't actually sat and watched it when update was running. But I know a homescreen refresh is not needed. I think, and if anyone knows for sure then chime in, that when the icon changes, if you were actually on the battery page, that it would not update in front of your eyes. But if you were on a different panel and the update runs, then you moved to that panel, that the updated icon would be there. I don't think its necessary to go to an app and then back but I will try to check it out and get back to you.

NRGZ28
17th June 2008, 08:22 AM
The way my weather app works is, the icon only changes after another app's window gets on top of the homescreen (even if just for a brief second). I'll %100 sure the settings panel will exhibit the same behaviour. Not putting your application down or anything, this is all because I was just curious if you found a way to refresh a static icon in real time...;)

Do you intend to make a cab for it... etc ? :)

showaco
17th June 2008, 08:30 AM
Ok, I checked out the icon updating by connecting to activesync and writing over the icon while I watched screen.
If you are on the battery page during updating of icon, it doesn't show. If you change pages or panels and back again, then the new icon is there.
If you are anywhere else on the homescreen when update occurs, then the new icon will be there when you look.
There is no need to leave homescreen and come back(like opening an app) and there is no need to reload homescreen for update.
So for clarification, if you're watching the battery icon waiting for the big icon changing show, it ain't gonna happen.:)
But if you are anywhere else but the battery page, the update happens without your knowledge and it will be there when you look at your battery page. And if you are on the battery page during update, the icon won't change in front of your eyes but it you look a page left or right, a panel up or down, and then look again, it would be updated.
Is that what you mean?:)
This is only meant as an enhancement to the current battery page, not a replacement.:cool:

showaco
17th June 2008, 08:38 AM
Do you intend to make a cab for it... etc ? :)

Let's try it a day and see if its working. Then, if you get time, could you make a cab for it? I just threw this together today while I was bored at work, and finished writing it after work, so I really haven't tried it out to much. If you got any ideas just throw them in, because I would like to hear them.

showaco
18th June 2008, 03:09 AM
Ok, now that I've used it for a day, I have a couple of things to improve upon but overall seems to work fine for me. Has anyone else had time to try it, did it work for you or not?

outerdepth
18th June 2008, 03:14 AM
Dude, I love this
This is great
Nice work, man. I think this is exactly the kind of new addition we all need to out WM6.1. Thanks.:)

hurtavy
18th June 2008, 09:21 AM
Nice script, but it is necessary to add command RunOnPowerOn("\My Documents\battery\battery.exe")

coppertop24
28th June 2008, 08:10 PM
I was just looking for something like this the other day. I have a set of battery icons from the iphone that I wanted to use, how would i go about making the changes? Or would it be easier just to send them to you?

coppertop24
28th June 2008, 08:58 PM
** oops **

coppertop24
28th June 2008, 09:03 PM
i installed this on a Q9c and it seems to work with the exception of the icons being pinched. Looks like they were resized width-wise to fit in the same area alloted to the original icon area. Is there a way to fix this? Also, can we add an icon for when the battery is being charged?

ThePaleAle
10th July 2008, 11:34 PM
Battery.exe does not run... it gives me a message saying that its not associated with any program. Also where do i find the runonstartup command?

TabletGuru
11th July 2008, 01:09 AM
ThePaleAle, Mortscript installed?

showaco
11th July 2008, 06:22 AM
Battery.exe does not run... it gives me a message saying that its not associated with any program. Also where do i find the runonstartup command?

you need latest mortscript to run, version 4.11b7, and can find it here: http://sto-helit.de
For a run on startup, there's two ways to do it.
1: Add a link to battery.exe in windows\startup or,
2; add a line into battery.mscr: RunOnPowerOn("\file location\battery.exe)

ThePaleAle
11th July 2008, 09:15 PM
awesome guys mortscript worked great

faus_zayas1
12th July 2008, 12:16 PM
Wow i am lost :( ill wait for a cab.

tennisshoeninja
12th July 2008, 10:49 PM
Wow i am lost :( ill wait for a cab.

lol Same here .... seems real cool

showaco
13th July 2008, 06:07 AM
Probably will never see the cab version as I don't use this anymore, unless someone else would like to make one. I personally don't use a settings panel because I think its a waste of space and most of the info and settings I can see on iconbar or set with the push of a key already. This was just something that I was toying with for a while.:)

faus_zayas1
13th July 2008, 08:59 PM
its cool dude... i just like trying new stuff out... trying to learn a few things in the process so i too could help out.... but as you said its a waste of space so ill take you word on it.... any updates on the pocket sports or something of the other.... if so pm me or write a response in the appropriate thread thanks a lot....

ThePaleAle
23rd July 2008, 07:09 PM
you need latest mortscript to run, version 4.11b7, and can find it here: http://sto-helit.de
For a run on startup, there's two ways to do it.
1: Add a link to battery.exe in windows\startup or,
2; add a line into battery.mscr: RunOnPowerOn("\file location\battery.exe)

Now when I try to run Battery.exe or battery.mscr it says "can't find 'battery' (or one of its components). Make sure the path and filename are correct and that all the required libraries are available'

:confused:

showaco
24th July 2008, 02:19 AM
Now when I try to run Battery.exe or battery.mscr it says "can't find 'battery' (or one of its components). Make sure the path and filename are correct and that all the required libraries are available'

:confused:
ok, is the battery folder in My documents or somewhere else?

ThePaleAle
25th July 2008, 02:49 PM
ok, is the battery folder in My documents or somewhere else?

Yes it's in the \my documents\ folder

showaco
25th July 2008, 05:24 PM
Ok, sounds like its not registering with mortscript, run the mortscript.exe and see if that helps. Which battery icon pack are you using? I think I'm going to put these in some cabs and I'll start with that one.:)

ThePaleAle
25th July 2008, 07:42 PM
Ok, sounds like its not registering with mortscript, run the mortscript.exe and see if that helps. Which battery icon pack are you using? I think I'm going to put these in some cabs and I'll start with that one.:)

the rainbow one
ty

showaco
26th July 2008, 03:19 AM
First post updated with cab for rainbow battery image installation.
:)
Added new images zip files to first post.

znial
27th July 2008, 04:23 PM
working really fine (on my littele oxygen too)
my settings dock now is more customized, and i am more happy :D
thnx for your work, and thanks for the cab version also (i'm a noob and cannot manage with mortscript)

big up!

Bupahs
27th July 2008, 10:10 PM
I love Mortscript! I use it for everything I want automated and a few scripts that run my GPS applications on my Dash.

showaco
27th July 2008, 11:14 PM
I love Mortscript! I use it for everything I want automated and a few scripts that run my GPS applications on my Dash.
yeah, its a great and easy to use scripting language.:D