|
|
|
07-02-2019, 04:28 AM
|
#1
|
Human being with feelings
Join Date: Feb 2019
Location: Southern Vermont
Posts: 864
|
How to change the ReaScript Compiler indent amount?
Just a quick question:
One one or two of my scripts, when I edit them in the ReaScript compiler, I press 'tab' and the indent amount is double the usual amount. I actually like it. I'm thinking that I probably accidentally hit some combination of keys that increased the indent percentage, and I would like to be able to duplicate this action.
Any help would be great!
Signed,
Dafarkias Wominus Maxipadus (the 3rd)
|
|
|
07-02-2019, 12:44 PM
|
#2
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
Can you send me those scripts? I'll look into that and see, if I canfind that out...
|
|
|
07-02-2019, 02:05 PM
|
#3
|
Human being with feelings
Join Date: Feb 2019
Location: Southern Vermont
Posts: 864
|
Quote:
Originally Posted by mespotine
Can you send me those scripts? I'll look into that and see, if I canfind that out...
|
Sure!
I wish I had details I could provide you with, but unfortunately I don't...
The script I've included is one of the scripts I have where when I press the 'tab' key, it creates an indent equivalent to two normal 'tab' presses in ReaScript. I have no idea if this behavior will follow the script over to you upon download, but I could always record a ultra-short video displaying this behavior--I just kinda assumed a more experienced REAPER scripter might have encountered this before.
|
|
|
07-02-2019, 02:17 PM
|
#4
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
On which most recent Reaper-version could you find this behavior?
|
|
|
07-02-2019, 02:20 PM
|
#5
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
Confirmed, works here as well!
I see, if I can nail it down. Probably some kind of UTF8-thingy...
|
|
|
07-02-2019, 02:24 PM
|
#6
|
Human being with feelings
Join Date: Feb 2019
Location: Southern Vermont
Posts: 864
|
Quote:
Originally Posted by mespotine
On which most recent Reaper-version could you find this behavior?
|
On the newest non-beta--5.979.
It was also doing it with the last two versions though... Only for the certain scripts (like the one I sent you) but never any others. That's why I kinda just assumed that I had accidentally pressed some kinda key-combination that changes the indent-strength of ReaScript.
Quote:
Originally Posted by mespotine
Confirmed, works here as well!
I see, if I can nail it down. Probably some kind of UTF8-thingy...
|
That's wild! I actually kinda assumed it wouldn't carry over.. I'm glad it did though..
|
|
|
07-02-2019, 02:26 PM
|
#7
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
Do you always use the built-in-IDE? Or do you also use another editor?
|
|
|
07-02-2019, 02:32 PM
|
#8
|
Human being with feelings
Join Date: Feb 2019
Location: Southern Vermont
Posts: 864
|
Quote:
Originally Posted by mespotine
Do you always use the built-in-IDE? Or do you also use another editor?
|
For a while I was using Notepad++, which I think is better overall, but lately I've just been using the ReaScript compiler, I think it's kinda convenient.
Really, probably one of my top gripes for the built-in IDE would be the small indent size, which is why I thought it would be cool if it could be figured out to how change it's default amount.
I can't remember if I ever used the Notepad++ on the specific script I included in this post, I think that I probably would have.
|
|
|
07-02-2019, 02:35 PM
|
#9
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
Ok, my current finding: it has something to do, with the way the file was encoded.
The following part
Quote:
--Find the point/position (sample) in which multiple audio tracks conjunctively contain the lowest signal point in a time selection of audio
(which will hereafter be reffered to as the "zero-cross"). The script can either end after this step, or continue on to the next portion
at the user's leisure.
|
triggers this effect, if it's stored in NotePad++
Means, I deleted as much as I could from the file and somewhere in these lines, the trigger is existing.
It's lost, when I copy these lines into a new script.
Will look further into the binary-representation of the files.
|
|
|
07-02-2019, 02:40 PM
|
#10
|
Human being with feelings
Join Date: Feb 2019
Location: Southern Vermont
Posts: 864
|
Quote:
Originally Posted by mespotine
Ok, my current finding: it has something to do, with the way the file was encoded.
The following part
triggers this effect, if it's stored in NotePad++
Means, I deleted as much as I could from the file and somewhere in these lines, the trigger is existing.
It's lost, when I copy these lines into a new script.
Will look further into the binary-representation of the files.
|
Huh!
You are incredible. I feel like a caveman with a stick when I use a computer.
|
|
|
07-02-2019, 02:45 PM
|
#11
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
Ok, here's my theory.
Reaper itself stores tabs using two spaces. But if Reaper finds a normal tab in there, it will alter the way the tab-key works to four spaces.
I think it has probably something to do with the basic features of the IDE to make indenting text easy to do in the style the code was written with an earlier editor. Two spaces when completely written using solely the ReaScript-IDE, or 4 spaces, when written with another editor supporting tabs.
That means: add a tab(using NotePad++) into the script and re-load it in ReaScript.
Voila: Tab is 4 spaces long, not 2.
Edit: experiment with the attached file. Should work.
|
|
|
07-02-2019, 02:47 PM
|
#12
|
Human being with feelings
Join Date: Feb 2019
Location: Southern Vermont
Posts: 864
|
Quote:
Originally Posted by mespotine
Ok, here's my theory.
Reaper itself stores tabs using two spaces. But if Reaper finds a normal tab in there, it will alter the way the tab-key works to four spaces.
I think it has probably something to do with the basic features of the IDE to make indenting text easy to do in the style the code was written with an earlier editor.
That means: add a tab(using NotePad++) into the script and re-load it in ReaScript.
Voila: Tab is 4 spaces long, not 2.
Edit: experiment with the attached file. Should work.
|
Ha! Thank you!
You are a genius.
|
|
|
07-02-2019, 02:50 PM
|
#13
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
Thanks to you for pointing this out. Didn't know that of the IDE in the first place.
Might be helpful for others as well.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 04:55 PM.
|