# KScript Editor V1.23.1 (OSX version now available)



## kotori (Jun 22, 2007)

_Edit:_
The sharp 1.23 version is now available for download.

Hi everyone,
I made *http://nilsliberg.se/ksp/setup-kscript-editor-1.23beta.exe (V1.23b)* of the script editor available. I implemented my own syntax highlighter and added support for _*folding*_. Folding means that you can show or hide any block of code by clicking on the plus/minus side in the left margin. This is extra useful when editing old-style scripts which do not use functions and tend to have horrific nesting levels. Due to the highlighter being implemented in python it's pretty slow, so take care if you try this with large scripts. The styling is cached though so you will only notice this slowness when opening files, when pasting large blocks of text into the editor or sometimes when scrolling some part of the code into view for the first time. Btw. a useful trick: by holding shift and control pressed and clicking anywhere in the fold margin you can expand/contract all top-level blocks.

To use folding you have to activate it in the Settings menu (it's off by default).

Just the other day I received a donation to aid the development of the editor.
I would like to take the opportunity to say that I'm very greatful for all donations so far. Thank you very much everyone (you know who you are)! 
(If anyone likes to contribute there's a paypal link on the download page).

Cheers,
Nils


----------



## Dynamitec (Jun 22, 2007)

*Re: KScript Editor V1.23 (beta)*

Let me be the first to thank!!!  =o Very coool features!!!


----------



## kotori (Jun 22, 2007)

*Re: KScript Editor V1.23 (beta)*



Dynamitec @ Fri Jun 22 said:


> Let me be the first to thank!!!  =o Very coool features!!!


Thanks Benjamin! I'm a bit worried how it copes performance-wise with your monster scripts though... :mrgreen:
Btw. the new syntax highlighter (which only is active when folding is activated) is better suited for KSP than the earlier one (which is active when folding is deactivated). For example, it will highlight 'on note' but not 'note' and 'on' so now the latter ones can be used as variable names without problems.


----------



## Dynamitec (Jun 22, 2007)

*Re: KScript Editor V1.23 (beta)*

Be sure that i let you know  At moment i have more work with sampling than with scripting. But this will change AFTER the sampling process


----------



## Dynamitec (Jun 22, 2007)

*Re: KScript Editor V1.23 (beta)*

Some quick notes:

- Folding works great BUT the symbol is very small... do you know the .NET Studio from MS? I really like this kind of folding

- Would it be possible to change the highlight colors? I would like to have variables highlighed, too. If this is possible.

Thanks again! Very nice!


----------



## kotori (Jun 22, 2007)

*Re: KScript Editor V1.23 (beta)*



Dynamitec @ Fri Jun 22 said:


> - Folding works great BUT the symbol is very small... do you know the .NET Studio from MS? I really like this kind of folding


Try to redownload it. It's not exactly like Visual Studio, but closer I think.



> - Would it be possible to change the highlight colors? I would like to have variables highlighed, too. If this is possible.


As opposed to functions and numbers and strings you mean? 
Would it be ok to highlight variables and functions the same way? It's a bit difficult to tell parameterless functions apart from variables...


----------



## Dynamitec (Jun 22, 2007)

*Re: KScript Editor V1.23 (beta)*



> Would it be ok to highlight variables and functions the same way? It's a bit difficult to tell parameterless functions apart from variables...



This shouldn't be a problem


----------



## Dynamitec (Jun 22, 2007)

*Re: KScript Editor V1.23 (beta)*

I'm redownloading at moment! THANKS, THANKS, THANKS for your hard work! :D

*edit* YES, much better now!


----------



## Dynamitec (Jun 22, 2007)

*Re: KScript Editor V1.23 (beta)*

Hi again,

it's really fine so far. But you were right: it's almost unusable for me, since it takes 15-40s to open one my larger scripts with the new highlighting. Would it be possible to save the cached information on disc?


----------



## Nickie Fønshauge (Jun 22, 2007)

*Re: KScript Editor V1.23 (beta)*

Hey Nils, this looks great. Thanks for all your efforts.

I am afraid there is a small problem with the folding feature, though. When I fold "on init" it only folds until the first "end", even if it is just "end family".


----------



## kotori (Jun 23, 2007)

*Re: KScript Editor V1.23 (beta)*

I fixed multiple problems related to folding and syntax highlighting and replaced the beta with this newer version (same link as before but a new file). 
:arrow: Please download http://nilsliberg.se/ksp/setup-kscript-editor-1.23beta.exe (the new version).

I also added a file named "styles.ini" which you can modify if you want to change the syntax highlighting styles. 
The font styles you can affect are: foreground color, background color, italic and bold. 
You can set an individual style for each of: keywords, identifiers, built-in variables, built-in functions, user-defined functions, comments, numbers and strings.
This is only affective when Folding has been activated. If you come up with some cool styling scheme please share it.

@Benjamin:
The extra delay when loading scripts in Folding mode seems acceptable for scripts with up to 2000 lines. Maybe you could refactor your scripts into modules if they are larger.


----------



## Dynamitec (Jun 23, 2007)

*Re: KScript Editor V1.23 (beta)*

Hi Nils! It's very cool that way! Btw. you should rename "Folding" into "Folding and extended highlighting" or something like that, since it's not clear you can do the extended highlighting only with folding (for someone new to the editor 

REALLY GREAT UPDATE SO FAR! /\~O


----------



## Dynamitec (Jun 23, 2007)

*Re: KScript Editor V1.23 (beta)*

Bug report #1

- If you change STYLE_IDENTIFIER things get a litte bit strange.


----------



## Dynamitec (Jun 23, 2007)

*Re: KScript Editor V1.23 (beta)*

Bug report #2:

- If you change STYLE_USER_FUNCTION things get little bit strange, too.


----------



## kotori (Jun 23, 2007)

*Re: KScript Editor V1.23 (beta)*

Hi Benjamin,
I uploaded a new version. Please try it.

Nils


----------



## Big Bob (Jun 23, 2007)

*Re: KScript Editor V1.23 (beta)*



Dynamitec @ Sat Jun 23 said:


> Hi Nils, maybe one can just write brackets behind a function call - because it should work than. Like "on_init.Handler()". As i recall there are languages where you have to do this. So maybe this is a workaround.



Careful now :o , we don't want to 'break' all the existing scripts (or have to go through all old scripts and replace: 'function abc' with 'function abc()'. That would be a bummer! :cry:


----------



## Dynamitec (Jun 23, 2007)

*Re: KScript Editor V1.23 (beta)*

Hi Bob,
noooooo, noooo...i don't want to break the old script. It should keep working without brackets. But: with brackets the highlighting works correct. That's all 

*edit* So it could be optional possible...


----------



## Nickie Fønshauge (Jun 23, 2007)

Hi Nils/Benjamin/Anybody,

Qustion: How do you get all the fancy colors (extended highlighting)? My installation looks like it always did, except for the folding graphics.


----------



## kotori (Jun 23, 2007)

*Re: KScript Editor V1.23 (beta)*

I added empty arguments list as an *option* for user-defined functions. I'm not too found of this since I strive for consistency with the original KSP syntax, but I figured it doesn't hurt to give users a bit of a choice. 
So now it's possible to invoke a user-defined function like "myfunc" or "myfunc()". I recommend the former though.
Please download the changed installation file (same url as before).


----------



## Dynamitec (Jun 23, 2007)

*Re: KScript Editor V1.23 (beta)*

Hi Nils,
it says file not found!

@Nickie: There is a file styles.ini where you can change the colors! I'm going to upload my color scheme as soon as i finished it.


----------



## kotori (Jun 23, 2007)

*Re: KScript Editor V1.23 (beta)*



Dynamitec @ Sat Jun 23 said:


> Hi Nils,
> it says file not found!


I was uploading at the same time as I wrote the previous message. Didn't expect anyone to be that quick.  Please try now when the upload is finished.


----------



## Dynamitec (Jun 23, 2007)

*Re: KScript Editor V1.23 (beta)*

Hehe, Nils, when it comes to updates to the KScript Editor i'm like a child who can't wait to open all the Christmas or Birthday presents 

*edit* So it's like i have birthday very often when it comes to updates to your editor. Of course i would like to try out new features on a new Kontakt version, too. But it seems that this happens less often than i have birthday :(


----------



## Dynamitec (Jun 23, 2007)

*Re: KScript Editor V1.23 (beta)*

Some styles:


----------



## Dynamitec (Jun 23, 2007)

*Re: KScript Editor V1.23 (beta)*

Some new problems again:

1) SET_CONDITION is interpreted as a user function right now (small problem of course 

2) After compilation where an error occoured the editor hangs on "FILE -> NEW" (bigger problem!)

Traceback (most recent call last):
File "kscript_editor.py", line 1838, in OnNew
File "kscript_editor.py", line 1030, in __init__
File "kscript_editor.py", line 213, in __init__
File "ConfigParser.pyo", line 292, in get
ConfigParser.NoSectionError: No section: 'keywords'


----------



## kotori (Jun 23, 2007)

*Re: KScript Editor V1.23 (beta)*



Dynamitec @ Sat Jun 23 said:


> 1) SET_CONDITION is interpreted as a user function right now (small problem of course


Fixed.



> 2) After compilation where an error occoured the editor hangs on "FILE -> NEW" (bigger problem!)


Fixed.

I now show the progress of the highlighting/folding process and the UI doesn't look messed before it has completed. Furthermore I fixed a couple of things like auto-expansion of folding when a line with an error is to be displayed etc. I think is getting more and more robust. Thanks for the styles Benjamin.

:arrow: Please http://nilsliberg.se/ksp/setup-kscript-editor-1.23beta.exe (download the updated beta).


----------



## Dynamitec (Jun 23, 2007)

*Re: KScript Editor V1.23 (beta)*

Hi Nils!

Thank you very much for the update! I'll try it out tomorrow! Thanks for listening and developing what's needed =o

*edit* "I now show the progress of the highlighting/folding process" Hm, where is this shown? I don't see anything!


----------



## Nickie Fønshauge (Jun 23, 2007)

*Re: KScript Editor V1.23 (beta)*

Hi Benjamin,
Thanks for your help. Your styles look great. For some reason I didn't get the any "styles.ini" file with the first 1.23beta installation. It works fine now with the latest version, though.



Dynamitec @ 23rd June 2007 said:


> *edit* "I now show the progress of the highlighting/folding process" Hm, where is this shown? I don't see anything!


Lower left corner.


----------



## Big Bob (Jun 23, 2007)

*Re: KScript Editor V1.23 (beta)*

Hey Nils,

I finally got around to trying this latest feature (I wanted to wait until Nickie and Benjamin got done with their initial onslaught because that usually results in a flurry of quick changes :wink: ). Looks like another winner! I haven't been able to figure out too much use for 'folding' for scripts written since the introduction of the KScript Editor, but, as you said in your first post, it's great for older (pre-NL) scripts.

This editor just keep getting better and more indispensible all the time. I can tell you that separate compaction for names that you added with V1.22.6 is a real 'jewel' :D . In fact, I'm going to revise the SIPS manual again to rewrite the section on using compact output. I can't say enough good about the benefits of this new feature.

Thanks a zillion Nils for a really great tool.

God Bless,

Bob


----------



## kotori (Jun 25, 2007)

*Re: KScript Editor V1.23 (beta)*

Just a (hopefully) helpful hint:
Since loading files takes longer with "Folding and extended syntax highglighting" active one has to wait for each file to finish before being able to load the next. For this reason I think it's easier when dealing with multiple large files to load them by using drag and drop (to the navigation panel, menu or status bar).


----------



## gh (Jun 25, 2007)

*Re: KScript Editor V1.23 (beta)*

Hi Nils!

Thank you for this great update and all your efforts. :D 

Time to visit paypal again.

Günter


----------



## kotori (Jun 25, 2007)

*Re: KScript Editor V1.23 (beta)*

Thank you very much Günter! :D


----------



## gh (Jun 25, 2007)

*Re: KScript Editor V1.23 (beta)*

Hi!

For those who want to experiment with the new styles.ini here is a link to a RGB color chart: http://www.tbi.univie.ac.at/TBI/hex_color_chart.html

Günter


----------



## kotori (Jun 25, 2007)

*Re: KScript Editor V1.23 (beta)*



gh @ Mon Jun 25 said:


> Hi!
> 
> For those who want to experiment with the new styles.ini here is a link to a RGB color chart: http://www.tbi.univie.ac.at/TBI/hex_color_chart.html
> 
> Günter



In addition to that these symbolic names may be used, eg. "black" or "orange red" (without the quotes).


----------



## kotori (Jun 28, 2007)

*Re: KScript Editor V1.23 (SHARP)*

KScript Editor seems pretty stable now and I've been using it without problems so I decided to release a sharp 1.23 version.
:arrow: Download it at: http://nilsliberg.se/ksp/

In addition to the folding and extended syntax highlighting in the beta I also added a longer file history in this version. The ten last used files are now available in the file menu for quick access. 
Cheers,
Nils


----------



## Big Bob (Jun 28, 2007)

*Re: KScript Editor V1.23 (SHARP - was beta)*

Hi Nils,

There also seems to be something wrong with the new file history. After accessing 10 or more different files I now notice that the real estate keeps growing. Above the 10 numbered files, the oldest one keeps adding to the list above the numbered list. For example, I now have something like:

10 xyz
10 xyz
10 xyz
10 xyz
10 xyz
1 abc
2 def
3 ghi
4 jkl
5 mno
6 pqr
7 stu
8 vwx
9 yzz
10 xyz

The list of 10s on top just keeps growing and growing. Pretty soon it's not going to fit on my monitor, HELP! :shock: :shock:


EDIT: Here's a little more info. If you close and then re-launch the editor, the upper list reduces to one line. But then each time you open a file, another two copies of the top line appear. As far as I know this upper list just keeps getting bigger and bigger (2 lines per each file you open) until you again close the editor. There may be some other ways in which this 'upper list' grows but I haven't pinned it down yet.

Hope this doesn't spoil your day :wink: 

God Bless,

Bob


----------



## kotori (Jun 28, 2007)

*Re: KScript Editor V1.23 (SHARP - was beta)*

Hi Bob and Nickie,
Thanks for the cheering. :D 

Bob: that is strange. It seemed to work for me when I took it for a quick test run. Maybe it doesn't get problematic until you reach ten elements. I'm not currently at home, but I will have a look when I return on wednesday. I hope you can live with it until then.

Nickie: I'll see what I can do about the families and the navigation. 

Cheers,
Nils


----------



## Big Bob (Jun 28, 2007)

*Re: KScript Editor V1.23 (SHARP - was beta)*



> Bob: that is strange. It seemed to work for me when I took it for a quick test run. Maybe it doesn't get problematic until you reach ten elements. I'm not currently at home, but I will have a look when I return on wednesday. I hope you can live with it until then.



Your assessment is correct. I didn't notice any of this until my list hit 10 file paths. Is there any easy way for me to clear the history? If not, I just have to periodically close the editor and then relaunch it. That doesn't clear the actual history but it does reset the 'phony' upper history to one entry (which of course then builds back up again).

No problem working around it, if nothing else I can just go back to 1.22.6 :wink: 

Have a nice trip or time away from home or whatever? See yah Wednesday 8) 

God Bless,

Bob


----------



## Nickie Fønshauge (Jul 6, 2007)

Hi Nils,

Just in case you haven't figured out why the file history list keeps growing: I noticed no. 10 is duplicated whenever I save a file.


----------



## kotori (Jul 6, 2007)

Nickie Fønshauge @ Fri Jul 06 said:


> Hi Nils,
> Just in case you haven't figured out why the file history list keeps growing: I noticed no. 10 is duplicated whenever I save a file.


Thanks, I noticed that as well. The problem was that all old file history menu items are supposed to get deleted when a history update takes place, but due to a little off-by-one error the last item wasn't. Anyway, it's fixed now in KScript Editor 1.23.1.

Fixing support for duplicate families is a bit more complicated (because some blocks can sometimes be unclosed or commented out) so it's not yet done.


----------



## Big Bob (Jul 6, 2007)

*Re: KScript Editor V1.23 (SHARP - was beta)*

Hi Nils,

Thanks a bunch for fixing the file history. I was just getting used to how cool it was having a nice long history until the uncontrolled growth problem occured :( . But now that it's fixed, I can get back to enjoying it :D . So far, no problems have occured with V1.23.1

God Bless,

Bob


----------



## kotori (Jul 12, 2007)

*Re: KScript Editor V1.23 (SHARP - was beta)*

I wrote a little command line tool to make it possible to go from uncompacted variables to compacted ones without loosing persistent data. To use it you need to have Python installed. Those of you who use OSX probably already have Python and windows users can download it. Then http://nilsliberg.se/ksp/tools/transfer_variables_to_compact.zip (download) my python script.

Usage:
1) On the command line type: python transfer_variables_to_compact.py path-to-your-compiled-uncompacted-script.txt
2) A new file with the suffix 'transfer_script' will be generated in the directory of the script you specified. Apply this transfer script to the script slot where your script which uses uncompacted names is. (The persistent values have now been transferred to the variables with compacted names)
3. Compile your original script with the 'Compact variables' option checked and paste it on top of the transfer script and press Apply. The original persistent values should be preserved.


