View Single Post
  #1  
Unread 04-21-2007, 12:45 AM
Othesus's Avatar
Othesus Othesus is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Lucan DLere
Posts: 847
Default The difference between Press and Activated

Arrg, I've just spent the last day trying to get script buttons to do what I tell them! I don't know if this has been discussed or everyone else just sort of figured it out as they went, but it was pretty frustrating. Here's what I've gotten so far.

If you want to press a button from a script it will always press.

Parent.ButtonName.Press = true
Parent.ButtonName.Press = false
Parent.ButtonName.Press = 1
Parent.ButtonName.Press = 0

These commands all press the button-- the button doesn't care.

This was causing all kinds of problems for me since I was trying to make one button press and another one not press like:

Parent.CopyURIToTabPage1.Press=Parent.TabPage1.Visible
Parent.CopyURIToTabPage2.Press=Parent.TabPage2.Visible

But it would always press both buttons no matter what. I ended up switching some of the script buttons to work with Activated instead like:

Parent.CopyURIToTabPage1.Activated=Parent.TabPage1.Visible
Parent.CopyURIToTabPage2.Activated=Parent.TabPage2.Visible

Then within the button you can use an OnActivate script and then set Activated=false at the end of the script.

Hopefully someone will prevent a few hours of aggravation by reading this.
Reply With Quote