EQ2Interface.com
Search Downloads


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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Unread 08-04-2010, 10:41 AM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default Possible to reference Objects with spaces in name?

Has anyone found a way to reference an object that has a space in the name?

I'm trying to work out a project using Item names, but with all of the spaces, I'm finding it impossible to reference them in any manner.
Am I screwed?

Solved below
in reply #4
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>

Last edited by Drumstix42 : 08-04-2010 at 11:56 AM.
Reply With Quote
  #2  
Unread 08-04-2010, 11:10 AM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

If you can reference it on the lhs you can use quotes:
'Path.Object Name With Spaces.attribute' = value
__________________
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 08-04-2010, 11:39 AM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

I half have working what I want...

I managed to get it to work if I reference the object directly by name, but if I try to use a variable and concatenate them I can't seem to get the desired result. And I would need to do this for my idea to work.
I have an object named Test Object with the text element set to: Testing 123

sTest=('Parent.Test Object.text')
say sTest

The above returns the proper string echoed into chat.

However the following I cannot seem to find a proper method for.

sName=('Long Item Name')
sTest=('Parent.') ## sName ## ('.text')
say sTest

The above returns: Parent.Long Item Name.text
Have tried a few different alterations with how I concatenate them, but with no luck.

I tried setting it to another variable again like: sTest2=('sTest')
... but that did nothing new.
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>

Last edited by Drumstix42 : 08-04-2010 at 11:41 AM.
Reply With Quote
  #4  
Unread 08-04-2010, 11:52 AM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

Okay in response to myself, I think I answered my own question. Seems when trying to explain what you're doing helps yourself figure out the solution

Basically I just had to get creative with it. I knew I had to do it in 2 steps, but my brain wasn't quite grasping the method at first.

Setup separate objects with the string broken up.

code1's object: sTestObj=('Parent.
code2's object: .text')

Then do this:
sString=('Long Item Name')
Parent.DoCommand.onpress=(code1 ## sString ## code2)
Parent.DoCommand.press=true

However the problem I don't think I can solve.... Items with apostrophes in their names
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>

Last edited by Drumstix42 : 08-04-2010 at 12:20 PM.
Reply With Quote
  #5  
Unread 08-04-2010, 01:01 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

Well despite apostrophes (they might have been manageable), I found out that the Map system doesn't support names with spaces.

You can add a POI with spaces, but you cannot delete it via slash command. I tried using quotes to no avail. I even managed to add a category name with a space using quotes, but still wasn't able to delete it.
One problem solved, blocked by another!

This would have been so much easier if I could just access item IDs from the Examine window, Lol.
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #6  
Unread 08-09-2010, 05:16 AM
Zonx's Avatar
Zonx Zonx is offline
A Green Troll
This person is a EQ2Map developer.
Featured
 
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
Default

slash commands that take an input value can often be executed two ways...

/do_something_with foo
or
do_something_with='foo'

You might be able to use the later with a variable containing the concatenation.

foo='something' ## 'somethingelsewithspaces'

do_something_with=foo
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 01:23 AM.


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