1 (edited by alur 2013-08-16 06:08:30 am)

Topic: nModules 0.6 released

I just released version 0.6 of my nModules.

You can get them here: http://lsmodules.alurcard2.net/

Requirements

If you get the 32-bit modules, you need the 32-bit LiteStep core, and the 32-bit redistributables (A.K.A. x86). A 32-bit LiteStep core can not load 64-bit modules.

If you get the 64-bit modules, you need the 64-bit LiteStep core, the 64-bit redistributables (A.K.A. x64), and a 64-bit operating system. A 64-bit LiteStep core can not load 32-bit modules.

ChangeLog
  • Added the Edges scaling mode to brushes.

  • Fixed how some tasks would not minimize/restore properly with nTask.

  • Fixed issue where clock hands would not align with the center of the clock.

  • Fixed issue where images used as clock hands would not render correctly.

  • Fixed issue where nDesk was not reading the wallpaper style properly, resulting in the wrong style being applied.

  • Fixed crash in nMediaInfo when trying to extract data from a non-existent mp3 file.

  • Removed the SolidColor brush's Alpha setting, for performance reasons, sorry hmm Use Color SetAlpha(..., val) instead.

  • Colors based on DWMColor now automatically update when the DWM color changes.

  • Fixed nDesk failing to load wallpapers which contain invalid metadata.

  • Fixed regression where tray icons belonging to dead windows no longer went away on mouseover.

  • Added an !nTaskTestWindow to nTask, for testing some less-common taskbar features.

  • Much more efficient rendering.

  • Automatic tray sizing.

  • Fixed issues where hovering would not trigger correctly, under some circumstances.

  • Added JavaScript scripting support.

JavaScript support

Starting with this version, nCore supports executing JavaScript code. You can load .js files by using the  *nIncludeScript command in your config, or execute code by using the !nExecScript and !nAlertScript bangs. The difference between them is that !nAlertScript will show the result of the expression in a messagebox.

Currently, there are 2 global objects provided to the JavaScript runtime to allow it to interact with LiteStep. The LiteStep object, which provides core LiteStep functions, and the nCore object, for interacting with nModule windows.

LiteStep

The LiteStep object currently provides the following functions:

LiteStep.Execute(command)
Executes command.

LiteStep.Recycle()
Recycles LiteStep.

LiteStep.Refresh()
Refreshes LiteStep.

LiteStep.Bangs.Add(bang, func)
Registers a !bang command. When the !bang is executed, func is called with the argument of the bang.
Example:

LiteStep.Bangs.Add("!HelloWorld", function(params) {
    LiteStep.Bangs.Execute('!Alert', '"' + 'Hello World! ' + params + '"');
});

LiteStep.Bangs.Execute(bang, arg)
Executes the bang bang with the specified argument.

LiteStep.Bangs.Remove(bang)
Removes the specified bang.

LiteStep.Evars.Set(key, value)
Set the specified Evar to the specified value.

LiteStep.Evars.Get(key)
Retrieves the value of the specified Evar.

LiteStep.Evars.GetNumeric(key, default = 0.0)
Gets a numeric version of the specified Evar, or default if the Evar is not a number.


nCore

The nCore object currently provides the following functions:

nCore.Window.Move(name, x, y, time = 0, easing = Linear)
Moves the window with the given name to the specified position, in the specified amount of time using the specified easing.

nCore.Window.Size(name,  width, height, time = 0, easing = Linear)
Sizes the window with the given name to the specified size, in the specified amount of time using the specified easing.

nCore.Window.Position(name, x, y, width, height, time = 0, easing = Linear)
Moves and sizes the window with the given name to the specified size, in the specified amount of time using the specified easing.

nCore.Window.Hide(name)
Hides the window with the specified name.

nCore.Window.Show(name)
Show the window with the specified name.

nCore.Window.GetX(name)
Returns the X coordinate of the window with the specified name.

nCore.Window.GetY(name)
Returns the Y coordinate of the window with the specified name.

