Page 1 of 1

planning on starting with LiveCode

Posted: Tue Feb 14, 2012 2:37 pm
by ivaho
Hi,

I'am quite new to programming and want to make a start in it.

I'am trying to develop a custom user interface for an server program named CasparCG.

For this I need to be able to connect to the server program.
In C# this looks something like see attachment


Is this also possible in LiveCode?

Thanks for your help and replies.


Ivo


attachment didn't work-- and I can't seem to paste some c# code here

private void Button_connect_Click(object sender, EventArgs e)


caspar_.Settings.Hostname = this.tbCasparServer.Text;

Re: planning on starting with LiveCode

Posted: Wed Feb 15, 2012 3:16 am
by Mark
Hi Ivo,

The code you post doesn't make much sense. It is similar to "on mouseUp theBtn" and "put someVar into someOtherVar". You need to figure out the protocol of the server. For example, is it possible to connect to it with a web browser using http or can you use telnet or does it have its own protocol? If you can find a little more information about this then we might be able to help you get started.

Kind regards,

Mark

Re: planning on starting with LiveCode

Posted: Wed Feb 15, 2012 4:27 am
by sturgis
Did a quick test using casparCG server. Based on the config file, the default port is 5250, so I did a "open socket "localhost:5250" once the casparcg server was running. Connection was made successfully, so I added some code to send lines and then read the output. I'm NOT a socket programmer type so you'll have to learn more about error catching and that sort of thing, but if you grab the stack here. http://dl.dropbox.com/u/11957935/Simple ... t.livecode it might get you started. Its just a log field, a connect button and a field to send a line.

After testing, if you send
"info"
the response is
200 INFO OK
1 PAL PLAYING

Sending
"stop 1"
the response is
202 STOP OK

I don't understand enough about the workings of casparcg server to go much beyond this but hopefully this will get you started.

Re: planning on starting with LiveCode

Posted: Wed Feb 15, 2012 10:24 am
by ivaho
Hi Sturgis,

Thanks for your help. This whas what I was looking for. "opensocket"

Helped me alot.

Many thanks.

Re: planning on starting with LiveCode

Posted: Wed Feb 15, 2012 12:49 pm
by Klaus
Hi Ivo (dobar dan?)

please check these stack to get an overview about what LiveCode can do and how it can be done:
http://www.runrev.com/developers/lesson ... nferences/

And welcome to the forum! :D


Best

Klaus

Re: planning on starting with LiveCode

Posted: Wed Feb 15, 2012 3:01 pm
by DangerousThing
ivaho wrote:Hi,

I'am quite new to programming and want to make a start in it.

I'am trying to develop a custom user interface for an server program named CasparCG.
Yes, this is possible in LiveCode. The protocol for CasparCG looks text-based, so it should be fairly easy.

The definition for the various versions of the protocol are on the CasparCG wiki. I'd post the link, but my account won't let me do this. I found in off the first page, however.

I'm also quite new to LiveCode, though I did quite a bit of programming in HyperCard *many* years ago. However, I've done a lot of client/server programming and it's not very difficult (for the most part).
-
D. Jay Newman

Re: planning on starting with LiveCode

Posted: Wed Feb 15, 2012 8:26 pm
by ivaho
Hi,

Thanks for your reply, I found the protocol of CasparCG and think I can get most things to work.

Just figure some things out but it looks like i should manage

Re: planning on starting with LiveCode

Posted: Mon Mar 18, 2013 8:39 pm
by flenoir
i tried yout code and it worked nicely.

i'm now wondering how i can list a folder on a shared folder over my network

is there a special command ?

thanks for your reply

Re: planning on starting with LiveCode

Posted: Wed Jul 16, 2014 7:49 pm
by Da_Elf
Ive used livecode to build a nice interface and all has been well. Until someone asked me if i would be able to port my interface to a mac. The casparCG server would be running on the PC but the livecode program would be sending commands from the mac. No longer could i use "localhost" so i looked up my ip address for the pc and plugged it in. I then exported the stand alone to the pc and tested using ip address rather than localhost. All worked well. But then i created the mac app and ran on the mac (which is on the same network) it couldnt connect to the casparCG server. Has anyone tried to so something like this and had success?

i also wanted to get livecode to control my blackmagic ATEM mixer but their SDK is c++ and it quickly gave me a headache so i gave up lol