View Full Version : [AddOn+HowTo for JMLToday]WeatherBackgroundChanger as Example[Titanium]
MichelDiamond
27th July 2009, 07:07 PM
Ok - like promised - here now the explanation, how you could make your own AddOns for JMLToday.
It's good to do this with an example - and therefore I will use my "WeatherBackgroundChanger"
But at first:
To use it - you need JMLToday as Titaniumplugin -> *View and Download JMLToday* (http://forum.xda-developers.com/showthread.php?t=540413)
I want to introduce the Names as start, so you will know the Differences:
JMLSpecial/Specials: This is the name of the developer interface for additional Script, which you can bind to ONE Skin.
It will be call while "Updating" by ContextMenu - after reading the Weather Information (will be also called after "Updating", when Internet is not available).
It has a name convention, so that JMLToday knows, which Script belongs to which Skin.
You can use it e.g. to change the Directories for the Skin-so you mustn't overwrite the existing meteo-sys-,battery-,clock-,...whatever-Files for your skin - you can fast switch between Skins & Images at the same time!
But you can also call Scripts from the JMLLibrary.
Each JMLSpecial-Script is stored direct in the JMLToday-Directory and starts with "JMLSpecial_.....mscr"
JMLLibrary/Library: This is the name - almost all Developers uses "libs", "Libraries". There you can find Skripts which CAN be used by EVERY Skin. The call is made over the JMLSpecial.
Each JMLLibrary-Scripts is stored direct in the JMLLibrary-Directory.
I hope we will find some developers here, who wants to can or want to learn a little bit MortScript - to make a great Library, which can be usesd by the Skinners.
Graphics: I call them by intention not "Images" - to make a difference, if I use this word. Some Library-Scripts will use additional Graphics - also my example here. They must be stored in a strice Directory-Structure to avoid collisions by multiple use of the JMLSpecials.
There are 2 different kind of Graphics:
- essential: These Graphics are a "Must" for the system, if the wouldn't be available, the Titanium-System would fail. So this images must always remain on Main Storage
- common: These Graphics are not a Must for the system. If the wouldn't be availsable - the maxiumum which can happen, that a short error-message would come from JMLToday - or you would see a "red cross" instead of the Graphic. Now you know, why I made this difference... these common graphics can be moved to the Internal Storage. And if you use your Device as USB-Stick for your PC... then you would have no access to your Internal Storage - and so also no access to the common graphics.
But that will be the decision of each User - he can change the path for the common graphics in Registry.
I will make somewhen a script to make this change automatically.
So everybody can decide on it's own, what is more important for him - more free Main Storage - or the Accessability to Icons also during PC-Connection as USB-Stick
Ok - the Directory-Structure is simple to use - I "paint it" now :) - JMLLibrary is also in your Program-Files-Folder - on the same level like yours "JMLToday":
<Program-Files-Folder in MainStorage>
.|-->JMLLibrary
..........|-->Graphics
.........................|-->common
.........................|-->essential
.|-->JMLToday
Don't be afraid - I have made a .cab which integrates the Version of the Library and will make the correct Registry-Entries and provides the directory-structure and of course the Library-Scripts.
If you write one on your own, then you can make (if it's a bigger/more complicated Script) a new thread with this AddOn. If it's a smaller script - you can publish it in the Skins/AddOn-Thread from JMLToday: *klick* (http://forum.xda-developers.com/showthread.php?t=540116)
Sounds complicated? :) No - it isn't - but I will put the Download of the first JMLLibrary in the following post (#2) with the exact explanation of the WeatherBackground-Library-Skript.
In the Post #3 - there I will show you - how to call the Library-Script from JMLToday with JMLSpecial-Function - and you will get 2 new skins to download, which uses the WeatherBackGroundchanger. Don't forget - you need the .cab of the current JMLLibrary to use Skins, which uses the Library - so install .cab from Post #2 (later on the newest version will be also found in Skin&AddOn-Thread (http://forum.xda-developers.com/showthread.php?t=540116))
and afterwards on of the both skins from Post #3 (one is for normal Titanium, all resolutions QVGA,WQVGA,VGA,WVGA, the other one for Titanium7-Project and VGA)
MichelDiamond
27th July 2009, 07:08 PM
#2 Library
Fine - from Post #1 you know the directory structure - now let's go to our example - the WeatherBackgroundChanger.
You will see, how powerful and easy it is, to make something like such a Background-Changer
The Library-Script should look at the current weather and because of this changes your complete titanium Background. If it's sunny, then you will get a picture of a Sun as Background... and so on (Screenshots in #3)
Have in mind - it's a Library-Script - so it will be stored direct in the "JMLLibrary"-Directory
I've chosen the name (it's free how you name it - no convention, but I recommend to start at least with JMLLib_...) : JMLLib_weatherbackgroundchanger.mscr
The graphics are stored in /<Program Files>/JMLLibrary/Graphics/common/weatherbackgroundchanger
It's not necessary to put them in essential - if the graphics wouldn't be found, than only the copy wouldn't work and the current Background would remain. I called the pictures "sun.jpg" "flash.jpg"... and so on.
They are VGA-Resoltion at the moment - but you can change them to the size, which you need - and also: everybody likes other pictures... feel free to change them. But never change the filenames :)
OK - and here's the code - all the code above the ################# you mustn't touch - it's always the same - it only provides you the pathes.
As Developer you only have to make the Part under this ##########
- and withoutout comments... it would be very short and you see - it's easy:
# Made by MichelDiamond, 27.07.09
# Version 1.0
# Description:
# Changes the Background of Titanium according to the Weather-State of JMLToday - VGA
# following pathes are still the same - no need to change it if you make your own Library-Script - each script in /<Program-Path</JMLLibrary
LibraryPath = SystemPath( "ScriptPath" )
CommonGraphicPath = RegRead ("HKLM", "Software\Microsoft\CHome\JMLToday","CommonGraphicPath")
EssentialGraphicPath = LibraryPath&"\Graphics\essential"
# no update during phoning
If (RegRead("HKLM","System\State\Phone","Status") AND 537067520)
exit
EndIf
############################## Now we can start with our own script
# Weather-Icon is available?
if (RegValueExists("HKLM", "Software\Microsoft\CHome\JMLToday\Page1","Icon") = FALSE)
exit
endif
# Get WeatherIcon
weathericon = RegRead("HKLM", "Software\Microsoft\CHome\JMLToday\Page1","Icon")
# Get number as String ( Icon= <jmlpath>\meteo\<number>.png )
weatherpng = Part(weathericon , "\", -1)
weatherstring = Part(weatherpng,".",1)
# Weather -> Backgroundpic (if nothing is found it's sunny)
picname="sun.jpg"
Switch( weatherstring )
Case( 27,29,31,33,45,46 )
picname="moon.jpg"
Case( 6,8,9,13,14,18,19,21,22,26,39 )
picname="cloud.jpg"
Case( 1,2,10,11,12 )
picname="rain.jpg"
Case( 3,4,12,17,35,38,47 )
picname="flash.jpg"
Case( 5,7,15,16,25,40,41,42,43 )
picname="snow.jpg"
EndSwitch
# Copy this pic from ...graphics\common\weatherbackgroundchanger to Wallpaper in Windows-Directory
# The Wallpaper's name is e.g. Stwater_480_640.jpg (VGA) - other resolutions corresponding
# you can find the Wallpaper in Registry-Key "HKCU\Software\Microsoft\Today\Wall
# For example with VGA the content of this key is "\windows\stwater_480_640.jpg"
source=CommonGraphicPath&"\weatherbackgroundchanger\"&picname
dest=RegRead("HKCU", "Software\Microsoft\Today","wall")
Copy(source,dest,TRUE)
# Titanium Refresh must be made by the calling script
exit
I think the comments are good to understand, what this script does.
But only remind, if you also make an AddOn with the Library: You can use each Registry-String, each file... you can manipulate all Registry-String... and so there are soooooooooo much possibilities for AddOns.
OK - in Post #3 will be the both Skins, which uses this Library-Element and they change the Background according to the weather.
Here is the download for the Library - it's international format and will install in the correct directories (But don't forget... you need a skin, which uses it - but meanwhile you can change the Graphics to your favorite Graphics and Resolution)
The current download of JMLLibrary is to find: *here* (http://forum.xda-developers.com/showpost.php?p=4191732&postcount=2)
.
.
MichelDiamond
27th July 2009, 07:08 PM
#3 Weatherbackground-Skins with Screenhots
Good - now it totally easy - but I want to explain, how every Skinner can use the Library - and now we are at JMLSpecial - the developer interface (look at Post #1)
There is a strict name convention! But it's easy to know:
After "Updating" (Context Menu - I think with 5.3 will come the automatic update-possibility) - there CAN be called the JMLSpecial-Script.
But it's only called, when it exists - in my example, the .plg (the Skin) has the name "JMLToday_weatherback.plg"
And the corresponding JMLSpecial-File must have following Name: JMLSpecial_<Skin-Name>.mscr
And so the Name of the Calling-Script must be "JMLSpecial_JMLToday_weatherback.mscr"
Do you check the trick? If you want to add something to your Skin or if you want to use the JMLLibrary, you need this JMLSpecial_<the name, how you baptized your Skin>.mscr
So if you want the Background-Changer for your Script... you only have to rename the JMLSpecial_... of this example - nothing else.
Ok - here is the code - the same as above in #2 - there's no need to change something above the ###################, if you want to do something with another Library-Item - the Rest is easy:
# Made by MichelDiamond
# Here: Static - only to set the Path-Variables - nothing to change.
# JMLTodayPath
instPath = SystemPath( "ScriptPath" )
# Path, where Library is to find
LibraryPath = RegRead ("HKLM", "Software\Microsoft\CHome\JMLToday","JMLLibraryPath")
# Path where the common graphics are stored
CommonGraphicPath = RegRead ("HKLM", "Software\Microsoft\CHome\JMLToday","CommonGraphicPath")
########################### Call in Library JMLLib_weatherbackgroundchanger_VGA.mscr
libspecial = LibraryPath&"\JMLLib_weatherbackgroundchanger.mscr"
if (FileExists(libspecial))
CallScript(libspecial)
endif
### Refresh Tianium to show new Pic
Sleep(500)
RunWait(instPath&"\CHomeRefresh.exe","")
Exit
What's the result? - here the screenshots (pay attention to the weathericon and the Titanium-Wallpaer):
JMLToday_weatherback.plg (VGA,QVGA,WVGA,WQVGA) (I didn't changed my double-size-Style - in a "normal" Titanium the panel will have no empty space in the lower half) :
http://www.pictureload.org/files/jl7na7uphvw1l90ukgnh.png -Update Weather-> http://www.pictureload.org/files/d536fvr10p87c57nmy8n.png
Download: *klick* (http://forum.xda-developers.com/attachment.php?attachmentid=209596&stc=1&d=1248726380)
JMLToday_WM7_Analog_vga_weatherback.plg (VGA,Titanium7-Project) :
http://www.pictureload.org/files/yx32cvy720ik69fg2jkj.png -Update Weather-> http://www.pictureload.org/files/x74st676w1fudx62f37n.png
Download: *klick* (http://forum.xda-developers.com/attachment.php?attachmentid=209597&stc=1&d=1248726380)
If make here only a .zip and no .cab for the skin... why? Because there's almost no need for a .cab - each Skin has only 2 Files (The .plg and the corresponding JMLSpecial_...mscr) - and not very much people knows how to .cab it international. And to copy the files in a directory - I think it's easier for some people than installing a .cab :)
A .cab is more important for a skin, which uses own Graphics for Weather, Battery,Clocks,... but that will be anoher example.
If you have questions or imrovement proposals for the Library or the JMLSpecials - please answer here in this example-Thread!
And give Feedback how you like it or not :)
If you makeyour own Library-AddOn - make a new Thread or post it in the Skin-Thread - then I will update the Library-Cab (of course with mentioning and praising your name :) )
Very important for all users, who only wants this Backgroundchanger:
You don't need to understand anything above this :)
Only install the JMLLibrary-Cab from Post #2 and take here the Skin, you want and copy the content of the .zip-File into /<Program Files>/JMLToday
Here's the Skins - enjoy your changing Background (and change your Background-Picures in /<Program Files>/JMLLibrary/Graphics/common/weatherbackground how you like it - only the filenames must remain the same. I took for here only some arbitrary pictures, which I found somewhere in xda-devs as wallpaper.
Hope it was good to understand, that you can make your own AddOns
Have Fun!
MichelDiamond
27th July 2009, 07:09 PM
#4 How to .cab this Library - perhaps I will explain it somewhen
At the Moment <perhaps for future use>
MichelDiamond
27th July 2009, 10:39 PM
OK - I'm finish :)
For all who wants to install the Skins - just install the Library-Cab from Post #2 and afterwards copy the extracted files from the .zips in Post #3 to your JMLToday-Directory. (Screenshots of the new Skins also in Post #3 )
Change the Skin by Contextmenu to the new Skin - and enjoy that your Titanium-Background changes like the current weather is in your JMLToday :)
One Tip: If you don't like, that after a Refresh the Default-Windows-Clock-Plugin is active (CClock) - then have a look at the *FAQs - Frequently Asked Questions* (http://forum.xda-developers.com/showpost.php?p=4198340&postcount=8) who to make JMToday your Default Clock PlugIn in Titanium.
Have Fun!
Micha
PierreDiamond
28th July 2009, 08:00 AM
haha. I made update of weather,the wallpaper changed, that saw my collegue with his iPhone. I believe he also want Windows Mobile :p
Works! Long explanation but simple to install. luvit
JMHL
28th July 2009, 09:48 AM
MichelDiamond : SUPERBE ! (in french)
A++
AGxM
28th July 2009, 10:17 AM
Wow nice work Michel!
Not for me as I like my West Ham wallpaper.......but may adapt for my own use. Very impressed with this tool
MichelDiamond
28th July 2009, 01:20 PM
Wow nice work Michel!
Not for me as I like my West Ham wallpaper.......but may adapt for my own use. Very impressed with this tool
Therefore I called it "example" - so you can see, what's possible - and you can create it suitable to your personal preferences. Perhaps you share it with the other West Ham - Fans :) (or you have a completely different idea - now you know how powerful this little extension can be).
But hey - don't make the Background according to the result of the latest game of West Ham - could sometimes making depressive :) But you can make your own weather-Icons according to the last results of West Ham perhaps..or instead of the clock showing the results? :) All of this would be possible now
@JMHL: Thanx :)
Jumba
28th July 2009, 03:57 PM
Oh wow, what possibilities. :) Man, I gotta make a new skin. Excellent work, I can see this going far!
MichelDiamond
28th July 2009, 10:12 PM
Yes - I know - we can also furthermore talk about new possibilities, what should be in the Library.
Very much download of the Library in the short time - I want to know, if each resolution really works - and if the update works also - could I have some feedback for it, please? (want to assure hat the .cab is completely bug-free, because it's the basic)
I would be also interested, wheather it works,when stwater_... is not the standard wallpaper.
If not - could somebody try instead of
RunWait(instPath&"\CHomeRefresh.exe","")
the little bit farer way with MortScript-Command
RedrawToday
There's no sense if I try it on my own, because the command above works fine on my device
Jumba
29th July 2009, 06:42 PM
Hi
Unfortunately the script isn't working on my device.
I've tried RedrawToday instead, but still the wallpaper isn't changing. I believe I've followed all the steps...
Installed the Library cab
Copied both the .mscr and the .plg to my JMLToday folder
Ran Update
I took a look at the JMLSpecial .mscr - should this line
JMLLib_weatherbackgroundchanger_VGA.mscr
not be
JMLLib_weatherbackgroundchanger.mscr ?
I'm not sure why it's not working but I'll keep investigating.
MichelDiamond
29th July 2009, 09:25 PM
:) I think I know what's the problem: Please have a look into your today settings - is "stwater...." your Background-Picture? Because the Registry-Key points to this graphic.
Please try to change this Setting in your today (to be found in \windows as "stwater_<your resolution>"
(and change the graphics in \<programfiles>\JMLLibrary\graphics\common\weatherbackgroundchang er to your resolution - then it looks nicer.
I normally use S2V for changing my background - and this also accesses this reg-key and only change this graphic. (Had the same case yesterday in german forum)
Please give feedback, if it works. Then I know the Library is correct cabbed and I can make further library-.cabs.
Thanx for answering
Micha
Jumba
30th July 2009, 09:09 AM
:) I think I know what's the problem: Please have a look into your today settings - is "stwater...." your Background-Picture? Because the Registry-Key points to this graphic.
Please try to change this Setting in your today (to be found in \windows as "stwater_<your resolution>"
(and change the graphics in \<programfiles>\JMLLibrary\graphics\common\weatherbackgroundchang er to your resolution - then it looks nicer.
I normally use S2V for changing my background - and this also accesses this reg-key and only change this graphic. (Had the same case yesterday in german forum)
Please give feedback, if it works. Then I know the Library is correct cabbed and I can make further library-.cabs.
Thanx for answering
Micha
Hi
I think the problem is the script is looking for stwater_x.jpg while my system uses stwater_x.png
?
Jumba
30th July 2009, 10:52 AM
Aha, I got it!
I've found if you're using a Today theme (selectable by going to Settings -> Today) it won't let you choose a file in the Windows folder to use as the background.
If you have a theme selected (eg GlossBlack) and don't have "Use this picture as the background" selected then it removes the "Wall" key entirely from the registry. If you then select "Use this picture as the background" it won't let you choose any file in /Windows to use as the background.
http://img.photobucket.com/albums/v684/Jumba123/todaytheme.png
I found I had to manually edit the registry value to read "\Windows\stwater_240_400.jpg" - then changed the skin and ran an update.
It's now working! But I think other people may run into issues if this registry key doesn't exist on their devices. Maybe there's another way around this? One possible solution is to do a check if the key exists first and then create it if it doesn't.
MichelDiamond
30th July 2009, 02:11 PM
Cool :) Thanx for the exact description also! :)
Yeah - there can be made any improvement to any script in the Library.
It's only Version 1.0 of weatherbackgroundchanger - and I also intended to make a check if the weather has changed - otherwise he shouldn't change the Wallpaper at all.
I will have a look - but there must be an other Registry-Key, which describes it (which Registry Value did you change?)
To get a .png instead of a .jpg would be easy... just rename ;) Titanium is in this case very nice to the programmers.
But ok - the weatherbackgroundchanger is only one example for the JMLLibrary... but now I'm confirmed - the JMLLibrary works - and the .cab installs the Directory-Structure and Registry-Values abolutely correct. :)
So we can go on with the other AddOns - who has fun in programming some little MortScripts - here's some MortScripts we need:
http://forum.xda-developers.com/showthread.php?t=542229
Please take a little time (I would estimate it wouldn't take even a half hour to make the "easy" scripts and test it) and try yourself on one of this Scripts - some are totally easy and with the example here - no problem to make it. Also for people who have never programmed with MortScript - learning by doing.
I will add your Scripts to the JMLLibrary (with highlighting your name of course) - there's nothing more to do for you.
The Skinners can use your Scripts in Library like they want afterwards.
Jumba
30th July 2009, 07:13 PM
which Registry Value did you change?
As mentioned all I did was manually add the String "Wall" with the value \Windows\stwater_240_400.jpg
;)
Looking forward to more scripts. I've never made one myself, but I suppose there's only one way to start.
lro2005
31st July 2009, 05:12 AM
Great Job!
nuuuuts
31st July 2009, 06:25 AM
As mentioned all I did was manually add the String "Wall" with the value \Windows\stwater_240_400.jpg
;)
Looking forward to more scripts. I've never made one myself, but I suppose there's only one way to start.
+1 regarding the reg key. I tried installing S2V but it wont let me view pictures in the \windows folder, it displays the folders but nothing within the windows folder.
could you provide additional information on where we need to add the reg key.
thanks
MichelDiamond
31st July 2009, 08:34 AM
In Post #2 is the source code of the BackgroundChanger V1.0 - the link is: HKCU\Software\Microsoft\Today\Wall
But it's only read, to know, where the wallpaper is to find.
I have another .tsk, which doesn't change the Windows-Default - so it worked. But it don't work, if this Value is not set.
I o wanted to make an 2.0 of WeatherBackgroundChanger, that it only changes the wallpaper, if the weather would cause annother wallpaper.
It's only an Examp for the JMLLibrary, that everybody can help to expand it. And only to update the Library for one script... (change meanwhile the String manually)
We really need some simple mortscripts for this Library - because of your and our ideas:
-> click here and have a look if you can help or have further ideas, which should be in the Library <- (http://forum.xda-developers.com/showthread.php?t=542229)
If I have 1-2 more Library Items (most wished: "isNight" at 3. and "Next Alarm within the next 24 hours" at 12. ) then I will add the weatherbackgroundchanger 2.0 to the next Update of JMLLibrary, too.
Micha
nuuuuts
31st July 2009, 05:34 PM
As mentioned all I did was manually add the String "Wall" with the value \Windows\stwater_240_400.jpg
;)
Looking forward to more scripts. I've never made one myself, but I suppose there's only one way to start.
In Post #2 is the source code of the BackgroundChanger V1.0 - the link is: HKCU\Software\Microsoft\Today\Wall
Micha
@Michel thanks for creating the library and the application, it works great. I look forward to seeing what you have in stored for us in the future. I'll take a look at the add-ons, hopefully I can help out, not that great of a programmer but took a class several years ago, maybe it will come back to me.
@Jumba - thanks for figuring out that issue with the use background image, everything works great.
would you be able to provide some information about the time near the weather information. Is not the time that I last checked for an update. Could it be something with msn, when msn last got their information?
THANKS A LOT!!!!
MichelDiamond
31st July 2009, 06:23 PM
JMLToday is programmed by JMHL - I develop and regulate the things around and we coordinate each other, what should be new and how it's gonna be to achieve :) (and: My English is better than this from JMHL - but his C++ is very well :) )
Ehm-yes - you don't get the time of your last update - you see the time, when the weather feed was last time updated for "current" weather. It's a little bit more "honest" than accuweather ;)
Thank you for the possibility to help - some scripts are really easy - also if you'd never developed or it was a long time ago... (and MortScript has a very good manual to find needed Commands very easy with examples: *click* (http://www.sto-helit.de/index.php?module=download&action=view&entry=64) )
One question not to oversee something - to all who read it:
Which Task-Theme (.tsk) do you use and what's the value of your "HKCU\Software\Microsoft\Today\Wall" ?
(Or where else do you find your wallpaper in registry? )
Would help to improve weatherbackgroundchanger.
Thanx
Micha
nuuuuts
31st July 2009, 07:01 PM
One question not to oversee something - to all who read it:
Which Task-Theme (.tsk) do you use and what's the value of your "HKCU\Software\Microsoft\Today\Wall" ?
(Or where else do you find your wallpaper in registry? )
Would help to improve weatherbackgroundchanger.
Thanx
Micha
I've attached an image of what them i'm currently using. I'm using NFSFAN's rom 0109 rom. The theme says it's NFS Modern theme.
the stwater_480_640.jpg file is located in the windows folder. Used touch commander and created a new string as Jumba mentioned and add I added the information he provided.
the value for the wall is: \windows\stwater_480_640.jpg no quotes
MichelDiamond
3rd August 2009, 12:07 AM
Thanx for information,
I made a new version of weatherbackgroundchanger 2.0 (you still need JMLLibrary 0.1 and a skin which uses the weatherbackgroundchanger)
Changes:
- remembers the last Background and so only change if the weather change
- Set in Registry explicit the Wallpaper to /windows/stwater_<your resolution> , because some .tsk uses another.
But it's possible that some Tasks sets some other Values, that stwater won't be loaded - but perhaps these are Task, which don't allow an automatic set of another wallpaper - then you should have a look in the Settings of your Home (Start->Settings->Home(Settings) ) and choose the stwater_... in your windows directory as Wallpaper.
I don'T want to change other Keys which could make it, because .tsk could be incompatible. It's better to have the secure method - but I think it should work on the most .tsk ... and a simple Settings-Change for some other.. is ok :)
Would somebody please try it, before I cab the new Library? (only overwrite the file in JMLLibrary with the file in attachment) Thanx for feedback (PN or here)
MichelDiamond
3rd August 2009, 08:26 PM
Thank you for the PNs - Version 0.2 of JMLLibrary now uploaded:
http://forum.xda-developers.com/showpost.php?p=4191732&postcount=2
AGxM
3rd August 2009, 11:33 PM
Cannot get this to work :(
Loaded the Library version 2.
Copied the plg and the mscr to JHML Today folder
Have changed wallpaper to stwater, checked the registry and have the graphic files in place but wallpaper stays as my default one.
Am I missing something simple here?
MichelDiamond
4th August 2009, 02:03 AM
at first: Check if the JMLSpecial-Filename is correct.
Then please have a look to stwater_... .jpg - which graphic is inside?
I mentioned that windows mobile 6.5 don't tellyou the right Wallpaper which it uses sometimes...
The you must go to your home settings and explicit choose stwater...jpg as Wallpaper and set the "checkmark" for "use this...."
Are you sure, that there is a ".jpg" which is in your windowsdirectory?
And please have a look with CHome-Editor into JMLToday - there must be 2 Values
HKLM,Software\Microsoft\CHome\JMLToday-> JMLLibraryPath = Program Files\JMLLibrary
and
HKLM,Software\Microsoft\CHome\JMLToday-> CommonGraphicPath = Program Files\JMLLibrary\Graphics\common
Or very simple - could you try the standard -.tsk-File if it works?
It's really a mysterium, why on some .tsk it doesn't work.
All what Jumba and nuuuts said, have you tried?
(if you know Mortscript - you can have put " message("Hallo1") " in the scripts on some places to have a look, if the Scripts are really called) And rememeber - in 2.0 the wallpaper will only be changed, whe the weather changes - and so perhaps it jumps out before it do anything.
Edit: Set any wallpaper with S2V as Today portrait - then the keys should be overwritten, too. And then try weatherbackgroundchanger (if you change "Icon" in Page1 you can simulate an other weather).
My feedback is so long, that 2.0 works on almost all .tsk - but not on all .tsk
AGxM
4th August 2009, 10:49 AM
Michel
Thanks - all now working. een a bit boring with wallpapers but can now experiment a bit more visually at the weekend.
MichelDiamond
4th August 2009, 11:39 AM
Fine :) Which of the hints have helped, that it worked?
The wallpapers looks really great!
I have forgotten to say something: The JMLLibrary-Cab's concept is made in that way, that it doesn't overwrite existing images in "common" or "essential", if it's updated.
So everybody can change the graphics like he wants - they will remain. My pics were only examples - some people perhaps other favorites (perhaps without Weather-Pics, too) - and the wallpaperchanger can be used to swap between this graphics,too. Espcially if you use other resolutions - it won't be overwritten. Whatever you want :)
But I think I will use your Wallpapers now - they are looking really nice - and I'm sure, that some other users will use it, too (Do you have 'e without WestHam? Not that I don't like it... but you know... germany :) But if England will be Champion next year I will take it-and you must take the Graphics with German Pics, if we will be Champion, ok? *g* But I must say - the English premier league,is the best of the world)
Thank you
Micha
AGxM
4th August 2009, 12:17 PM
Thanks Micha
I think it was the registry setting which did it - adding the stwater string.
Hmm I've changed theme and the weather skin doesn't work again.......more back to the drawing board.
MichelDiamond
4th August 2009, 01:12 PM
Yes, because the other theme doesn't have a JMLSpecial...<Theme name>.mscr
So the Library isn't called. Only copy the JMLSpecial_weatherback.mscr according Post #2 and #3
AGxM
4th August 2009, 04:10 PM
I meant phone theme, not JMHL today skin.
Jumba
4th August 2009, 04:37 PM
I meant phone theme, not JMHL today skin.
Is the theme GlossBlack by any chance? I'm wondering if there are some themes that override the wallpaper entirely, even when you have "Wall" set in the reg.
AGxM
4th August 2009, 06:00 PM
Is the theme GlossBlack by any chance? I'm wondering if there are some themes that override the wallpaper entirely, even when you have "Wall" set in the reg.
Not GlossBlack but M Carroll's other black theme.....no worries will watch for new developments not sure I like the weather idea and not up to writing my own script yet
MichelDiamond
4th August 2009, 07:45 PM
There are so many themes available - and every author of the Themes use sometimes very special Scripts for background -if it doesn't work with one Theme (.tsk) - rhaps it would be good to ask the author.
I think that's setting the Wallpaper with S2V would set some of the keys todefault, so that it works with other Themes, too.
JMLLibrary is for special wishes, which can be used or not - it's a service for the Skinners, who can use it to make special Skins for the users, who like it.
Jumba
7th August 2009, 10:34 PM
Hi, so I've managed to get the isNight script working to replace the clock between 20:00 and 06:00. I'm just having one issue - how to get it to auto-update. I've tried enclosing the code between "While" tags, like so...
While ( 1 )
...
Sleep 30000
EndWhile
But the problem is that it won't let me run Update again - it looks like it's looping and not allowing other mortscripts to run.
If I remove the "While" tags it works fine - but only when I hit Update. The script doesn't continuously keep monitoring the time.
This is how my JMLSpecial looks...
While ( 1 )
########################### Call in Library JMLLib_isNight.mscr
libspecial = LibraryPath&"\JMLLib_isNight.mscr"
if (FileExists(libspecial))
CallScript(libspecial)
endif
########################### Check the registry
clockpath = RegRead("HKLM","Software\Microsoft\CHome\JMLToday","clockA")
daynight = RegRead("HKLM","Software\Microsoft\CHome\JMLToday","isNight")
########################### Is it a new clock?
if (not FileExists("\Program Files\JMLToday\"&clockpath&"\clock_bg_b.png") )
copy ("\Program Files\JMLToday\"&clockpath&"\clock_bg.png","\Program Files\JMLToday\"&clockpath&"\clock_bg_b.png",1)
endif
########################### Do the change
if (not RegValueExists("HKLM","Software\Microsoft\CHome\JMLToday\Page1","isseta") )
RegWriteString ("HKLM","Software\Microsoft\CHome\JMLToday\Page1","isseta","0")
endif
if (not RegValueExists("HKLM","Software\Microsoft\CHome\JMLToday\Page1","issetb") )
RegWriteString ("HKLM","Software\Microsoft\CHome\JMLToday\Page1","issetb","0")
endif
isseta = RegRead("HKLM","Software\Microsoft\CHome\JMLToday\Page1","isseta")
issetb = RegRead("HKLM","Software\Microsoft\CHome\JMLToday\Page1","issetb")
if (daynight=1)
if (isseta=0)
copy ( CommonGraphicPath&"\isnight\clock_bg.png","\Program Files\JMLToday\"&clockpath&"\clock_bg.png",1 )
RegWriteString ("HKLM","Software\Microsoft\CHome\JMLToday\Page1","isseta","1")
RegWriteString ("HKLM","Software\Microsoft\CHome\JMLToday\Page1","issetb","0")
Sleep(500)
RedrawToday
endif
endif
if (daynight=0)
if (issetb=0)
copy ("\Program Files\JMLToday\"&clockpath&"\clock_bg_b.png","\Program Files\JMLToday\"&clockpath&"\clock_bg.png",1)
RegWriteString ("HKLM","Software\Microsoft\CHome\JMLToday\Page1","issetb","1")
RegWriteString ("HKLM","Software\Microsoft\CHome\JMLToday\Page1","isseta","0")
Sleep(500)
RedrawToday
endif
endif
Sleep 30000
EndWhile
MichelDiamond
7th August 2009, 11:03 PM
JMLSpecial is called while Updating - no automatic in 5.3 or another calling.
Of course you could do a 24/7 mortscript, but I would almost never recommend such a script. (And your problem: Each mortscript can only run once at the time - and JMLToday tries to run it again - it's an implicit protection before While(1)'s in Special :) )
The only automation in 5.3 is the one-day-update - which also calls the JMLSpecial.
You would have to set this to 8 pm and on 8 pm you should change it to 6pm with the JMLSpecial.
But the user has also it own Update Time, too, so his should be considered.
But therefore, that's no internet necessary for an update, everybody could press "Update" manually,because he's anyway looking on the clock.
And in next JMLToday-Verson we will have a look, how we get a better solution for this (24/7-Loops should be done by JMLToday itself in C++-Code)
We must be sure, that the automatic scripts are light and easy to use - because one of the primary goals of JMLToday is to use very low battery and almost no performance issues.
OK for you, that we will have a look? - and for now - I personally wouldn't be disturbed by this manual update. But it's good to know,what can make JMLToday even better and better :)
Thank you
nuuuuts
18th August 2009, 01:13 AM
i seem to having some issues using the analog clock with the weather background changer. I copied over the file to \Program Files\JML Today and it does say vga on it. It seems that it hangs lower than it should. If I enable the JML_Today_First, everything looks good, it moves up and displays the info.
I've attached a pic a of what the analog clock weather background changer looks like.
thanks
MichelDiamond
19th August 2009, 02:47 PM
Oh... it hangs very low :) Sunset :)
Perhaps because of plg-Resizing (which .plg does cause this effect?) - please have a look into this .plg - perhaps only the Resolution was changed, but not the Positions. Which Resolution do you have? What did you copy to JMLToday?
I estimate, that's nothing to do with weatherbackgroundchanger - this will be only called from the Skin to change Background - it doen't make anything with design.
Only the wallpapers should be in your Resolution - have a look into JMLLibrary/graphics/common/weatherbackgroundchanger - they are all VGA. Convert it to your Resolution, e.g. with IrfanView on your deskop.
nuuuuts
19th August 2009, 06:00 PM
Oh... it hangs very low :) Sunset :)
Perhaps because of plg-Resizing (which .plg does cause this effect?) - please have a look into this .plg - perhaps only the Resolution was changed, but not the Positions. Which Resolution do you have? What did you copy to JMLToday?
I estimate, that's nothing to do with weatherbackgroundchanger - this will be only called from the Skin to change Background - it doen't make anything with design.
Only the wallpapers should be in your Resolution - have a look into JMLLibrary/graphics/common/weatherbackgroundchanger - they are all VGA. Convert it to your Resolution, e.g. with IrfanView on your deskop.
My phone is a touch pro and it does have vga resolutions. I downloaded/copied over the .zip files from post 3
JML_WM7_Analog_weatherback_vga.zip and copied it to the \Program Files\JMLToday folder.
While looking at the other JML threads there was some info about downloading some application that will resize the .plg file, is that correct?
Thanks
MichelDiamond
19th August 2009, 06:18 PM
Aah :) Now I understand! Everything with WM7in Skinname is for Titanium 7 Project. Compare with my introductions about Skins -> http://forum.xda-developers.com/showpost.php?p=4191730&postcount=3
You use standard Titanium and so i's too low, because Tit7 uses double Panel Size and (unfortuntely) BronzeListView, too.
You should move each Item more than 120 Pixel upwards, to get it in normal size. The plg-Resizer would not help for that - the skin was orignially made for VGA - but only for Tit7.
Nothing to do with JMLLibrary/weatherbackgroundchanger.
Greetz
Micha
ric69
19th August 2009, 06:23 PM
Arf sorry wrong thread !
idtyu
27th August 2009, 03:49 PM
Hey , my place is SINGAPRE and how am i supposed to set the weather?
MichelDiamond
28th August 2009, 01:01 AM
Perhaps somebody of the users which speaks your language should translate JMLToday - then you will have the whole surface in your mother-tongue
Singapore?
weather.msn.com -> Singapore = http://weather.msn.com/local.aspx?wealocations=wc:SNXX0006&q=Singapore%2c+SGP
Therefore: SNXX0006
bigboy292000
13th September 2009, 04:40 AM
OK I must be very cofused... or something.
I can't get the weather changer to work?
I installed the latest library.
I then copied the "all resolutions" skin (my device is QVGA) into the JML folder.
I then went and restarted Titanium. Then installed the skin.
It all went well, but still - no background change? All I get is the default backgroud that came with the theme.
Then I went and created the Wall registry string and set it to stwater_240_320.jpg in Windows folder.
Still no joy - the default paper does not want to change?
I am using the "Ron Arad Orange" theme and the "use the wallpaper" is checked and it is pointing to the stwater paper. I also reloaded the skin about 20 times, restarted Titanium about 25 times and still nothing?
Using Vortex ROM v3... http://www.ppcgeeks.com/forums/showthread.php?t=74278 any ideas?
I also verified JLM registry settins to graphics and library, paths are correct...
MichelDiamond
13th September 2009, 12:25 PM
The WeatherBackgroundchanger has some problems with some tsk - and there are some problems for the system, to handle it. But you used the WeatherBackgroundchanger from JMLLibrary 0.3?
I have posted the SourceCode, what it does.
Please check this - then we can have a look, what's the cause -also read the Posts here in Thread - there are already some solutions.
- Look into the JMLToday-Directory: Your Skin, which you choosed must also have the JMLSpecial_<your JMLToday-SkinName>.mscr in the Directory. And there must be the correct Link to the JMLLibrary with the weatherbackgroundchanger-Script - but allof this should bethere full-automatic. But please have a look
- Has your ROM perhaps a write protection in Windows? Look into the stwater<your res> -do you find there the Picture from the current weatherbackground? It must be there. If not - copy with total commander on of the Pics to Windows as stwater... afterwards there's no more write-protection.
- Try to update weather - and afterwardsselect manually the stwater... in Windows-Directory - will it be displayed?
bigboy292000
13th September 2009, 04:32 PM
Ha, interesting...
Two things I did:
- There was JMLSpecial_JLMToday_<your JMLToday-SkinName> and I copied it and created JMLSpecial_<your JMLToday-SkinName>
- The stwater files WERE rea-only, and I fixed that too.
Then I went to reinstall the skin, updated and in few minutes - it kicked in and started working. :)
Thanks!!!
MichelDiamond
13th September 2009, 04:47 PM
Cool - I'm glad that you managed it - now you will never oversee the current weather :)
This read-only in some ROMs is sometimes really annoying - but difficult to manage.
Thanx for your feedback - will help some others,too, I think
Micha
previn
13th October 2009, 09:38 AM
This is a great script, which I cant quite get to work...
The files get changed when the weather icon changes but it wont refesh the background. So I can see the reg values are correct & the correct picture is in stwater but it doesn't refresh it.
If I go to home settings & select it manually it comes up straight away.
Any Ideas?
thanks
AGxM
13th October 2009, 05:30 PM
Sadly I could never get this script to work either.....
MichelDiamond
13th October 2009, 05:55 PM
@previn: Did you tried this, too: http://forum.xda-developers.com/showpost.php?p=4242111&postcount=23 ?
I wanted to check it if I have WinMo 6.5 final-ROM. There must be some .tsk or something else, why it sometimes don't work on some devices. Direct choosing does the same. But I don't have this bug - and so it's hard to test - it's something like "blind" developing because of assumptions.
So - could you also have a look, if this .jpg is write-protected?
Perhaps we could find it out alltogether.
Micha
previn
13th October 2009, 08:10 PM
The reg entries are all correct. Currently using Hikey's 23064 rom. I've tried built in themes & custom themes, all produce same result.
I've also changed script to point directly to the image files rather than stwater, the reg entries change & the home settings change but the screen doesn't refresh.
If I then go into the home settings & manually select the file that is already selected it then refreshes!
Everything in the script seems to work perfectly until the very last line, everything is correct but it just doesn't change without manually selecting. Is it perhaps the redarw command just doesnt somehow register that the wallpaper has changed, is there another command necessary to do this?
many thanks
MichelDiamond
13th October 2009, 11:20 PM
I tried some different "Refreshes" / "Redraws" - but like I said - I saw no differences on my device - and I never heard, that one worked better, if backgroundchange didn't work.
If you search a little bit in board - I also never found a perfect solution for other Threads with similar problems - it seems to be a mistery :)
But: It's not the end - I will look for some "deeper" functions - perhaps the MSDN has something in store.
Did you have a look for write-protection on stwater-File?
But yes - here must be another command - otherwise a manual change wouldn't have an effect... but so far, I didn't found it somewhere...
If sombody has a hint (wceload perhaps?) - I always thought that RefreshToday only calls
::SendMessage(HWND_BROADCAST, WM_WININICHANGE, 0xF2, 0);
Mmh- I will look into...
Micha
mderm
9th April 2010, 12:20 PM
I use JMLToday 5.7.
I copied JMLSpecial_weather... to skins/default and renamed to JMLSpecial_default.mscr
Checkbox in home settings is checked, no write protection
when I run update, picture did not change, so the script did not run? How can I test this. BTW did not work when I put the special script into JML folder, either.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.