EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   XML Modification Help & Info (https://www.eq2interface.com/forums/forumdisplay.php?f=22)
-   -   Target quick button (https://www.eq2interface.com/forums/showthread.php?t=15277)

Draven_Caine 01-08-2011 10:43 PM

Target quick button
 
Greetings,
Ok my target window has 4 quick buttons on it: invite, follow, mentor and friend. These buttons parse the targets name in the command so its invite target, ect.
Now my question is I would like to add a group chat text to say the autofollow button, so whne you press the auto-follow button, you auto-follow your target and it tells the group "I am auto-following George" (if George was your target)

I can get it to do this correctly, sometimes I get a 0 infront of the following, and the Parent.Target.Name.text is parsed as normal text.

Here is my AutoFollow button code:
Code:

<Button Location="23,0" Name="AutoFollow" OnPress="follow Parent.Parent.Parent.Target.v1.Name.text" PressSound="ui_pressed" RStyleActivated="/HighFantasyElements.MainHUD.Target.QuickButtons.AutoFollowPressedRect" RStyleDefault="/HighFantasyElements.MainHUD.Target.QuickButtons.AutoFollowNormalRect" RStyleMouseOver="/HighFantasyElements.MainHUD.Target.QuickButtons.AutoFollowMouseoverRect" ScrollExtent="20,20" Size="20,20" Tooltip="Auto-follow target" TooltipStyle="/TooltipStyles.TooltipTargetQuickButtons" />
Any help would be great.

Thanks,
Draven

saroiel 01-10-2011 10:37 AM

Try this :

OnPress="follow Parent.Parent.Parent.Target.v1.Name.text
gsay I am auto-following Parent.Parent.Parent.Target.v1.Name.text"

don't forget to press "ENTER" before add the gsay line
gsay line must be on new line

Draven_Caine 01-10-2011 02:31 PM

Greetings,
Thanks for the solution. I assume this is done in an xml program since hitting enter doesn't work in the ui builder? Is there another solution in the UI builder?

Thanks,
Draven

Drumstix42 01-10-2011 03:29 PM

Quote:

Originally Posted by Draven_Caine (Post 95235)
Greetings,
Thanks for the solution. I assume this is done in an xml program since hitting enter doesn't work in the ui builder? Is there another solution in the UI builder?

Thanks,
Draven

Double click your "OnPress" property. You should be getting a popup window to edit from, which you can surely hit enter and go down a line within.

Draven_Caine 01-10-2011 04:01 PM

Greetings,
Oh awsome!! I thank both of you for the help. This part of my window is a request so I was trying to get it to work :)

Thanks,
Draven

Draven_Caine 01-10-2011 04:10 PM

Greetings,
That fix "kinda" worked. The problem now is here is my code for the OnPress:
Code:

follow Parent.Parent.Parent.Target.v1.Name.text
say I am auto-following Parent.Parent.Parent.Target.v1.Name.text

Its parsed to say for testing reasons, but what it parses is odd, Its does the follow command right, but it tell /say "I am 0 following George" (If George is your target.

It seems to take the auto- or auto (if i remove the dash) part of the code and replace it with 0 for some reason.

Any ideas?

Thanks,
Draven

Landiin 01-10-2011 04:15 PM

Quote:

Originally Posted by Draven_Caine (Post 95243)
Greetings,
That fix "kinda" worked. The problem now is here is my code for the OnPress:
Code:

follow Parent.Parent.Parent.Target.v1.Name.text
say I am auto-following Parent.Parent.Parent.Target.v1.Name.text

Its parsed to say for testing reasons, but what it parses is odd, Its does the follow command right, but it tell /say "I am 0 following George" (If George is your target.

It seems to take the auto- part of the code and replace it with 0 for some reason.

Any ideas?

Thanks,
Draven

It is subtracting following from auto. Use the following code

Code:

OnPress="
follow Parent.Parent.Parent.Target.v1.Name.text
say 'I am auto-following ' Parent.Parent.Parent.Target.v1.Name.text"


Draven_Caine 01-10-2011 04:21 PM

Quote:

Originally Posted by Landiin (Post 95245)
It is subtracting following from auto. Use the following code

Code:

OnPress="
follow Parent.Parent.Parent.Target.v1.Name.text
say 'I am auto-following ' Parent.Parent.Parent.Target.v1.Name.text"


Greetings,
So single quotes are escape characters I take it than?

Thanks,
Draven

lordebon 01-10-2011 04:50 PM

Single quotes are string delimiters, just like double quotes can be. Since it's already inside of a double quote, you have to use a single quote to indicate that "I am auto-following" is a string.

Drumstix42 01-10-2011 05:01 PM

You can use either within UIBuilder, as it will get saved as &apos; or &quot; allowing it to parse correctly.

Draven_Caine 01-10-2011 05:07 PM

Greetings,
Thanks everyone for being so helpful. I got 3 of 4 of the buttons working but the 4th button is just a quick invite so no text is needed.

Another window down!!

Thanks,
Draven


All times are GMT -5. The time now is 02:35 PM.

vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI