Interacting Standalones?

Using Standalone Maker to build executables or delivering projects for use with the SuperCard Player? Discuss it here.

Interacting Standalones?

Postby drpitcairn » Fri Oct 03, 2014 4:42 pm

I have asked about this before but still don't have understanding about it. If one standalone can create new cards within it, to save user data that is wanted as a record, is it possible for a second standalone to access the first one and copy over these cards to it? I assume that it involves getting the pathway both directions and likely uses the "open" command though the LG does not really say that "open" can act on a standalone.
Can anyone help me understand if this is possible?

Thanks,
— Richard
User avatar
drpitcairn
 
Posts: 1023
Joined: Thu Apr 02, 2009 9:39 am
Location: Sedona, Arizona

Re: Interacting Standalones?

Postby drpitcairn » Fri Oct 03, 2014 8:19 pm

On further study I see the word to use is "launch" rather than "open" to get the app to open. I am able to get that much to happen from within a project, but then there does not seem to be any control over the open app. Just the way it is? Or some way to manipulate that app from within the project?
User avatar
drpitcairn
 
Posts: 1023
Joined: Thu Apr 02, 2009 9:39 am
Location: Sedona, Arizona

Re: Interacting Standalones?

Postby Scott » Mon Oct 06, 2014 9:43 am

This is a complicated topic. Obviously each standalone contains a project. Standalone 'A' could open the project in standalone 'B' to access its data, but if standalone 'B' has been launched, you end up with a project file that has been open with two copies of the runtime simultaneously (which is a recipe for disaster).

The preferred method for doing this is to have standalone 'A' send an AppleEvent to standalone 'B', and have an AppleEvent handler in standalone 'B' to return the information you are looking for in a reply.
User avatar
Scott
Site Admin
 
Posts: 1217
Joined: Sat Jul 05, 2008 1:37 pm
Location: Northern Sierra Nevada

Re: Interacting Standalones?

Postby drpitcairn » Mon Oct 06, 2014 5:17 pm

Does it make any difference that the standalones will have different names and version numbers? What I have set up so far is using the script you gave me for copying the card objects and then pasting into a new card. I made one button that will do the copy to clipboard, then manually shift to the other app, and there us another button that does the new card and pasting. Awkward but I think it might work. Can one do better (easier, repeat loop) using Apple Events?

Thanks,
— Richard
User avatar
drpitcairn
 
Posts: 1023
Joined: Thu Apr 02, 2009 9:39 am
Location: Sedona, Arizona

Re: Interacting Standalones?

Postby Scott » Tue Oct 07, 2014 8:12 am

drpitcairn wrote:Does it make any difference that the standalones will have different names and version numbers?

Nope

What I have set up so far is using the script you gave me for copying the card objects and then pasting into a new card. I made one button that will do the copy to clipboard, then manually shift to the other app, and there us another button that does the new card and pasting. Awkward but I think it might work.

It'll work, but you'll be wiping out the user's clipboard. Some may find that annoying.
User avatar
Scott
Site Admin
 
Posts: 1217
Joined: Sat Jul 05, 2008 1:37 pm
Location: Northern Sierra Nevada


Return to Building Standalones

Who is online

Users browsing this forum: No registered users and 1 guest

cron