nCore.Window.GetWidth(name)
Returns the width of the window with the specified name.

nCore.Window.GetHeight(name)
Returns the height of the window with the specified name.


Here are some samples from my own theme:

//
// Sizes the elements of the taskbar, as necessary.
//
LiteStep.Evars.Set('SystemTrayOnResize', '!nExecScript SizeTaskbarElements()');
function SizeTaskbarElements()
{
    var taskbarWidth =
          nCore.Window.GetWidth('MainTaskbar')
        - nCore.Window.GetX("Taskbar")
        - nCore.Window.GetWidth("SystemTray")
        - nCore.Window.GetWidth("MainTaskbarClock");
        
    nCore.Window.Size('Taskbar', taskbarWidth, nCore.Window.GetHeight('Taskbar'));
}

//
// Tests simultanious animations
//
function Test()
{
    if (Test.Reverse)
    {
        nCore.Window.Move('DesktopMediaInfo',
            LiteStep.Evars.GetNumeric("DesktopMediaInfoX"),
            LiteStep.Evars.GetNumeric("DesktopMediaInfoY"),
            10000);
        nCore.Window.Move('HoverTestCenterTest', 200, 0, 10000);
        nCore.Window.Move('HoverTest',
            LiteStep.Evars.GetNumeric("HoverTestX"),
            LiteStep.Evars.GetNumeric("HoverTestY"),
            10000);
    }
    else
    {
        nCore.Window.Move('DesktopMediaInfo', 0, 0, 10000);
        nCore.Window.Move('HoverTestCenterTest', 0, 200, 10000);
        nCore.Window.Move('HoverTest',
            1920*2 - LiteStep.Evars.GetNumeric('HoverTestWidth'),
            100, 
            10000);
    }
    Test.Reverse = !Test.Reverse;
}
Test.Reverse = false;

//
// Prints the contents of an object.
// Try !nAlertScript dump(dump) and !nAlertScript dump(LiteStep).
//
function dump(arr, level)
{
    var text = "";
    if (typeof(level) == 'undefined')
    {
        level = 0;
    }
    
    //The padding given at the beginning of the line.
    var padding = "";
    for (var j = 0; j < level + 1; j++)
    {
        padding += "    ";
    }
    
    if (typeof(arr) == 'object') //Array/Hashes/Objects 
    {
        for (var item in arr)
        {
            var value = arr[item];
            
            if (typeof(value) == 'object') //If it is an array,
            {
                text += padding + "'" + item + "' ...\n";
                text += dump(value, level + 1);
            }
            else
            {
                text += padding + "'" + item + "' => \"" + value + "\"\n";
            }
        }
    }
    else //Stings/Chars/Numbers etc.
    {
        text = "===>" + arr + "<===(" + typeof(arr) + ")";
    }
    return text;
}

I'm planning to have a proper complete documentation and a lot more scripting support in 0.7 smile Please let me know of any bugs you find.

2

Re: nModules 0.6 released

Amazing! Great work on the update, I can't wait to try scripting with JS.

I'm trying out the ImageEdge scaling right now and I am wondering if I am doing it right, I don't think it is displaying properly.
        BrushType Image
    Image popupBackground.png
    ImageScalingMode Edges
    ImageEdges 10 37 26 26

3

Re: nModules 0.6 released

The issue lies with your Edges definition. It should be

ImageEdgesLeft 10
ImageEdgesTop 37
ImageEdgesRight 26
ImageEdgesBottom 26

or, using the new syntax,

ImageEdges
{
    Left 10
    Top 37
    Right 26
    Bottom 26
}

4

Re: nModules 0.6 released

Holy crap the scripting looks like it's going to be amazing!
Simultaneous animations as well! big_smile

Will

LiteStep.Evars.Set(k, v)

set the evars in memory or write on file?

5

Re: nModules 0.6 released

It will set them in memory

6

Re: nModules 0.6 released

Does/Will the nTaskbar module support Shortcut pinning?

7

