alostsock / craftingway

A ffxiv crafting tool

Home Page:https://craftingway.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Copy macro produces Windows line endings on macOS

mweber15 opened this issue · comments

Thank you for making the app! It is indispensable!

The "Copy macro" link puts the macro on the clipboard with Windows line endings, which prevents it from being directly pasteable into the game on macOS.

This macro:

/ac Veneration <wait.2>
/ac "Waste Not II" <wait.2>
/ac Groundwork <wait.3>
/ac Manipulation <wait.2>
/ac "Delicate Synthesis" <wait.3>
/ac Innovation <wait.2>
/ac "Preparatory Touch" <wait.3>
/ac "Preparatory Touch" <wait.3>
/ac "Preparatory Touch" <wait.3>
/ac "Basic Touch" <wait.3>
/ac "Great Strides" <wait.2>
/ac Innovation <wait.2>
/ac "Byregot's Blessing" <wait.3>
/ac "Basic Synthesis" <wait.3>
/e Part 1 complete <se.8>

Looks like this if pasted directly into the macro editor on macOS:
image

I'm working around this by pasting it into a text editor and removing the extra (from the perspective of macOS) line ending character. It would be a nice little time saver to avoid the extra step if possible.

I believe if this was just \n instead of \r\n it would work as expected for both Windows and non-Windows.

copyText={macroTextLines.join("\r\n")}

Thanks for creating an issue! I honestly forgot that the Mac client existed 🥲

This is caused by the Windows game client requiring CR LF newlines: #3

Should be fixed by 3b1a800, which uses the browser's user-agent to decide on which newline format to use. This solution isn't great because browser user-agent strings can be unreliable; in the future (sometime after Dawntrail release), I am planning on adding a settings page which will probably include an override for this just in case.

I only have one Mac device, and it seems to output correctly there, so I'm closing this issue. Although please let me know if this doesn't fix the problem.