Remove All Ads from XDA

[HowTo]JMLPanex (example with new JMLLibrary and JMLToday)[for all JMLToday-Versions]

2,222 posts
Thanks Meter: 272
By MichelDiamond, Retired Recognized Developer on 27th August 2009, 09:37 PM
Post Reply Email Thread
Hi 2 All,

here like promised the Example how to use JMLPanex for your Plugin - and at the same time an Explanation of some Titanium-Fuctions, you perhaps don't know - and a new JMLToday-Skin... and a new JMLLibrary from me later on.
So something which could also make JMLToday-Skinner gives the Infos to make powerful Skins... because I only explain the Basics... you will see, there's much more possibilities then (especially with JMLToday 5.4 together with JMLLibrary 0.3)

Everything I will explain - is based upon

JMLPanex 0.98...2.10 and above ( )

JMLToday: *klick here*

JMLLibrary: *klick here*

You can have each Titanium-Plugin with workable Buttons!!! And that's easy! Also as User - but easpecially the Plugin-Makers will recognize the use of this revolutionary Extension for our Titaniums!

The most of my Explanations will run already - for some things you must wait for the cab for JMLLibrary 0.3 (still testing it) und JMLToday 5.4 (beause of the notifications) - but it's good to have a future glimpse

The main reason is the integration of JMLPanex - which is important for all Plugins and JMLToday at the same time.

Will begin in Post #2 - here only some remarks - like FAQs to JMLs:

- The workable Buttons must be (0.98) inside the slider! Outside of it a tab wouldn't be recognized - indifferent if it's defined in .pnx or not

- It works with all Skins which uses TitaniumListView - it won't work with BronzeresListView!!! To know, if you have the correct format (TitaniumListView) and not the old one, which was originally made for Smartphones - ony look inside your .cpr - you will see it in the first 10 lines.
Or look on your Screen - if you have Space above your Top-Panel - it's TitaniumListView - if your Slider is not centered on all plugins - you have BronzeListView

- JMLPanex is Beta - and please report in JMLPanex-Thread any Bugs - not here!!! Also Integration in your ROM - it would be better in the JML-PanexThread than here - I could add some things later as HowTo. Here's the description and you can discuss about Styling Tipps / Skinning and so on

- It's written in C++ - and it doesn't need an additional process on your device! So no Battery Drainage or slowing down system like a running process! (and especially of course no 24/7-Mortscript which has side effects on your Titanium, and much more Battery Drainage and Performance-Loss than other processes)
So you can use JMLPanex in your ROM, too

Go on in Post #2

27th August 2009, 09:37 PM |#2  
MichelDiamond's Avatar
OP Retired Recognized Developer
Thanks Meter: 272
Donate to Me
Let's start - and don't forget - i use JMLToday and JMLLibrary only as example - if you are making your own Plugin - it will work exact the same - and I would wish I would have each Plugin on my Handy with workable Buttons:

Let's have a look on our example - I made a new Skin for JMLToday:

All quite the same you know?
No - everything on the Slider are Buttons!
With a tab on SMS you go into Messages, tap on phone to Phone History, tap on Wifi will toggle it on and off, tab#1 onBluetooth will switch it on, tap#2 will make it visible, tab#3 will switch it off again !

You can put EACH executeable File into JMLPanex and associate it with each Graphic- or Text-Item on your Slider! On each Plugin, you have installed

Let's have a look how it works - you know it from CHome-Editor - but we look direct in the Skin-File - it's in Titanium something with suffix ".plg" - mostlyb"default.plg" - in JMLToday it's <name of the skin>.plg

a little part of it:

