It is currently April 19th, 2024, 10:51 am

[SOLVED] How to get local image link from txt.file

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: How to get local image link from txt.file

Post by jsmorley »

Zip up the file and attach it.
Nachtschade
Posts: 24
Joined: August 1st, 2017, 10:02 pm

Re: How to get local image link from txt.file

Post by Nachtschade »

Here it is.
You do not have the required permissions to view the files attached to this post.
Nachtschade
Posts: 24
Joined: August 1st, 2017, 10:02 pm

Re: How to get local image link from txt.file

Post by Nachtschade »

I might be getting somewhere. According to notepad++ there is a difference in the files.

The file that was build by the MM script:

Image

A file I created myself:

Image

As we can see, the first file has an extra line. Meaning that the MM script creates a blank line, which is likely the cause for the RM skin to be unable to read it.

Now, how to figure out to either have the MM script not create that extra line or the RM skin ignore it.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: How to get local image link from txt.file

Post by jsmorley »

Nachtschade wrote:Here it is.
The issue is that the text file has a linefeed at the end of the line. So when you use:

RegExp=(?siU)^(.*)$

You are getting the name of the file and the characters carriage return / linefeed as the returned value.

Add this to the measure:

RegExpSubstitute=1
Substitute="\r":"","\n":""
Nachtschade
Posts: 24
Joined: August 1st, 2017, 10:02 pm

Re: How to get local image link from txt.file

Post by Nachtschade »

Ha! While you wrote that I actually figured out how to do it from the other end by replacing WriteLine with Write in the MM script. :D
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: How to get local image link from txt.file

Post by jsmorley »

Nachtschade wrote:Ha! While you wrote that I actually figured out how to do it from the other end by replacing WriteLine with Write in the MM script. :D
Great, I hadn't followed this closely enough to be sure you had control over how the text file was created.
Nachtschade
Posts: 24
Joined: August 1st, 2017, 10:02 pm

Re: [SOLVED] How to get local image link from txt.file

Post by Nachtschade »

Thanks a lot to the both of you!

I can now finally make my now playing skins the way I want:

Image

:17good