PDA

View Full Version : NetRemote Executation how?



sonata31
April 9th, 2008, 03:37 AM
Bad Plugin ID ?
When I use plugin ID = 0 for Girder in this code :

instanceGirder = pluginGirder:GetCurrentInstance();
instanceGirder:ExecuteAction(0, 1, event);

It's ok

When I use plugin ID = -1 for Girder, it's not ok

How do send a "Send Wake On Lan" in a lua code ?

Rob H
April 9th, 2008, 09:34 AM
That's not the plugin id - you only use the plugin id when calling NetRemote.ExecuteAction - you're calling instance:ExecuteAction so the plugin id is supplied implicitly.

To send a Wake on Lan from Lua you'd use


NetRemote.ExecuteAction(-4, 0, 0, macAddress)

sonata31
April 9th, 2008, 09:46 AM
That's not the plugin id - you only use the plugin id when calling NetRemote.ExecuteAction - you're calling instance:ExecuteAction so the plugin id is supplied implicitly.

To send a Wake on Lan from Lua you'd use


NetRemote.ExecuteAction(-4, 0, 0, macAddress)

Ok, I am sorry, I confused with NetRemote.ExecuteAction

Thank you for the response

sonata31
April 9th, 2008, 09:52 AM
For the macaddress is it correct ?

NetRemote.ExecuteAction(-4, 0, 0, "00:1A:92:7E:0C:D7")

Rob H
April 9th, 2008, 10:26 AM
That looks to be in the correct format, yes.

sonata31
April 9th, 2008, 02:36 PM
Thank You,
Louis