Your comments

Hi Rens,

Your Welcome. Please remember also, for now anyway the new Global cache driver is not yet written for the iTach Flex models.  It will be fine on all the older models.

Thanks,


Roger
Hi,

Consider the following,  when you use .Set you are using an existing command defined in the driver and passing a value to that command;  take your example,  IR.GetDevice("Modbus TCP").Set("CURSOR UP",X);  The IR.GetDevice method looks in the "Modbus TCP" driver for a command called "CURSOR UP".  When the command in the driver exists then the method will instruct the driver to Set the channel, which causes the driver to send the command with the passed value of X.

Now consider a  Send method,  IR.GetDevice("Modbus TCP").Send([X]);

The Send method is passed the value of X as an array.  The driver then sends the contents of the array one element at a time.  The difference being here is that the value of X needs to be an command which the Global Cache device understands, eg ["sendir,1:1,1,38004,1,1,342,170,22,21,22,64,22,21,22,21,22,64,22,64,22,21,22,21,22,64,22,21,22,64,22,64,22,21,22,21,22,64,22,64,22,64,22,21,22,21,22,21,22,21,22,21,22,21,22,64,22,21,22,64,22,64,22,64,22,64,22,64,22,64,22,21,22,3800",0x0D]

Therefore the easiest option  will be to use the first. (.Set). Given that with global cache for IR is already defined in the command,  I would try the following, asuming that you have a global cache driver in the project which is called "global cache".

IR.GetDevice("Global Cache").Set("CURSOR UP",null);


Thanks,



Roger
You Welcome,  all the best wishes for the new year.
Hi,

Actually what you can do with scripting is what makes iRidium such a power platform to work with.  It can take an UI to the next level. 

Take a look at the attached project.  This is an simple way of using the UI without scripts. Replace the links that point to the global token with links that point the feedback command of the device you are controlling.

Yes you can create levels button which are smaller\refined and still be able to control them….  Look at the project.


Thanks,


Roger
sample.irpz
Hi,

Only Pro version of the site license will allow you to using scripting.  I only take Pro licenses,  since every project I have implemented has used scripting.  Using scripting gives me limitless possibilities in setting up unique designs.

When you do this without scripting it wont be possible to move the popup along the level.

Just add a show popup on Press event and Hide Popup on release.  In the popup create an graphic item with a relation to feedback channel of the light ( or other ).

Thanks,


Roger
Hi,

Sure this is possible using an iRidium script.  You will need to add a listener to the press event that will show and position the popup.  Then a move listener to reposition the popup to the the same point as the value of the level.  Then a hidepop call on the release event.


Thanks,


Roger
Hi,

When you use the following, then 123 is shown in the log.

var a = 456;

var func_b = function() {
IR.Log(a);
}

function func_a(param_a) {
a = 123;
param_a();
}

IR.AddListener(IR.EVENT_START,0,function()
{
func_a(func_b);
});
Thanks,


Roger
Hi Sergey,

I know that's what I am using now.  Another point to note is IR.ShowPopup and IR.HidePopup currently work the same, there is no indication whether these methods fail because the popup doesn't exist in the project.

Thanks,


Roger
Hi,

Will this still tell  me where the code is broken?

Thanks,


Roger
Hi Tomas,

"Script garbage memory collected." is normal for any project that contains an script.  As a script is executed memory is allocated for variables and functions,  when those are no longer used the memory is cleared,  and that what that message is telling us.

Which version of the GUI editor are you using? What do you mean by nothing happens when running the project in Windows?  If you are using an older release of the GUI editor like 2.07 or below,  run the emulator with your project, at the point that you see that the project is loading in the emulator, press F4 to show the log window. Now you should see entries in the log where the project is initializing,  check to see if there any script exception message.  There are certain script exceptions that will prevent the app from running.


Thanks,


Roger