PDA

View Full Version : Execute Action



danward79
November 28th, 2004, 02:36 PM
Hi,

Could someone please enlighten me! I would like to know what the syntax for sending a variable to girder from lua code file is. Using ExecuteAction.

I have tried execute.... ("Event";variable) and various other forms but none work!

I am sure I am being thick again!

Thanks you very much. :roll:

Ben S
November 28th, 2004, 03:31 PM
Hi Dan -
There is no real way to "set" a girder variable from NetRemote, you'll still have to have an event in Girder to set the girder variable from the event.

So with that said, you can do an ExecuteAction like you would for any other Girder action.

danward79
November 28th, 2004, 05:42 PM
The only way I know of is thru, a button, what is the way you mean?

Jlee
November 28th, 2004, 11:11 PM
NetRemote.ExecuteAction(-1,0,1,"GirderEventName");

danward79
November 29th, 2004, 02:16 AM
Ahh, Sorry. I was thinking of something else. Must of Been 3am feeding blues! :oops:

mhwlng
November 29th, 2004, 03:17 AM
if you want to transfer a variable you need to to something like :

NetRemote.ExecuteAction(-1,0,1,"SCANALL(800,12,39)");
or
NetRemote.ExecuteAction(-1,0,1,"LDJ.RESCAN(12)");

the bit between the brackets ends up in pld2 in girder..
(pld1 contains the ip address of the netremote device)

so in the SCANALL event in girder, you can do :

local tab={}
LUA_Parse( pld2,tab,",")
MediaCenter.ALReScan(pld1,tab[3]) -- Rescan artist list
LDJ.ReScan(pld1,tab[2]) -- ReScan the DVD collection
background.ReScan(pld1,tab[1])


Marcel

danward79
November 29th, 2004, 03:27 AM
Thanks I will try that.