EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   XML Modification Help & Info (https://www.eq2interface.com/forums/forumdisplay.php?f=22)
-   -   Not parsing Target Name (https://www.eq2interface.com/forums/showthread.php?t=18193)

aseop 03-28-2016 06:35 PM

Not parsing Target Name
 
So,

I need to experiment more but I am confused. When a variable mapped to the target name is used as the first command in a list of commands performed in an onpress... it works. However, when the same command and variable is in middle of the commands... nothing... no error, none of the commands are executed. Here is an example of where it does not work:

Code:

<Composite Size="230,40" Alignment="Center" Orientation="Horizontal" PackLocation="LEFT,TOP" PackSize="a,f" SpacingType="Fill">
                        <Checkbox Location="10,10" Name="stanza002Check" OnSet="parent.stanza002Tip.TextColor=#FF0000" OnUnset="parent.stanza002Tip.TextColor=#FFFFFF" PackLocation="fff" PackSize="f,f" ScrollExtent="25,40" Size="25,40" MinimumSize="25,40" MaximumSize="25,40" Style="/CommonElements.Checkbox.data.style" Tooltip="Mark/Ubmark" BackgroundOpacity="1.000" />
                        <Button Name="stanza002" OnPress="
                        do_file_commands song000stanza002A.DOS
                        do_file_commands song000stanza002B.DOS
                        Emote reaching out and barely caressing Parent.Parent.Parent.Parent.TNAME.text cheek
                        do_file_commands song000stanza002D.DOS
                        do_file_commands song000stanza002E.DOS
                        parent.stanza002Check.Checked=true
                        parent.stanza002Tip.TextColor=#FF0000
                        " ScrollExtent="160,40" Size="160,40" MinimumSize="160,40" MaximumSize="160,40" Style="/CommonElements.LargePushButton.data.style" TextVerticalAlignment="Center" TextMaxLines="1" ToolTip="3">3</Button>
                        <Text Font="/Fonts.SegoeUI20" Name="stanza002Tip" ScrollExtent="100,40" Size="100,40" TextColor="#FFFFFF" TextAlignment="Left"  TextAlignmentVertical="Center" Margin="10,0,10,4" MaxLines="1"> stepping off the stage and moving through the audience.</Text>
                    </Composite>

Any ideas? I am uncertain if I could create the whole set of commands as a single variable or not...

Aseop

Darqwood 03-28-2016 07:28 PM

You may get better results with the TNAME part if you do a little setup. I don't use do_file_commands so I'm not sure how they affect the command stack, but try the following (untested):


Code:

<Button Name="stanza002" OnPress="
myEmote=('reaching out and barely caressing ')##(Parent.Parent.Parent.Parent.TNAME.text)##(' cheek')
do_file_commands song000stanza002A.DOS
do_file_commands song000stanza002B.DOS
Emote myEmote
do_file_commands song000stanza002D.DOS
do_file_commands song000stanza002E.DOS
parent.stanza002Check.Checked=true
parent.stanza002Tip.TextColor=#FF0000
" ScrollExtent="160.....

.

aseop 03-28-2016 08:31 PM

Can I extract that MyEmote= to a variable in the button itself instead of in onpress? Thanks for the reply, this actually helps me figure out variables a bit more...

Aseop

Darqwood 03-29-2016 08:20 AM

You can preload the variable as long as you have an event (OnShow, OnPress, OnMove, etc.) to handle it.


Code:

 
<Button Name="Button1" OnPress="
Parent.stanza002.myEmote=('reaching out and barely caressing ')##(Parent.Parent.Parent.Parent.TNAME.text)##(' cheek')
" ScrollExtent="160... ... />



<Button myEmote=" " Name="stanza002" OnPress="
do_file_commands song000stanza002A.DOS
do_file_commands song000stanza002B.DOS
Emote myEmote
do_file_commands song000stanza002D.DOS
do_file_commands song000stanza002E.DOS
parent.stanza002Check.Checked=true
parent.stanza002Tip.TextColor=#FF0000
" ScrollExtent="160... ... />


.

aseop 03-29-2016 08:05 PM

I am not sure I get that last but will play with it. I have actually pinpointed the issue to use of quotes which I think you suggestion should help with (as well as an old post by drums).

Also accidentally discovered that %t in a file used for do_file_commands sort of works. It acts like %s and it does not care about the targets actual sex is (random it, he, she), but it sort of works. More than I can say for the other % shortcuts. Wondering if it will work like that if embedded directly in an onpress.

Thanks Darq,

aseop


All times are GMT -5. The time now is 04:10 AM.

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