planning on starting with LiveCode

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
ivaho
Posts: 37
Joined: Tue Feb 14, 2012 2:19 pm

planning on starting with LiveCode

Post by ivaho » Tue Feb 14, 2012 2:37 pm

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;

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: planning on starting with LiveCode

Post by Mark » Wed Feb 15, 2012 3:16 am

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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: planning on starting with LiveCode

Post by sturgis » Wed Feb 15, 2012 4:27 am

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.

ivaho
Posts: 37
Joined: Tue Feb 14, 2012 2:19 pm

Re: planning on starting with LiveCode

Post by ivaho » Wed Feb 15, 2012 10:24 am

Hi Sturgis,

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

Helped me alot.

Many thanks.

Klaus
Posts: 14198
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: planning on starting with LiveCode

Post by Klaus » Wed Feb 15, 2012 12:49 pm

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

DangerousThing
Posts: 8
Joined: Tue Feb 14, 2012 4:55 pm

Re: planning on starting with LiveCode

Post by DangerousThing » Wed Feb 15, 2012 3:01 pm

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

ivaho
Posts: 37
Joined: Tue Feb 14, 2012 2:19 pm

Re: planning on starting with LiveCode

Post by ivaho » Wed Feb 15, 2012 8:26 pm

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

flenoir
Posts: 1
Joined: Mon Mar 18, 2013 8:36 pm

Re: planning on starting with LiveCode

Post by flenoir » Mon Mar 18, 2013 8:39 pm

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

Da_Elf
Posts: 311
Joined: Sun Apr 27, 2014 2:45 am

Re: planning on starting with LiveCode

Post by Da_Elf » Wed Jul 16, 2014 7:49 pm

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

Post Reply