Re: nModules 0.6 released

I do want to go in that direction, and I've thought a bit about it, but I'm not entirely sure how I want to implement Shortcut pinning quite yet.

8

Re: nModules 0.6 released

I am having a problem with Popups with folders. I am wondering if it is possible to have the folder open up when clicked on instead of just the files in the folders?

9 (edited by alur 2013-08-27 01:51:39 am)

Re: nModules 0.6 released

Would an implementation of Greywool's feature request over here: https://code.google.com/p/n-modules/issues/detail?id=9 be enough? or do you specifically want to be able to open folders in popups by left clicking on them?

Do you want it to also open up submenus for folders, or just treat the folder as a link? If so, do you want this as a global setting or do you want some sort of new !Popup bang that opens folders in this way?

Loading of dynamic popups is significantly faster in the next version btw smile

10

Re: nModules 0.6 released

Alur, maybe my IceFlame theme can help about shortcut pinning where it was introduced, but in a theme level. Open a application like paint, click on plus icon buttom on taskbar it pops a panel with text boxes, to fill it, just click on taskbuttom (in this case mspaint.exe) and see by your self. I'm still waiting for this feature on modules but work fine on my beta theme

11

Re: nModules 0.6 released

alur wrote:

Would an implementation of Greywool's feature request over here: https://code.google.com/p/n-modules/issues/detail?id=9 be enough? or do you specifically want to be able to open folders in popups by left clicking on them?

Do you want it to also open up submenus for folders, or just treat the folder as a link? If so, do you want this as a global setting or do you want some sort of new !Popup bang that opens folders in this way?

Loading of dynamic popups is significantly faster in the next version btw smile

Greywool's request is sufficient for me.

I guess what I expected was that all items in a popup be able to open. I still would like submenus for folders. But, I can see a use for having a new Popup folder where child items open regardless if they are a folder or not. ("My Computer" would list my drives and I could quickly access their root directory)

Keep up the awesome work! big_smile

12

Re: nModules 0.6 released

Hello,
I was off from LS since few month.
I'm guessing that nModules are the next xModules génération ?
I can download them from shellfront, but i see no documentation, where can i get it ?
And, I have a problem with nlm that don't find xstatgraph, is there a way to link *nlm to your server alur ?

13

Re: nModules 0.6 released

I just re did the test and it seems that xstatsgraph-0.8.1 now work properly.
By the same time, i downgraded ecs to 1.0.0.0 because avast report 1.1 as infected.

14

Re: nModules 0.6 released

Please, I still wonder where to get nMods documentation, if someone have a clue.

15 (edited by rjh 2014-02-10 11:05:02 am)

Re: nModules 0.6 released

I think that Microsoft have changed their downloads. One of the links above has been 'retired' and the other does not install the necessary file. I cannot start LS and load nModules because of a missing msvcp120.dll - but Microsoft will not allow me to download it. Can someone post it for download?

Thanks, R.

EDIT: This is sortof a false-alarm. The link given above for the 2013 VC++ redist is 'dead' or 'retired' as Microsoft choose to phrase it, but with enough digging through the Microsoft website and search I was able to get the download through another page.

For the benefit of anyone trying the same; MS website annoyingly gives you a file called vcredist_x64.exe regardless of which year is requested. The 2012 file is about 7019 KB and is the only one available through the links above. If you manage to get a download around 7021 KB - that is the 2013 file which is required.

If MS are no longer intending to supply this file - are we allowed to upload it here? Or are we likely to see new versions of the modules appearing soon built against 2014?

Thanks, R.

Everyone who believes in telekinesis - please raise my hand...

16

Re: nModules 0.6 released

alur do you plan on adding something like

Litestep.Evars.Write(key, value, file)

so we can write to a .rc file? Kind of like Litestep.Evars.Set(key, value), but also writes it to a file as well. It would either create the evar and set the value or overwrite the value of the specified evar.

17

Re: nModules 0.6 released

any ideas on the next release ? or have it been halted ?