Read a ContextID in a scrip

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
cgrenzel
Member
Posts: 1
Joined: Thu Sep 03, 2009 5:44 pm

Read a ContextID in a scrip

Post by cgrenzel »

Hello.

Is there a way to get the Current Context ID in script?
I tried codes such as:

Variable = GetContextID
Variable = "" & ContextID & ""


with no success.


Thanks!
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Re: Read a ContextID in a scrip

Post by Richard Naninck »

As far as I know, you can't get the context in a script. The only context related command that can be used from a script is this:

Function: OpenRemotePanel


Opens the specified Panel on all Software Remotes.

Syntax ReturnCode = OpenRemotePanelAndSetContext( "Panel Name", "ContextID" )

Parameter1 Specifies the name of the Panel to open.
Parameter2 Specifies the name of the context ID to apply to the Panel that is being opened.
Return Value Currently, this function always returns True.
Sample OpenRemotePanelAndSetContext "Panel 1", "Living Room Context"
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: Read a ContextID in a scrip

Post by ScottBot »

Richard is right; you can't get the context id from a script (or any other way). Context is relative to a particular panel and since you can have multiple panels open at a time there is no one context to get.
Scott
Post Reply