----------



## Big Bob (Jul 12, 2007)

*Re: KScript Editor V1.23 (SHARP - was beta)*

Hi Nils,

Pretty cool idea, in fact it's so cool that a quick reading didn't do it for me so I've printed your last post for study when my brain settles down from all this plugin stuff :lol: .

However, I tend to use fairly short names to begin with so I'm just thrilled with the new compact output (sans name compression) you added recently. That takes 90% of the bloat out of my code and still retains persistent variable compatibility for my older stuff. Thanks a ka-gillion for that option. o=< 
God Bless,

Bob


----------



## kotori (Jul 12, 2007)

*Re: KScript Editor V1.23 (SHARP - was beta)*



Big Bob @ Thu Jul 12 said:


> Hi Nils,
> 
> Pretty cool idea, in fact it's so cool that a quick reading didn't do it for me so I've printed your last post for study when my brain settles down from all this plugin stuff :lol: .



A simple example: let's say that you are using this uncompacted script and want to compact variables while keeping the value of $pedal:
````*on init*
``````*declare* ui_button $pedal
``````make_persistent($pedal)
````*end on*

````*on ui_control*($pedal)
``````set_controller(64, $pedal * 127)
````*end on*


My python script will when given the script above as input generate something like:
````*on init*``
``````_{ declare both old and new variables }_
``````*declare* ui_button $szwyx
``````*declare* ui_button $pedal
``````make_persistent($pedal)
``````make_persistent($szwyx)
``````_read_persistent_var($pedal)
``````_{ transfer data from old to new variable }_
``````$szwyx := $pedal
````*end on*


You can then post the compacted variant of the first script on top of it and retain persistent data:
````*on init*
``````*declare* ui_button $szwyx
``````make_persistent($szwyx)
````*end on*

````*on ui_control*($szwyx)
``````set_controller(64, $szwyx * 127)
````*end on*


Notes:
* If there are any array variables the transfer script will contain a loop which copies all elements.
* If you paste the three scripts above on top of each other you the persistent value will be kept at each step.
* By uncommenting a line in the python script it should be possible to go the other way as well (from compact names to readable ones). But only if you have access to the uncompacted main script of course.


----------



## Big Bob (Jul 12, 2007)

*Re: KScript Editor V1.23 (SHARP - was beta)*

Hi Nils,

To see if I get the idea right here, let me postulate a practical example. Let's say I'm a user of V105 of SIPS and I'm about to upgrade to V1.51 and further, let us presume that V1.51 is available only in fully compacted source form (ie with hashed names).

1. First I take the original source .txt file and convert it using your Python utility. If I don't have the original source text file, I guess I could load one of my instruments into K2, open the KSP text editor and copy the source to the clipboard (and from there run it through your Python utility). The result of this first step is a Python created source that is a superset of the original source (containing both the uncompacted and compacted version of each identifier originally declared as persistent). Call this the 'superset' source which I now set aside.

2. Next, I take the old, full-name source and run it through your latest editor with the compacted name option turned on. Let's call the result of this step the 'compacted' source.

3. Next I take each instrument and/or .nkp that I have saved panels (and/or User presets) with, and load them into K2 one at a time. For each loaded script, I take a copy of the Python superset and paste it over the loaded file and hit Apply. The result of this is a new script (in memory) containing both hashed and non-hashed variables set to the same value. Then I take the 'compacted' source and paste it over the just updated source and hit Apply again. The result of this can now be resaved (as either a .nkp or .nki) and such files will be V105 files containing all presets and so forth but the original 'long' names will have been replaced with hashed names.

4. After converting each .nkp and .nki as described in step 3, I can then load each such processed .nki or .nkp one at a time and now take the V1.51 source (with hashed names) and paste it over the V105 source with hashed names and hit Apply. Now if I resave the result will be V1.51 containing all the old presets and such and, the source will also be in hashed name form. After doing the V1.51 paste-over operation for each script processed in step 3, I'm done. :D 

Do I have the right understanding of how one would use this Utility? If so, it looks like one could 'break the chain' of being locked into never using compacted names for legacy scripts like SIPS. Of course this would come at the expense of a one-time effort (steps 1, 2, and 3) over and above what would be needed to update to another full-name source (step 4). I wonder what the reaction might be if we only released compacted-name source code henceforth?

God Bless,

Bob

BTW Did you receive the last ISCS update package (V2.04) with V5 & V6 of the VXF Demo scripts? I sent a follow-on query and haven't heard back so I don't know if you are getting this stuff or not. How about a 10-4? :lol:


----------



## Big Bob (Jul 13, 2007)

*Re: KScript Editor V1.23 (SHARP - was beta)*

Hi Nils,

Last night I was thinking about this process and something popped into my head. SIPS uses two forms of Auto Update, one is for carrying control panels forward to the new version and the other carries User Presets forward. The control panel part of this often has to deal with MIDI-controlled knobs and such whose names may change from one version to another (for example families didn't exist for V105 but are used for some of the knobs in newer versions). The auto-update code thus often has to define a list of 'legacy' variables and copy their 'prior' values forward. Thus the old names are dropped from the persistent list and new ones are added. But, the old persistent variables are declared and read (even though they no longer appear in a make_persistent statement). As a result there may be some twists and turns in my code that conceivably might throw a monkey wrench into the process of compacting names. Mind you, I'm not sure about this and it could be that your process will still work. However, I think I should study one or two of these odd situations I'm thinking about to see if there might be an unforseen problem with this process. I will do that but I don't know when because I'm quite busy with other things right now. But, I just wanted to raise a potential red flag. After studying the situation, the flag may well come down :lol: .

Another thought that comes to mind is regarding arrays. A few legacy arrays used by SIPS have been reduced in size through various updates. When K2 encounters an array by the same name it fills as much as it can (when the new array is smaller) and it pads the excess when the new array is larger. Since you mentioned that your Python program executes a loop to copy arrays forward, I thought I would mention this (however, knowing how thorough you are, you probably have already taken this into account :wink: ). Of course this kind of thing may not even apply to this situation because your Python program is always dealing with the same version of the script and doesn't actually get involved in the version upgrade process itself.

God Bless,

Bob


----------



## Big Bob (Jul 13, 2007)

*Re: KScript Editor V1.23 (SHARP - was beta)*



kotori @ Fri Jul 13 said:


> Hi Bob,
> I think the transfer scripts should work for all types of scripts. I think the concepts of writing your own transfer from old to new names and upgrading to a newer script version are quite separate concepts which shouldn't interfer. Although I haven't tested it much myself yet the idea behind this tool is not very complex which is evident by looking at the python script source code.
> 
> Cheers,
> Nils



You are probably correct but, without studying the situation carefully, there is a small chance that something may need to be modified. For example, if your Python program only creates new names for names that appear in the 'make_persistent' function call, and we have some complex interim version that also has to be converted???? What I mean by that is that my scenario for upgrade from V105 to V151 went straight from V105 to V151. But, I can envision situations in which it may have to progress via some in-between versions which contain these unusual name aliases and where the old do not appear in 'make_persistent'.

As I said, it may still be OK, primarily because your conversion program only has to deal with one version at a time but, I still think it will be worth checking out. This of course need not impact anything you are doing, I just brought this up as a courtesy more or less.

*BTW did you get the scripts and design note updates that I sent?* I just can't seem to get this question answered :lol: 

God Bless,

Bob


----------



## kotori (Jul 13, 2007)

*Re: KScript Editor V1.23 (SHARP - was beta)*

Hi Bob,
For simplicity my tool declares all variables as persistent and transfers values for all variables. But even if I transferred only persistent variables I can't see why there would be any problem. Do you have any example?

Oh, sorry. Yes, I got your mail. Thank you!

Cheers,
Nils


----------



## Big Bob (Jul 14, 2007)

*Re: KScript Editor V1.23 (SHARP - was beta)*

Hi Nils,



> For simplicity my tool declares all variables as persistent and transfers values for all variables. But even if I transferred only persistent variables I can't see why there would be any problem. Do you have any example?



No, this is just a mental gymnastics exercise with about 1% of my usual 10% of my brain functioning :lol: . Between working on a major SIPS upgrade and trying to keep up with Marc, I'm busier than a 'one-armed paper hanger during fly season'. :wink: 

Please let me clarify something here regarding the name compaction deal. In order to determine if there really is any 'fire' to go with the 'smoke', I need an uninterrupted block of time to examine the situation I have in mind. Then, *most likely, it will turn out that I'm just 'tilting at windmills' *:oops: . I didn't mean to put you into a defensive state, I was just thinking out loud so to speak :lol: .

I haven't taken the time to use your utility yet (nor have I had a chance to even download it or look at the code so I'm flying blind :wink: ). Once I have a chance to actually use this and really think about it for a while, I'm sure everything will be fine 8) . 



