WoW-Pro Guides

WoW-Pro Guides

3M Downloads

Recorder multi line error

Gylin opened this issue ยท 25 comments

commented

Ok posted this up on the chatroom but thought I'd raise it here too. How can I do this within a note tag:

Type /macro to open the macro creation interface.
Create this macro and place it on your actionbar:
/target Stolen Ram

/whistle

If you create it like that in the recorder, pressing enter at the end of each line to astart a new one, the text come out right. However, save it in a guide, the next time you do that guide it only shows the 1st line of text, and stop the guide thereafter from even showing.

The reason I want to do it like this is because a single line, will not work for this part of the text "/target Stolen Ram /whistle". If a user creates that as a single line macro, it doesn't work at all.

Tried doing it on other steps and the same thing happens, doing an escaped newline \n doesn't work from within a N tag either.

What am I missing?

commented

Fixed this in the note tag by adding "/" as a delimiter to seperate the lines. Example: |N|Line 1/Line2/Line3| will give you:

Line 1
Line 2
Line 3

commented

While that is a great fix Twists, I can't use it with my note as I already have 3 "/" in it

my original note (that broke the guide):
Type /macro to open the macro creation interface.
Create this macro and place it on your actionbar:
/target Stolen Ram

/whistle

would then become:
Type
macro to open the macro creation interface.
Create this macro and place it on your actionbar:
target Stolen Ram
whistle

which won't then create a macro that would work, or even get the user into the macro interface. If the / delimiter is added to the note tag it breaks my current note in a similar way.

current note:
Type /macro to open the macro creation interface. Create this macro and place it on your actionbar. On the 1st line type /target Stolen Ram, then press enter, on the 2nd line type /whistle, then drag the macro to your actionbar.

with this fix:
Type
macro to open the macro creation interface. Create this macro and place it on your actionbar. On the 1st line type
target Stolen Ram, then press enter, on the 2nd line type
whistle, then drag the macro to your actionbar.

commented

Good point about the /marco. It was early this morning when it occurred to me how to fix this. What about "/n" or "" or some other character or character combination as a delimiter?

commented

I've been racking my brain trying to come up with a character or combination that would not be used in a note other than to indicate a line feed that would be easy to remember. What about ! or is that too close to |? Any thoughts here would be greatly appreciated.

commented

an /n works for me, as that's normal lua language

commented

I went ahead and went with ! for simplicity.

commented

Yes but what if we want to actually include a ! in the note?

Gylin - I thought I tried using \n in the past and it didn't seem to work. Bleh. If it does then the issue pretty much handles itself then.

commented

ok..here's the thing. It doesn't like the use of "" anywhere in the note. I still like the use of 2 characters to indicate a line feed, so was thinking of "//". This just means to add your macro, you would have to put |N|Type /macro to open the macro creation interface.//Create this macro and place it on your actionbar:///target Stolen Ram///whistle|

commented

Just having \n in the note doesn't work, I double checked that part. It has to be coded in to do a line feed. I will update the code and documentation to handle \n. Its probably better anyway that it has 2 characters that controls if it is a line feed or not.

commented

That would work, but real quick try doing "\n" in your pattern matching code. That should escape the escape character and look for the actual "\n" in the guide code.

If that doesn't work, the "//" has my seal of approval ;)

commented

"\n" was one of the ways I tested it in the guide without success. It just doesn't like the "" in that part of the pattern matching code.

commented

Argh. Github ate my code, I think. I was trying to suggest using TWO \ before the n. The escape character should escape the escape character... if that makes any sense.

The idea is that the guide coder would still type in "\n", but when you check the code you use "\n".

commented

You can do it all in one line. In your line, you need:

|T|Stolen Ram|U|xxx|

Not sure what the ID is for the whistle. This will place two buttons side by side for that step.

commented

My misunderstanding. Could probably build something in the parser that uses DoEmote. Useage would be DoEmote("whistle","Stolen Ram"). Maybe something similar to the Target would work? Not sure how to accomplish that from within the recorder though.
Something like this would also be helpful in the achievement module for things like All the pets we love.

commented

Twists - no, you need to actually /whistle.

Gylin - you can't, at the moment, force line breaks in the text, either with or without the recorder. I would love to support this functionality but haven't yet figured out how, since \n doesn't seem to work.

You could try adding a bunch of spaces at the end of the /target Stolen Ram, but I'm not sure that would work :(

commented

Probably rather too specific to code into the leveling module, but would definitely be something good for the achievement one!

commented

My main concern is that if you press enter to start a new line in the note text box in the recorder, and then save and use that as a guide, it breaks the guide at that line.
The code I'm working with can go on a single line, and I could use a load of "spaces", however, that won't work as it's ment to if a user doesn't set their guide window up the same as mine.
I'll just have to reword it, although this makes the text longer and was something I wanted to avoid.
With this line of code I was thinking about new players, who might not know how to create macros, hence wanting it laid out in the right way to create the macro properly.
I'll revise the code to read like this then:
Type /macro to open the macro creation interface. Create this macro and place it on your actionbar. On the 1st line type /target Stolen Ram, then press enter, on the 2nd line type /whistle, then drag the macro to your actionbar.

commented

Rather than create a macro, would it be simpler to use |T|Stolen Ram| to target the Ram and then put in your notes |N|Once you acquire the Stolen Ram as a target using the target button, type /whistle in your chat frame to call it." ?

Just a suggestion as an alternative and saves from teaching someone about marcos.

commented

Yes but you have 6 to call, and doing it from the macro just makes it easier

commented

But you need 6 to complete the quest. So if you make it part of complete like C Rams on the Lam|QID|25905|T|Stolen Ram|N| Acquire Ram, then /whistle.| it will stay up until all 6 rams are called. (I am guessing this is the quest you are trying to do.) Once you reach 6 and the quest is completed, the line will advance. But until then, the target button will show along with the note to whistle.

commented

I think I'll just stick to my current code:

N Rams on the Lam|QID|25905|N|Type /macro to open the macro creation interface. Create this macro and place it on your actionbar. On the 1st line type /target Stolen Ram, then press enter, on the 2nd line type /whistle, then drag the macro to your actionbar.|
C Rams on the Lam|QID|25905|NC|M|69.76,57.21|Z|Dun Morogh|N|Use your macro to target and whistle at Stolen Rams. You have to get within 15 yards of them.|

That works okish for me, would be better if I could do it as a multi-line but if I can't then I can't.

Although that fixes my guide and what I wanted to do with it, it doesn't fix the fact that if you try to record a multi-line note, it break any guide at the 1st line. It doesn't throw any errors, but it just doesn't load the rest of the guide. Something needs to be put in place to stop that from happening, so that anyone recording doesn't accidently break their own guides.....like me :)

commented

ok, now this is starting to make sense. Sorry it took so long to understand it. So when you edit a line in recorder, and go to the note section and enter the following, it breaks when it tries to run the guide.

Note:

Open up the macro creation interface and type this:

/target Stolen Ram

/whistle

...end note

That this breaks the addon because it expects the note to be all in continueous single charcters with no line break within.

commented

I think there's a way to do this in the ace dialog options, I'll look into it. I've broken a guide in this way before as well, it sucks! What I'd really like is a way to actually include these newlines in the text for formatting, but as yet I haven't found a way to do that.

commented

Yes, that makes sense and I was able to get it to work that way. So the new deliminter is "\n".

commented

Awesome! Sorry that didn't get communicated very well, stupid git trying to be smarter than me. I had to type three \ to get it to display two, lol.

Thanks a ton for this, Twists. I really appreciate it, hopefully I'll get caught up on school work this week and I can be more helpful!