iPad reading data from directory and Controlling desktop App

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
inatrice
Posts: 8
Joined: Sun Dec 08, 2013 2:46 pm

iPad reading data from directory and Controlling desktop App

Post by inatrice » Wed May 21, 2014 9:18 pm

Hi All,

I've had a little play with LiveCode and it looks great, but I was wondering (and I realise this may be me running before I can walk, but it's normally the way I learn best :-) ) if it is possible to do something like this.

But first a bit of background:

I currently have a quiz which runs in, for all intents and purposes in Flash (Written using a program called SWiSH). The set-up is as follows;

I normally have a router setting up a basic network, and 2 pcs (well a Mac and a PC) to run the quiz
The Mac displays the quiz and reads the questions, images, video and sound files it requires from a shared directory. It also gets the "live" scores from here - a plain text file written by the 2nd computer.
The PC runs a LibertyBasic program I wrote many, many years ago which stores team names and then the scores for each team etc. which it writes to a text file in the shared directory as mentioned above. (I don't have access to the program anymore, so can't make any amendments etc.)

Now I am sure that I could get LiveCode to replace both those machines - i.e. an app to run a quiz, and an app for inputting scores etc.

But my questions are:

1. Would I need to write 2 apps - 1 to play the quiz and another to sort out teams and their scores, or could one instance of an app, which had 2 branches i.e. Quiz and Scores be possible? (I am guessing 2 separate apps would be safer, but thought I would ask.)
2. (and here's my pipe dream) Could I get my iPad to access the text files so that it could display the relevant question on my iPad rather than me reading the screen and
3. Could I have a button on the iPad that advanced the quiz, or started a timer for the question - i.e. could an iPad app control a desktop app either directly, or by means of saving a file with a 1 instead of a 0 for example, or am I just asking too much?
4. Does any of this make sense? :?

(actually, my real pipe dream would be to supply teams with iPads or similar that they could answer from, and therefore automate all the scoring etc. But I'll stick with the "easy" stuff for now lol)
I thought I would try and find the answers out now, before I got too far into writing the app.

All help and advice gratefully appreciated.

Wayne

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: iPad reading data from directory and Controlling desktop

Post by Simon » Wed May 21, 2014 11:49 pm

Hi Wayne,
Let me see if I understand the problem.
There is 1 app (app1) that displays things and a second app (app2) that tells app1 what to display.
app2 is receiving "live" info from users?
app1 and app2 communicate via a text file.

Are you willing to re-write the LibertyBasic app?

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

inatrice
Posts: 8
Joined: Sun Dec 08, 2013 2:46 pm

Re: iPad reading data from directory and Controlling desktop

Post by inatrice » Thu May 22, 2014 10:48 pm

Hi Simon,

sorry I didn't explain myself that well.

Initially my question is this. Is it possible, using LiveCode, for an iPad app to affect an app running on a desktop.

For example:
Desktop - running a quiz program (written in LivveCode), displayed on a screen / projector.

iPad app - this would hopefully show the same question as is on screen, and have a button that, when pressed, would advance to the next question or start a timer, on the desktop app. Users, would not have any access to the iPad app, it would be used by the presenter.

The Liberty Basic app does not come into this part of the equation.

Apologies, by giving the overall view, I think I confused the issue! DOH!

Thanks again for your help, and I hope this now makes sense.

Wayne.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: iPad reading data from directory and Controlling desktop

Post by Simon » Thu May 22, 2014 11:38 pm

Hi Wayne,
Yes, this can be done in LiveCode. But not through wifi or bluetooth (yet).
I'm thinking a chat program (using sockets, this would be a primer).
http://livecodeshare.runrev.com/
Search on "chat"
You would have to test to see if the response time was fast enough for you.

I think you'd make up keywords for things that are not text e.g. [image]myPic.jpg[/image]. All text could be pre-written

Well, I'll let you decide if you think this is a possible method.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

inatrice
Posts: 8
Joined: Sun Dec 08, 2013 2:46 pm

Re: iPad reading data from directory and Controlling desktop

Post by inatrice » Fri May 23, 2014 6:50 am

Thanks Simon,

I'll have a look at that.

Much Appreciated
Wayne

Post Reply