> Oh, sorry. Yes, I got your mail. Thank you!



Thanks for the 10-4, and you have a beautiful day my friend.

God Bless,

Bob


----------



## kotori (Jul 14, 2007)

*Re: KScript Editor V1.23 (SHARP - was beta)*

Here is the syntax highlighted http://nilsliberg.se/ksp/tools/transfer_variables_to_compact.html (source code) of the transfer script generation tool in case anyone is interested.


----------



## Big Bob (Jul 22, 2007)

*Re: KScript Editor V1.23 (SHARP - was beta)*

Hi Nils,



> I haven't taken the time to use your utility yet (nor have I had a chance to even download it or look at the code so I'm flying blind ). Once I have a chance to actually use this and really think about it for a while, I'm sure everything will be fine .



Just to set the record straight, I finally got around to trying this nifty utility and working through the 'convoluted' situations I was concerned about. As usual, I was making much ado about nothing (or maybe I was smoking something I shouldn't have been :lol: ). In any case this utility does just what you said it does, and, it should be a welcome tool for anyone who wants to use compact names but has avoided it because of the persistent variable problem.

Thanks for another great contribution to the scripting community Nils.

God Bless,

Bob


----------



## kotori (Jul 23, 2007)

*Re: KScript Editor V1.23 (SHARP - was beta)*



Big Bob @ Sun Jul 22 said:


> Just to set the record straight, I finally got around to trying this nifty utility and working through the 'convoluted' situations I was concerned about. As usual, I was making much ado about nothing (or maybe I was smoking something I shouldn't have been :lol: ). In any case this utility does just what you said it does, and, it should be a welcome tool for anyone who wants to use compact names but has avoided it because of the persistent variable problem.
> 
> Thanks for another great contribution to the scripting community Nils.



Thanks for the feedback Bob. 
For anyone interested in this tool it got a bit simpler to use. Just download and extract http://www.nilsliberg.se/ksp/tools/transfer_variables_to_compact.rar (this file). Then drag and drop your compiled (uncompacted) script file to transfer_variables_to_compact.exe and a new file will be generated in the folder where your script is placed.


----------



## kotori (Jul 23, 2007)

*Re: KScript Editor V1.23*

:arrow: The latest script editor version is now available for OSX! :D 

This version wouldn't have been possible without the kind help of http://www.frankvangompel.com/ (Frank van Gompel) (_frankvg_ on this forum). Thank you so much Frank!


----------



## Thonex (Jul 23, 2007)

*Re: KScript Editor V1.23*



kotori @ Mon Jul 23 said:


> :arrow: The latest script editor version is now available for OSX! :D
> 
> This version wouldn't have been possible without the kind help of http://www.frankvangompel.com/ (Frank van Gompel) (_frankvg_ on this forum). Thank you so much Frank!



Awesome!!!!

I don't use the OSX version personally (all my K2s are on PCs) but making this valuable tool available for the Mac is great news!!!!

Cheers Nils and Frank. o-[][]-o o-[][]-o o-[][]-o 

T


----------



## Mike Greene (Jul 23, 2007)

Ah! Very timely and lucky for me! Thank you very much, Nils and Frank! 8)


----------



## Nickie Fønshauge (Aug 19, 2007)

Nils,

I am afraid I found a wee bug.

The syntax checker doesn't like


```
$a := .not. $a
```
even though it is perfectly valid.


----------



## kotori (Aug 19, 2007)

Hi Nickie,
Thanks for reporting this. Should be fixed in V1.23.2 - released just now.

Changes:
* Fixed .not. operator
* Added new styles STYLE_BRACE_LIGHT, STYLE_BRACE_BAD for syntax highlighting of matching and non-matching parenthesis and brackets.


----------



## Nickie Fønshauge (Aug 23, 2007)

Hi Nils, 

thanks for fixing the .not. bug.

I ran into another problem: I cannot compile a script, that contains the Engine Parameter *INTMOD_TYPE_ENVELOPE*. The editor doesn't recognize this parameter - it is valid, although completely undocumented.


EDIT: Ok, I added it to ksp_util.txt and I can compile it now. Maybe you could include *INTMOD_TYPE_ENVELOPE* in ksp_util.txt in future versions, yes?


----------



## kotori (Aug 24, 2007)

Hi Nickie,
Thanks. INTMOD_TYPE_ENVELOPE will be included in the next release. Cool with even more undocumented identifiers.  

Cheers,
Nils


----------

