EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > XML Modification Help & Info

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 01-09-2009, 07:02 AM
samejima samejima is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Jul 2005
Server: Unrest
Posts: 156
Default Onpress

So I got tired of crashing my client. Working on a pretty big file and looking to make my code actually readable.

As far as I know a commonly used practice would be!

Code:
Parent.Button.onpress =('say')##(x)
Parent.Button.press=true
Parent.Button.onpress=('say')##(y)
Parent.Buton.press=true
Code:
Now what I'm trying to do is 
Parent.Button.onpress =('say')##(x)
Parent.Button.onpress=(parent.Button.onpress)##(line return)##('say')##(y)
Parent.Buton.press=true
Something like this even possible?
Reply With Quote
  #2  
Unread 01-09-2009, 08:48 AM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Quote:
Originally Posted by samejima View Post
Code:
Now what I'm trying to do is 
Parent.Button.onpress =('say')##(x)
Parent.Button.onpress=(parent.Button.onpress)##(line return)##('say')##(y)
Parent.Buton.press=true
That will work if you add the missing spaces after 'say' and if you have define "linereturn" (drop the space, element names cannot have spaces) as a line feed character (or carriage return + line feed).

Of course it would be easier to just directly do it like this but that might not have been what you are after:
Parent.Button.OnPress='say ' ## (x) ## ' say ' ## (y)
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #3  
Unread 01-09-2009, 06:29 PM
samejima samejima is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Jul 2005
Server: Unrest
Posts: 156
Default

Your code returns

you say, "test say test2"

which was the same problem i was running into previously if i wasn't crashing of course!

For the record that was definitely pseudo code to help understand what i was trying to do. I need a line return so when it presses it thinks that its a slue of commands.
Reply With Quote
  #4  
Unread 01-09-2009, 06:36 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Oh lol yeah sorry did that in a hurry, you can't just separate different /say commands via a space because it thinks that's still part of the text you want to say, so in this case you would need to use the = notation. Also I got the order wrong. So the correct line without a linebreak would be:
Parent.Button.OnPress='say ' ## (y) ## ' say ' ## (y) ## ' say ' ## (x) ## ' say ' ## (x)
But I thought so that your question was mainly directed at the linebreak anyway.
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.

Last edited by gm9 : 01-09-2009 at 06:45 PM. Reason: forgot what I originally wrote but this is what I wanted to write. :O
Reply With Quote
  #5  
Unread 01-09-2009, 08:10 PM
samejima samejima is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Jul 2005
Server: Unrest
Posts: 156
Default

Basically instead of doing
ONPRESS= BLAH BLAH
Press=true
ONPRESS= BLAH BLAH
Press=true
ONPRESS= BLAH BLAH
Press=true
ONPRESS= BLAH BLAH
Press=true
ONPRESS= BLAH BLAH
Press=true
ONPRESS= BLAH BLAH
Press=true
ONPRESS= BLAH BLAH
Press=true

I was trying to see if its possible to add line breaks so I could do

ONPRESS= BLAH BLAH
ONPRESS= ONPRESS + LINEBREAK + BLAH BLAH
ONPRESS= ONPRESS + LINEBREAK + BLAH BLAH
ONPRESS= ONPRESS + LINEBREAK + BLAH BLAH
Press=true

Which I gave up on for the moment but if its possible would cut down on code emmensly
Reply With Quote
  #6  
Unread 01-09-2009, 08:16 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Yes you can, sorry if that didn't become clear above. For example in my code I usually add an element CRLF to the xml which is the linebreak characters and then my code I just XX.OnPress=(code1) ## CRLF ## (code2) ## CLRF ## (code3) ## ...
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #7  
Unread 01-09-2009, 08:31 PM
samejima samejima is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Jul 2005
Server: Unrest
Posts: 156
Default

I tried doing that by creating a variable="
" then put it there could you put a more exact example because everything I tried just crashed me.
Reply With Quote
  #8  
Unread 01-09-2009, 08:39 PM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

if you tried that runtime it won't work, if you put it in the xml that will work. Or just put it in the XML like this:
CRLF="
"
That's what I did before we had the entities.
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #9  
Unread 01-09-2009, 08:57 PM
samejima samejima is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Jul 2005
Server: Unrest
Posts: 156
Default

HUMM that was one of the first things I tried Ill go back and do it again after raids, thanks.
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI