Show/Hide Button using a variable

Help each other out

Show/Hide Button using a variable

Postby scottw on Wed Mar 07, 2007 2:31 pm

OK I will try to get this out without confusion :D

I am trying to show a button using the %zone>current% variable.

I have 3 buttons that are all hidden, each of them with an ID of one of my zones (Music_Player_1, Music_Player_2 and Radio). These ID's are typed in exactly the same as what the zones are called.
I am trying to use the "Button Show" command to show only the button for the current zone that I am in. I tried using %zone>current% and zone>current but neither worked.

Can this be done???
Last edited by scottw on Thu Mar 08, 2007 2:12 am, edited 2 times in total.
scottw
 
Posts: 774
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland

Postby dalanik on Wed Mar 07, 2007 2:58 pm

The way I solve such things is use XScriptNG plugin :-) In there you can do anything :-) You would load the xlobby variable into VB.NET variable and do select/case or if/elseif/else and show/hide whatever you want. I know it's not the solution you were looking for, but it would work.

D.
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Postby scottw on Wed Mar 07, 2007 3:16 pm

Cool thanks, I may try this.

I know nothing about programing. Do you happen to have a link to some basic commands for whatever language is used in XScriptNG?

Thanks,
scottw
 
Posts: 774
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland

Postby P3rv3rt B3ar on Wed Mar 07, 2007 3:47 pm

xPerT conditional commands should be able to help u to... there is actually example of that to hide/show my play trailer buttons in documentation... im just not sure whether this functionality is working or broken in current version...
P3rv3rt B3ar
 
Posts: 1364
Joined: Fri Apr 07, 2006 9:52 pm
Location: West Coast Funland

Postby scottw on Wed Mar 07, 2007 6:11 pm

GOT IT!!!!


I was already using Scalt's VAC script using XScriptNG. Everything was pretty much already there in the script, I just needed to do some copying and pasting and tweaking :D It's a good thing to because anything past copying and pasting was beyond me :lol:
scottw
 
Posts: 774
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland

Postby scottw on Wed Mar 07, 2007 7:18 pm

Nevermind, all that F%$#^& work and it does not work thru the thin client :evil:
scottw
 
Posts: 774
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland

Re: Show/Hide Button using a variable

Postby scottw on Thu Mar 08, 2007 2:11 am

scottw wrote:I am trying to show a button using the %zone>current% variable.

I have 3 buttons that are all hidden, each of them with an ID of one of my zones (Music_Player_1, Music_Player_2 and Radio). These ID's are typed in exactly the same as what the zones are called.
I am trying to use the "Button Show" command to show only the button for the current zone that I am in. I tried using %zone>current% and zone>current but neither worked.

Can this be done???

Ok I think I have a workaround that may or may not help someone else.

Basically I am using the VAC setup which uses sources and zones or speaker outputs. I made a zone map and I wanted each zone/speaker output that was active to show which source it was playing from. Now this was built in to the script Scalt gave me but it appears you cannot execute commands on the thin client thru XScriptNG.

I could not use the %zone>current% to call a buttonID. So I left the ButtonID's with the names of the zones. I made an "Event Group" for each of my zones and named the group the name of the zone. Inside each group are events to call the buttons I want to show. Here is my creative part, I use the "run event" command which requires a Group Name and Event Name. I use %zone>current% for the Group Name and the Event Name is just the name of the event in the event group I made.
This way when I call the command to show the buttons it will only show the buttons I want depending on what zone I am in.


This is my work in progress zone map which works thru a Thin Client :D :D


Image

I still have alot to add on this but now that I got the method down it should quick :D
Not sure I like the way some things are laid out but did not want to get to far until I fixed the problem.

Any input is welcome.
scottw
 
Posts: 774
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland

Postby Marbles_00 on Thu Mar 08, 2007 5:21 pm

Thanks for the tips scott. I'll have to try this out and see what I can get it to do too.
Marbles_00
 
Posts: 1867
Joined: Wed Apr 06, 2005 12:44 pm
Location: Canada

Postby rhinoman on Fri Mar 23, 2007 9:02 am

There is another way to do this using button toggle states, its not elegant but works.

The event would would call the set zone and then toggle the rooms states between the default and active graphics of the button states.
rhinoman
 
Posts: 416
Joined: Wed Jan 14, 2004 8:58 pm
Location: Herne Bay, UK