<Layer ID="Page" Clip="False">
      <!-- JMLToday : meteo Page1 -->
      <Image ID="BGA" Left="64" Top="-170" Width="150" Height="150" ScaleStyle="Fit" Opacity="0.9"/>
      <Image ID="HA" Left="64" Top="-170" Width="150" Height="150" ScaleStyle="Fit" Opacity="1.0"/>
      <Image ID="MA" Left="64" Top="-170" Width="150" Height="150" ScaleStyle="Fit" Opacity="1.0"/>
      <Image ID="BGAO" Left="274" Top="-170" Width="150" Height="150" ScaleStyle="Fit" Opacity="0.9"/>
      <Image ID="HAO" Left="274" Top="-170" Width="150" Height="150" ScaleStyle="Fit" Opacity="1.0"/>
      <Image ID="MAO" Left="274" Top="-170" Width="150" Height="150" ScaleStyle="Fit" Opacity="1.0"/>
      <Image ID="CalPNG" Left="44" Top="-25" Width="390" Height="35" VerticalAlignment="Top" ScaleStyle="Stretch" Opacity="0.5" />
      <Image ID="BattPNG" Left="10" Top="-185" Width="48" Height="52" ScaleStyle="Fit" />
      <Image ID="SmsPNG" Left="392" Top="30" Width="84" Height="72" ScaleStyle="Fit" Opacity="0.8" />
      <Image ID="TelPNG" Left="19" Top="24" Width="84" Height="72" ScaleStyle="Fit" Opacity="0.8" />
      <Image ID="Icon" Left="152" Top="-70" Width="190" Height="190" ScaleStyle="Fit" />
      <Image ID="AlarmPNG" Left="12" Top="112" Width="26" Height="26" Opacity="0.8"/>
<Image ID="AlarmPNG" Left="12" Top="112" Width="26" Height="26" Opacity="0.8"/>
      <Text ID="Alarm" Left="42" Top="115" Width="340" Height="80" FontFamily="Tahoma" FontSize="6" FontStyle="Regular" Wrap="True" HorizontalAlignment="Left" VerticalAlignment="Top"/>  
      <Image ID="WiFiPNG" Left="105" Top="45" Width="60" Height="60" Opacity="1.0"/>
      <Image ID="BlueToothPNG" Left="325" Top="45" Width="55" Height="55" Opacity="1.0"/>
      <Image ID="EmailPNG" Left="212" Top="40" Width="80" Height="72" Opacity="1.0"/>
      <Text ID="OperatorName" Left="152" Top="92" Width="120" Height="40" FontFamily="Tahoma" FontSize="7" FontStyle="Regular" Wrap="False" HorizontalAlignment="Right" VerticalAlignment="Middle">
        <TextStage TextOffsetType="TextOffsetDropBottomRight" Color="#00000000" TextOffset="0" BlurFactor="0" Alpha="1.0"/>
        <TextStage TextOffsetType="TextOffsetNone" Color="#FFFFFFFF"/>
Some of them I marked bold. The .plg-File will be added to your .cpr-File of Titanium.

That's the Names of the Text or Graphic-Items - you can use. If you look into CHome-Editor on Page1 - you will find exactly this Names. With a path to the Graphic-File or a text entry.

And now - we look into the .pnx-File for JMLToday - so it's JMLToday.pnx and is to find in JMLPanex-Path:

EmailPNG=%WINDOWS%\tmail.exe;-service "ActiveSync"
SmsPNG=%WINDOWS%\tmail.exe;-service "SMS"
You see all the Names - but linked with an application.
And that's all, what you have to do - look into your .cpr-File andyou know each Name of the Graphics - and your device will know this as Buttons - if ou actived JMLPanex.

The Activation is a simple Start of a Mortscript in JMLPanex-Installation-Path:


Start it - choose the Plugin, which you want - e.g. "FavoritePeople" - choose "All Pages" - and if you have made a FavoritePeople.pnx - then each Item will be associated with your personal wish, what you want to call!

Go on in #3
27th August 2009, 09:38 PM |#3  
MichelDiamond's Avatar
OP Retired Recognized Developer
Thanks Meter: 272
Donate to Me
The way youcall, with or without Parameters - everything is already explained in JMLPanex-Thread:
It's explained in - Post #1 and #2 - so I mustn't repeat it.

I will only show you now some possibilities which you can do now - for this examples with JMLToday you will need the JMLLibrary 0.3 - because it's heavily expaned to use the Butons. In JMLToday the external calls to use from the Skinners are as Standard to make it easier in JMLLibrary.
Some of you will know the Weatherbackgroundchanger ( from the Library, which changes your backgroundaccording to the current weather, or "isNight" which makes the Skinner easily able to make a day or night clock or so.
But in 0.3 there will be all to switch on Wifi,BT,GPRS,Phone-Toggle,... and also some more nice things.
It uses some free little apps - 2 credits I want to give at this place (in JMLLibrary-Download-Post for 0.3 then bigger ) :
- vj555 for VJVolublis and
- APBilbo for his little free standalone Tools from ThrottleLauncher
Thank you!

and of course some things are written mostly by me, JMHL or other members: *Wishlist for JMLToday/Library

Here's a possibility:

Hmm - you don't see something special?
The right picture shows the same PAge after pressing on one of the forecast-Icons - so you have easily a weather panel - which later on perhaps with the long version of weather - on one Page! Buttons make it possible
Only added some JMLLibrary-Functions in .pnx:

In 0.98 it's not ossible to all Mortscripts with Parameters - because Mortscript has a little strange way to be called - but we will see in next Verisons perhaps. But duplicating Mortscripts is the same as Parameters.
The Library only changes for 5 Seconds the Registry-Values of "IconA","TextA"... with "Icon1","Text1",...
Here's the main code for Switch for Day 2
# Made by MichelDiamond, 26.08.09
# Version 1.0
# Description:
# If you press a Forecast-Icon on Page2 - it will put the informations for 5 Seconds in the Main-Area - then switch it back
# Buttons must be correct linked with JMLPanex:

# 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"



# save entries for switching back
mainIconA=RegRead ("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","IconA")
mainTempA=RegRead ("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","TempA")
mainTextA=RegRead ("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","TextA")
mainDate2=RegRead ("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","Date2")

# and switch
rein=RegRead("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","Icon"&glimpseday)
RegWriteString("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","IconA", rein)
rein=RegRead("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","Temp"&glimpseday)
RegWriteString("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","TempA", rein)
rein=RegRead("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","Text"&glimpseday)
RegWriteString("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","TextA", rein)
rein=RegRead("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","Jour"&glimpseday)
RegWriteString("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","Date2", rein)



# and back again

RegWriteString("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","IconA", mainIconA)
RegWriteString("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","TempA", mainTempA)
RegWriteString("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","TextA", mainTextA)
RegWriteString("HKLM", "Software\Microsoft\CHome\JMLToday\Page2","Date2", mainDate2)


Simple, ey?

But let's go to #4
27th August 2009, 09:38 PM |#4  
MichelDiamond's Avatar
OP Retired Recognized Developer
Thanks Meter: 272
Donate to Me
only one more example - very interesting also for the JMLToday-Users and Skinners.

Sorry I only had less time to make the new Library and the Example (busied with TitaniumRSS - had to break Beta-Finalisation for 3 days) and so I want to apologize for the Button-Graphics... 'm sure that some Skinners will make them much nicer than a developer

Here's a JMLLibrary 0.3-Function which wil add Page3 to JMLToday... SMS as Example :

If somebody knows, where the contact pictures are to find in device - please tell me - I don't had time to search.

And some nicer Buttons, too

You have counted?
That's more than 20 Images in this JMLToday-Skin - the Titanium-Limit.
(at this place at first thanks to
and our conversation and his great findings.
In TitaniumRSS I will use some more great things... be surprised perhaps... but now - how to overcome this 20-ITem-Limit?

A .plg (Skin-File) has nothing which describes the Page- it's indifferent for it - the more top an item is listed, the more below it's in display level... but PAges? No. Now have a look into CHome-Editor:

Left you see the Value "tempA" of Page2 - on the Right the Value "tempA" of Page3

In .plg - they are both the same! Compare Screenshots from Page2 (Weather) with (SMS-)Page3 - do you see it?

Each Icons are on the same place - but they have completely different Values.

so only add to .pnx:
And The Titanium-Limit with 20 Text and 20 Image-Items is because of the .plg. But not in Page... In Page4 Email , in Page5 System-Info? No Problem - if you use the same Positions and the Icons of the plg (I could also use the items you have seen in Page1 and Page2 all together ) - so if you are creative (and Skinners are creative ) - you can make extraordinary Skins - and the Pages3,4,5,... are supplied by JMLLibrary-Functions, which you can choose - or make a new one and I will add it...
And then there's no need to change system-variables of Titanium, making crazy cab-Files.. and as Skinner - no need to know how Programs work - only call it
In JMLToday 5.4. each notification like SMS,Bluetooth, Phone, Wifi, Time,Weather, ... will have an interface to a Script, which a USer (or Skinner) can choose. Here - the JMLLIbr_SMS_Refresh.mscr in JMLLibrary wil be called from a new SMS-notifcation and will update automatically.
But in 5.3 you can already use it - but with manual refresh.

And back to JMLPanex - each Page can have it own Buttons... and this is Page3 - same Names, but different Page - and therefore JMLPanex is a real Killerapp! drkfngdrglrd and me had almost the same idea (*here*), but it's essential to be done - and JMHL made it in a very special and easy way - with no system performance loss or additional battery drain.
Thanx JMHL!!!

I hope some people find this HowTo helpful

27th August 2009, 11:23 PM |#5  
MichelDiamond's Avatar
OP Retired Recognized Developer
Thanks Meter: 272
Donate to Me
ok-finished for the first time
30th August 2009, 06:07 PM |#6  
MichelDiamond's Avatar
OP Retired Recognized Developer
Thanks Meter: 272
Donate to Me
OH - I've forgotten to say,that all from this example is uploaded in JMLLibrary - also with the sample .pnx and the JMLToday-Skin:

*click here*

And Thank you for saying Thank you for this HowTo and developing the Example

30th August 2009, 06:26 PM |#7  
Jumba's Avatar
Senior Member
Flag Johannesburg
Thanks Meter: 709
Donate to Me
Thanks Micha! Just been a bit occupied and forgot to comment. This is a very useful guide, I am hoping to experiment more with the new functions when I get a chance, but thanks again, this is a big help to all developers/skinners.
1st September 2009, 01:09 PM |#8  
Senior Member
Thanks Meter: 3
You guys rock! Thanx I've got to see if I can get it working

10 mins later ...... it is awesome!
1st September 2009, 02:18 PM |#9  
drkfngthdragnlrd's Avatar
Retired Recognized Developer
Flag Palmdale, CA
Thanks Meter: 273
Donate to Me
Looking good, will hopefully have time soon to update NeoTitanium & add JMLPanex & JMLToday includes some libraries. My question is though, it looks as though the button has to reside within the Focus Rectangle from what I understand for the ActionURL to be launched on tap. Am I correct with this? If so, maybe there's a way to add a OnAction to the <Layer ID="Page" tag of the expanded layout to "bind the whole layer to the Focus ActionURL. Since that is a value built it defined action, maybe we can bind it there. Then, we make the <Layer ID="Page" cover the entire Plugin if it falls outside the Focus.

Example (Based on my NeoTitanium);

<Layer ID="Page" Left="45" Top="-114" Width="195" Height="268" Clip="False" OnAction="(Binding:HomeNav,FocusAction)?!?!?" >
In NeoTitanium the HavNav & Focus is only the left 45 pixels of the screen. My thought is something like this "might" give the rest of the screen the Focus action & therefore launching ActionURL outside of the Focus area. Will need to play with the OnAction Code to see if it will work & what is the correct code to use.

6th September 2009, 02:11 AM |#10  
MichelDiamond's Avatar
OP Retired Recognized Developer
Thanks Meter: 272
Donate to Me
I hope you don't have overseen it:

@sleepyxda, jumba: Thank you

And what's good to know:You mustn't use Titanium_....cpr - - works with each other cpr, too. Tested it a little bit with Panex+Library
6th September 2009, 04:36 AM |#11  
drkfngthdragnlrd's Avatar
Retired Recognized Developer
Flag Palmdale, CA
Thanks Meter: 273
Donate to Me
Originally Posted by MichelDiamond

I hope you don't have overseen it:

@sleepyxda, jumba: Thank you

And what's good to know:You mustn't use Titanium_....cpr - - works with each other cpr, too. Tested it a little bit with Panex+Library

I saw, still trying, just a matter of figuring out what the process is called. It is a deffined action so should be possible.
Post Reply Subscribe to Thread

jmllibrary, jmlpanex, jmltoday, titanium, titaniumrss

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes