Page 1 of 1

Which option for writing scripts to control FS from events

Posted: August 9th, 2013, 8:36 am
by lindsayward
Hi there!
I've asked a couple of questions recently about things I want to do that FS can't do on its own (see below).

I see things like LuaFS (last modified 2 years ago), SendMessage, C# communication classes and things...

Which of these would be the best technology to use to modify/extend FreeStyler.
I need scripts to run in response to events in FreeStyler, or automatically (Windows).

Two things I want to be able to do are:

- Set 5 submasters to full intensity WHEN FreeStyler starts up. I've written a simple LuaFS script that does this, but I have to click the RUN button in LuaFS console. I want to be able to execute the script automatically - either in Windows or in FreeStyler.

- I want to be able to have a fader in FS that controls colour. I could write a script that takes a number (the fader value) and sets the colour of the selected fixture(s), but I don't know if it's possible to have a fader and if I could, how to get the value of it into LuaFS.

Can you let me know if these things are possible, and which programming option is the way to go?
I am fine with any programming language.

Thank you!

Lindsay

Re: Which option for writing scripts to control FS from even

Posted: August 9th, 2013, 10:04 pm
by Mattotone
Depends what you can do.
c#
vb.net
python
luaFS

c# or vb.net is probably the best bet, as you can create a gui very easily.

Re: Which option for writing scripts to control FS from even

Posted: August 10th, 2013, 7:30 am
by lindsayward
Hi Mattotone, thanks for the answer. As I said at the end of my post, I'm fine with any language. In order, the languages I know best are Python (what option is available for Python?), C#, Lua, VB. So that isn't what matters - it's what will let me do what I want.
E.g. How do I respond to events like startup and moving a fader in FreeStyler. I do not want to create a separate GUI, I just want to respond to the existing one.
I looked at the API for LuaFS and they are all one-directional commands - sending data TO FS. I want to see events and get input FROM FS as well.

Re: Which option for writing scripts to control FS from even

Posted: August 10th, 2013, 7:40 pm
by Mattotone
all the languages have the same set of cammands, Freestyler can only be communicated to via send-message or tcp/ip.
Theres no real api to interact with events etc at present.

Matt

Re: Which option for writing scripts to control FS from even

Posted: August 13th, 2013, 12:48 am
by lindsayward
Thanks - that's probably mostly what I needed to know - that you can't respond to events IN FreeStyler.
So I need something I can get Windows to run at the right time (perhaps with a delay until FreeStyler should be funning).

I asked the LuaFS developer about his project and he wrote:
"LuaFS is an old project and now i don't have enough time for continue with it. I'm sorry.
I hope continue with this project in the future.
thanks, Juanjo"

Can you please let me know what is available for Python, and how I would go about starting?
I've seen the SendMessage PDF and it's a reference of SendMessage commands, but doesn't say anything about how to start (basic tutorial). (I can't just call FindWindow(...) from a Python/C# script...) Once I'm started, I could use the commands.

Thanks!

Re: Which option for writing scripts to control FS from even

Posted: August 13th, 2013, 5:31 am
by lindsayward
OK... I downloaded Mattotone's Visual Studio project (viewtopic.php?f=38&t=2184#p22186) and wrote a simple C# console application that does what I want (set submasters to full on startup). I thought I'd post it in the thread where I first asked about this particular task: viewtopic.php?f=6&t=5350&p=22273#p22273

I'm still interested more in the development options including Python (if I search for "Python" on this forum, there is no mention of talking to FS with it) and Java (also no mention)?
Can you tell me more about the dll? Where did that come from? Is it just the Communicator class from that thread compiled?

Re: Which option for writing scripts to control FS from even

Posted: August 13th, 2013, 8:54 am
by Mattotone
The python example is near the top of this topic, and communicates via tcp/ip.
The Dll is just a compiled version of my class for other languages to use i.e VB.net.

You could make your application launch fs and keep checking until FS is started then apply your startup values.

Re: Which option for writing scripts to control FS from even

Posted: August 14th, 2013, 4:07 pm
by lindsayward
It worked fine on my test machine, which has Visual Studio, but when I copy the release .exe file to my Windows XP machine where I use FS, it said it was not a valid Win32 app. I tried it also on a Windows 7 (64-bit) laptop and it said it needed .NET 4.5.

Is there a way to make this work on the XP machine? Do I need to recompile the dll for such a machine?
Thanks.

Re: Which option for writing scripts to control FS from even

Posted: August 14th, 2013, 6:32 pm
by Mattotone
check what minimum framework you have selected. .net4.5 is windows 7 plus. the dll if I remember rightly has been tested on xp. if not the class file is available on her to compile for xp

Re: Which option for writing scripts to control FS from even

Posted: September 7th, 2013, 9:43 am
by ikki_123
I also want to know??

Re: Which option for writing scripts to control FS from even

Posted: September 8th, 2013, 8:46 am
by Mattotone
I trust all the necessary answers are in this thread as it stands.

dll xp. yes compile from source in 32bit ensure you have correct .net framework.

best language. I prefer c#

events api. no