Solved: tsNetPost not working for me

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
raugert
Posts: 112
Joined: Thu May 26, 2016 9:30 pm
Location: Winnipeg, Canada

Solved: tsNetPost not working for me

Post by raugert » Sun Apr 22, 2018 12:40 am

I can post the following to vMIx server and it works good:

Code: Select all

post "Function=CutDirect&Input=1" to url "http://192.168.100.129:8088/API/"
but if I try to use "tsNetPost" to do asynchronous posts, I can't get it to send the command...

Code: Select all

put tsNetPost("1", "http://192.168.100.129:8088/API/", ,"Function=CutDirect&Input=1", "function complete") into tResult
I'm missing something :? Using LC Indy 9.0
Last edited by raugert on Mon Apr 23, 2018 5:48 am, edited 1 time in total.
Livecode Indy 9.6.11 (Stable)
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7215
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: tsNetPost not working for me

Post by jacque » Sun Apr 22, 2018 8:17 pm

This may help:
http://lessons.livecode.com/m/4071/l/69 ... -callbacks

There are a number of other lessons about tsNet in the side panel.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

raugert
Posts: 112
Joined: Thu May 26, 2016 9:30 pm
Location: Winnipeg, Canada

Re: tsNetPost not working for me

Post by raugert » Mon Apr 23, 2018 5:47 am

thanks Jacque,

After carefully reading the lessons and a lot of experimenting, I finally got it to work. I discovered that I had to initialize "tsNetInit". I guess I missed that somewhere in the lessons :wink:

I also found that I must close the connection "tsNetCloseConn "1" after every call, otherwise I kept getting errors.

After many hours of trying things, I got it to work ! It sure is nice to have asynchronous posts..

thanks,
Richard
Livecode Indy 9.6.11 (Stable)
MacOS Sonoma 14.2
Xcode 15.0.1 SDK 17.0

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”