快速登录:  

Forum: VirtualDJ Plugins

话题: VDJScript Code Editor - Page: 1

由于该帖子的部分内容已年深日久,可能包含陈旧过时或描述错误的信息。

Hey all,

I got kinda fed up with trying to edit long VDJScripts with lots of embedded conditions, editing that was driving me nuts. So spend a few hours today building an editor that will show the code with automatic indentation and Syntax highlighting to make it all a little more readable.

I need a couple more hours to finish a first version, any volunteers for testing?



Cheers!
 

发表时间 Sun 30 Jun 13 @ 5:10 pm
This is awesome!! Will there be a Mac version?
 

发表时间 Sun 30 Jun 13 @ 7:22 pm
does it come in monokai? but hells yeah that's an awesome idea. Another thing you could do is use regular expression to count all the \? and \: in a conditional function to make sure both sides are balanced. I use it in something similar but using web technology. I can send it to you if you want to have a look

Also can you add compiler variables. It would be easier if you could just do a script once with a variable placeholder. In my compiler webpage thing I use

@num = deck number loop;
@size = array(0.125, 0.25, 0.5, 0.75, 1, 4, 8, 16);
@effect = array(users can enter effect names or actions); eg

@effect = array('ramp_delay', 'philta', 'rollit', 'etc...') ;

or you could use it like this

@effect = array(
"deck "+@num+" effect 'ramp_delay' slider 1 50% & deck "+@num+" effect 'ramp_delay' slider 2",
"deck "+@num+" effect 'philta' slider 1 & deck "+@num+" effect 'philta' slider 2",
"deck "+@num+" effect 'rollit' slider 1 & deck "+@num+" effect 'rollit' slider 2",
"deck "+@num+" effect 'etc...' slider 4 & deck "+@num+" effect 'etc...' slider 6",
);

then when compiling just loop through the array

although I use individual textareas to unput the code before compiling so this may not work the same in something like this
 

发表时间 Sun 30 Jun 13 @ 7:24 pm
I was just thinking about this a little more... It would be cool if you could read the deck attribute and push that into the script at compile time, it may also be a good idea to add a grouping attribute to the definition that your program can identify so you are mapping just one time for each group of controls eg.. eq's, pads, volume etc... then loop over when compiling the .length of the groups. These would make the above possible
 

发表时间 Sun 30 Jun 13 @ 9:54 pm
beatbreaker1 wrote :
This is awesome!! Will there be a Mac version?


Mmm nopes, I dont develop anything for the mac, but perhaps we can figure out a way to host it on a VM or so.
 

发表时间 Mon 01 Jul 13 @ 2:02 am
synthet1c wrote :
does it come in monokai?


That are some funky pallets! Ill see what magic I can do.

synthet1c wrote :
Another thing you could do is use regular expression to count all the \? and \: in a conditional function to make sure both sides are balanced


Yeah I'll see what I can do, perhaps highlight the unclosed items.

synthet1c wrote :
Also can you add compiler variables. It would be easier if you could just do a script once with a variable placeholder.


That seems to be a powerful idea!
 

发表时间 Mon 01 Jul 13 @ 2:11 am
synthet1c wrote :
I was just thinking about this a little more... It would be cool if you could read the deck attribute and push that into the script at compile time, it may also be a good idea to add a grouping attribute to the definition that your program can identify so you are mapping just one time for each group of controls eg.. eq's, pads, volume etc... then loop over when compiling the .length of the groups. These would make the above possible


Hehe, lets finish the first version :P than more! Happy it at least sounds useful!
 

发表时间 Mon 01 Jul 13 @ 2:24 am
Its getting there!



Working on the undo and saving. When that's done ill pm you guys to play around with it.
 

发表时间 Mon 01 Jul 13 @ 1:26 pm
whoops
 

发表时间 Mon 01 Jul 13 @ 10:00 pm
can you make the user variables global to all pages? that way you could define them and easily share them across your whole mapping.

