• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

A large line is written to a file and divided into paragraphs

Contributor ,
Oct 17, 2022 Oct 17, 2022

Copy link to clipboard

Copied

I have a very long code that needs to be written to a file using FL file.write(). But in the file, the code that should be written in one line is written as several paragraphs. Because of this, my code doesn't work. Is there a way to fix this problem?

111111.PNG

22.PNG

  

TOPICS
ActionScript , Code , Exchange extensions

Views

199

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 18, 2022 Oct 18, 2022

I think you're gonna have to use some regex to remove line breaks.

 

When I use an online tool like this one, I can get your text in one single line.

 

image.png

Votes

Translate

Translate
Community Expert ,
Oct 18, 2022 Oct 18, 2022

Copy link to clipboard

Copied

Hi.

 

Can you show us the complete code or at least the most relevant parts?

 

Regards,

JC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 18, 2022 Oct 18, 2022

Copy link to clipboard

Copied

Here is a link to the original project https://drive.google.com/file/d/1br2ST5Tww4hEdPmXh5_C6fcsNJooITJK/view?usp=sharing

I'm making a plugin installer

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 18, 2022 Oct 18, 2022

Copy link to clipboard

Copied

Thanks for the file.

 

This is what I get in Visual Studio Code:

Without word wrap:

image.png


With word wrap:

image.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 18, 2022 Oct 18, 2022

Copy link to clipboard

Copied

again, the uploaded file is one line.

 

and you can't definitively say anything with screenshots.  ie, they are misleading.

 

but you both should be able to place the curser at any spot you think is just prior to a break and then use the next arrow to see if there's anything (eg, a line break) between two characters.

 

or change your text/code editors width.  is there a spot that consistantly "appears" as if it's a line break?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 18, 2022 Oct 18, 2022

Copy link to clipboard

Copied

I recorded a video where I demonstrate the problem. After transferring the text to the first line, everything worked. But I'm making a script for the user, which should get the finished result without correcting the code in the files https://drive.google.com/file/d/1SG-kY90e5v84ZYVgl-PAkKBF8oxYjtrJ/view?usp=sharing

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 18, 2022 Oct 18, 2022

Copy link to clipboard

Copied

the video quality is too poor (for me) to see anything helpful.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 18, 2022 Oct 18, 2022

Copy link to clipboard

Copied

I just have a word wrap (as in the second screenshot). I need to avoid it. All code should be written in one line

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 18, 2022 Oct 18, 2022

Copy link to clipboard

Copied

I think you're gonna have to use some regex to remove line breaks.

 

When I use an online tool like this one, I can get your text in one single line.

 

image.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 18, 2022 Oct 18, 2022

Copy link to clipboard

Copied

Great, that's just what I need. Thank you very much

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 18, 2022 Oct 18, 2022

Copy link to clipboard

Copied

LATEST

You're welcome!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 18, 2022 Oct 18, 2022

Copy link to clipboard

Copied

the topmost code you showed is one line.

 

where do you see a line break (not a line wrap)?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Oct 18, 2022 Oct 18, 2022

Copy link to clipboard

Copied

The message code should be written on one stoic for correct operation, but I have a line break

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 18, 2022 Oct 18, 2022

Copy link to clipboard

Copied

copy and paste here the few hundred characters above and below the line break.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines