How to get hold of plugin variables into xl variables?

Help each other out

How to get hold of plugin variables into xl variables?

Postby rbziggy on Mon Jul 17, 2006 2:16 pm

Is anyone able to do this?

I want to get a variable from a plugin into a normal variable.

If I use the Save to Variable command event it works with either straight text or a normal variable (e.g. using %zone>current% in "myvariable" works fine and I can see the text for the current zone if I then display in a text field using the text %variable>myvariable%).

However if I try this from a plugin variable (e.g. plugin>xap-xlobby>text>loft), again enclosing in the %%I get nothing at all. This is despite the fact that if you put the plugin>xap-xlobby>text>loft in a text field directly it works just fine (i.e in this case displays a temperature reading sent in a XAp message).

If the above is not possible, is anyone aware of another way of getting info out of a plugin variable?

The reason I want to do this is so that I can assign different messages to the same text box as they arrive from different messages.

Thanks
rbziggy
 
Posts: 124
Joined: Mon Mar 21, 2005 11:49 pm
Location: UK

Postby S Pittaway on Mon Jul 17, 2006 4:22 pm

dont use a variable, instead add some code into GetVariable in your plugin.

GetVariable is used to pass text and images back into xlobby for display purposes.

search on it for a proper explaination.
S Pittaway
 
Posts: 651
Joined: Wed Jan 25, 2006 11:08 am
Location: Manchester, England

Postby rbziggy on Wed Jul 19, 2006 7:24 am

S Pittaway wrote:instead add some code into GetVariable in your plugin.



Unfortunately, it's not my plugin (it's the Xap plugin) so I'm not really in a position to add some more code into that.

If it's really not possible to extract the internal plugin info to a wider XL variable, I may move this to the plugin section to see if the author can help out here.
rbziggy
 
Posts: 124
Joined: Mon Mar 21, 2005 11:49 pm
Location: UK

Postby S Pittaway on Wed Jul 19, 2006 8:52 am

Ok, sorry, misunderstood your queston.
S Pittaway
 
Posts: 651
Joined: Wed Jan 25, 2006 11:08 am
Location: Manchester, England

Postby P3rv3rt B3ar on Sun Nov 19, 2006 1:57 am

I have just solved this long standing dilemma. Had to stay saturday night in, coding, cause i just got the idea on today...

Solution is bit of workaround (a hack) so i call it "variable smuggling" it is also bit involved so that is why i have implemented it in xPerT. It still needs somewhat polishing but im testing it now and it is working ok.

So basic idea is that we have three plugins, "A" is plugin which source we cannot access, but which information we want to use in plugin "C", which is plugin we are currently making. plugin "B" is xPerT, which does the real dirty work, meaning it provides the smuggling service.

So when C needs information (plugin variable of A) from A "smuggle"-command for B is issued. B gets the "contraband" (variable) from A trough a "mule" and delivers it into "stash" (xl variable) which C can access by normal means.

So if u (or somebody else) still has need for solution to this, i can make experimental build of xPerT for u with smuggling functions and also write some instructions within couple days. Otherwise it will be in next beta of xPerT.
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby m_ski on Mon Nov 20, 2006 12:43 pm

You could try this plugin I wrote a while back, although I have a feeling it won't work with plugin variables either.

http://www.xlobby.com/forum/viewtopic.php?t=3490&highlight=convert

The source is included if you want to make some mods to try and get it to work.
m_ski
 
Posts: 204
Joined: Wed Dec 08, 2004 7:57 am
Location: Kent, United Kingdom

Postby P3rv3rt B3ar on Mon Nov 20, 2006 6:16 pm

Interesting plugin u have there, too bad i didnt notice it earlier... Anyway if it really does the thing, i think it takes most of joy out of my finding... I have little different aproach instead of using "legal" SDK, i actually found a little hole (or information leakage) in Stevens code and exploited it in my solution, but because of nature of that arangement, my solution is much more cumbersome to wield...

Since it is already ready ill keep it within xPerT, it never hurths to have two ways to do something...
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland