It is currently March 28th, 2024, 2:01 pm

Help in editing a lua script designed by another person - details in post.

Get help with creating, editing & fixing problems with skins
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am
Contact:

Re: Help in editing a lua script designed by another person - details in post.

Post by Mor3bane »

balala wrote: July 25th, 2020, 2:27 pm I'm using Notepad++ and as said I can edit it with no problems. If a !WriteKeyValue bang writes anything, Notepad++ ask me if I want to reload the file, but otherwise it is editable.
Hmm, well, the same thing with SublimeText3 it asks for a reload but inhibits editing once the file has changed on its own. So, I just unload the skin edit then restart.

You did see what happens though - the skin broke for you and would not work. Therefore you do know what I meant when I said there are 'issues' with editing.

At any rate, NP++ or PN3 or ST3 - I've used them all as well as others for editing several languages, so I know they all have different behaviour with 'live' editing. I like ST3 the best since it is the most configurable and I have indeed configured those all to some degree.

Thanks for the assistance, with this thread's topic as well as many others. :thumbup:
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help in editing a lua script designed by another person - details in post.

Post by balala »

Mor3bane wrote: July 25th, 2020, 11:51 pm You did see what happens though - the skin broke for you and would not work. Therefore you do know what I meant when I said there are 'issues' with editing.

At any rate, NP++ or PN3 or ST3 - I've used them all as well as others for editing several languages, so I know they all have different behaviour with 'live' editing. I like ST3 the best since it is the most configurable and I have indeed configured those all to some degree.
If there are such issues, try using Windows built-in Notepad, just for live editing. I agree it has a lot of disadvantages, but at least for sure won't have such issues.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am
Contact:

Re: Help in editing a lua script designed by another person - details in post.

Post by Mor3bane »

balala wrote: July 26th, 2020, 6:14 am If there are such issues, try using Windows built-in Notepad, just for live editing. I agree it has a lot of disadvantages, but at least for sure won't have such issues.
My next option will be to move the variables that are being updated with the !WriteKeyValue Bangs to the inc file so editing the main functions will not be an issue with the skin running. It has been tricky as there seems to be some - I wouldn't call the redundancies, but what appear to be multiple Bangs that seem to be doing the same thing - anyway, it shouldn't require lua as far as i can see.

Cheers.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Help in editing a lua script designed by another person - details in post.

Post by balala »

Mor3bane wrote: July 28th, 2020, 12:38 am My next option will be to move the variables that are being updated with the !WriteKeyValue Bangs to the inc file so editing the main functions will not be an issue with the skin running.
Good idea, give it a try and let us know if you got it working well.
Mor3bane wrote: July 28th, 2020, 12:38 am anyway, it shouldn't require lua as far as i can see.
Don't see why lua should be involved.
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am
Contact:

Re: Help in editing a lua script designed by another person - details in post.

Post by Mor3bane »

Hello,

I have just noticed an error message coming up in my modified version of the timer look at in this thread.

The skin works great, but the error is certainly shouldnt be recurring on every update, as it is.

The message looks like this:

Code: Select all

!SetVariable: Skin "C:\Users\Sapient\Documents\Rainmeter\Skins\\Options\options.inc" not found (Scroll Timer\CountDownTimer.ini)
!WriteKeyValue: File not found: C:\Users\Sapient\Documents\Rainmeter\Skins\\Options\options.inc (Scroll Timer\CountDownTimer.ini)
The problem is there are many !SetVariable, and !WriteKeyValue bangs in this.

I can post the skin if someone thinks they can help me find the lines being flagged.

I have checked the path and it is correct for the file in question, however, I may very easily be missing something painfully obvious.

Any help is appreciated.
User avatar
brax64
Posts: 172
Joined: July 8th, 2018, 8:05 pm

Re: Help in editing a lua script designed by another person - details in post.

Post by brax64 »

Mor3bane wrote: August 26th, 2020, 12:14 am Hello,

I have just noticed an error message coming up in my modified version of the timer look at in this thread.

The skin works great, but the error is certainly shouldnt be recurring on every update, as it is.

The message looks like this:

Code: Select all

!SetVariable: Skin "C:\Users\Sapient\Documents\Rainmeter\Skins\\Options\options.inc" not found (Scroll Timer\CountDownTimer.ini)
!WriteKeyValue: File not found: C:\Users\Sapient\Documents\Rainmeter\Skins\\Options\options.inc (Scroll Timer\CountDownTimer.ini)
The problem is there are many !SetVariable, and !WriteKeyValue bangs in this.

I can post the skin if someone thinks they can help me find the lines being flagged.

I have checked the path and it is correct for the file in question, however, I may very easily be missing something painfully obvious.

Any help is appreciated.
I noticed this : Skins\\Options
should be "Skins\Scroll Timer\Options" I believe...
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am
Contact:

Re: Help in editing a lua script designed by another person - details in post.

Post by Mor3bane »

brax64 wrote: August 26th, 2020, 4:19 am Maybe doesn't matter but I noticed this : Skins\\Options "\\" instead of "\"
Yes, I noticed that as well. There is no instance in the ini file, or any other file where there are "\\".

I also tried replacing the path with the absolute path (the ini uses a #options# variable for that path), with no change in skin behaviour and the error continues after clearing the log.
User avatar
brax64
Posts: 172
Joined: July 8th, 2018, 8:05 pm

Re: Help in editing a lua script designed by another person - details in post.

Post by brax64 »

Mor3bane wrote: August 26th, 2020, 4:38 am Yes, I noticed that as well. There is no instance in the ini file, or any other file where there are "\\".

I also tried replacing the path with the absolute path (the ini uses a #options# variable for that path), with no change in skin behaviour and the error continues after clearing the log.
Downloaded your skin and did notice this:

Code: Select all

options=#CURRENTPATH#\Options\options.inc
@include=#CURRENTPATH#\Options\options.inc
modify it to this

Code: Select all

options=#CURRENTPATH#Options\options.inc
@include=#CURRENTPATH#Options\options.inc
and the double backslash error will be fixed
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am
Contact:

Re: Help in editing a lua script designed by another person - details in post.

Post by Mor3bane »

brax64 wrote: August 26th, 2020, 4:59 am Downloaded your skin and did notice this:

Code: Select all

options=#CURRENTPATH#\Options\options.inc
@include=#CURRENTPATH#\Options\options.inc
modify it to this

Code: Select all

options=#CURRENTPATH#Options\options.inc
@include=#CURRENTPATH#Options\options.inc
and the double backslash error will be fixed
I fixed that, yet the error persists. The old code you accessed is not the current working model.

This is:
Scroll Timer_3.xx.rmskin
(521.93 KiB) Downloaded 6 times
User avatar
Mor3bane
Posts: 943
Joined: May 7th, 2016, 7:32 am
Contact:

Re: Help in editing a lua script designed by another person - details in post.

Post by Mor3bane »

Hey brax64,

Thanks for looking into this with me.

Your line of thought was correct.

There were some paths with this: #SKINSPATH#\Options\options.inc

But needed to be this: #SKINSPATH#Scroll Timer\Options\options.inc

All were after the !WriteKeyValue and !SetVariable Bangs.
Post Reply