love the color scheme! ;-)

Also if you are going to update the XML file directly from your program you will need to replace all the special characters in the compiled strings

['&', ''', '&qout;']
 

发表时间 Mon 01 Jul 13 @ 10:12 pm
synthet1c wrote :
can you make the user variables global to all pages? that way you could define them and easily share them across your whole mapping.

love the color scheme! ;-)

Also if you are going to update the XML file directly from your program you will need to replace all the special characters in the compiled strings

['&', ''', '&qout;']


Yeah the variables are global to the application, so you can (re) use them in any script. And yes it will save the xml back in the right format :D
 

发表时间 Tue 02 Jul 13 @ 3:03 am
ChacklPRO InfinityMember since 2007
Well nice :D - i like it :D and I'll try it :D

Some time ago i posted a blocj in german language how to display the script better :D


Is it possible to make a "scriptdesigner" that i am able to use if i'm doing a new too? - I've planed something and it would need a "scriptdesigner" :D - would that be possible?

Regards
 

发表时间 Tue 02 Jul 13 @ 3:17 am
AdvokutPRO InfinityMember since 2010
might add me to the tester´s list

 

发表时间 Tue 02 Jul 13 @ 6:19 pm
903djPRO InfinityMember since 2012
I'd be interested in testing as well.
 

发表时间 Wed 03 Jul 13 @ 10:42 am
Hey Guys,

Links to the beta build will be send as PM. Usage on own risk ;P

Features:
- Definable global constants
- Readable code editor
- Three 'monokai' inspired colorscheme's
- Backup copy on each save

Getting started

1) Open a file: Menu -> File -> Open
2) Selecting a part to edit: Click in the tree view
3) Selecting a color scheme: Use the selectbox



Now.. lets set a global constant:

1) Fill in the constant in the form: @name=script



2) Press the save button next to the constants editor. This will save the variables and update the Readable code editor. Note that no changes are yet made to the eventual VDJ Script.



Now... lets update a global constant

1) Update the constant

2) Press the save button next to the constants editor. This will save the variables and update the Readable code editor. Note changes are now made to the VDJ Script, but not yet to the file



Finally... edit and save

1) Update the code in the Readable code editor
2) Press the save icon next to the editor. File mapper is now saved again. A backup of the original xml file will be made with the extension '.bku'

Good luck!

Of course I presume there will be some quirks, errors and possible performance issues so let me know!
 

发表时间 Thu 04 Jul 13 @ 1:18 pm
love it JB, It's great that it reads, updates and backs up the existing mapper, but I have found a bug in regard to the constants... It wont read a new line so the scripts need to be on a single line. Is there any way to have the constants span multiple lines, like by wrapping it with quotes or another special charcter?

It would also be cool if we could resize the constants window and use constants within other constants.

I will have a proper play with it tomorrow.
 

发表时间 Thu 04 Jul 13 @ 2:38 pm
synthet1c wrote :
but I have found a bug in regard to the constants... It wont read a new line so the scripts need to be on a single line. Is there any way to have the constants span multiple lines, like by wrapping it with quotes or another special charcter?

It would also be cool if we could resize the constants window and use constants within other constants.


Glad you like it!

Right now the constant list is a name value pair on a single line, but with a little work I can get that done, as well with using constants in constants. The resizable bit should also not the biggest problem.
 

发表时间 Thu 04 Jul 13 @ 2:59 pm
awesome! I wish I knew C++ so I could help you out
 

发表时间 Thu 04 Jul 13 @ 3:07 pm
synthet1c wrote :
awesome! I wish I knew C++ so I could help you out


Its old fashioned Delphi :P Easy :P
 

发表时间 Thu 04 Jul 13 @ 3:17 pm
IMPORTANT: Updated version in download, please redownload!
 

发表时间 Thu 04 Jul 13 @ 6:21 pm
67%