Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

AppleEvent with SuperCard Player 4.81 as the target application

34 views
Skip to first unread message

andre.tremblay

unread,
Jan 21, 2019, 9:43:08 PM1/21/19
to SuperCard Discussion
Hello, 

I wonder if I am doing something wrong or if this is an issue with SuperCard Player?

I have downloaded and installed successfully the SuperCard Suite 4.81 beta from the forum.

Previously, before the serial number enforcement, I was able to send and receive AppleEvents with SuperCard 4.81 to SuperCard 4.81 as the target application. 

I was also able to send and receive AppleEvents with AppleScript Script Editor to SuperCard 4.81 as the target application.

With Mark's help I was able to adapt the SC project to launch normally with SuperCard Player 4.81. 

The issue is that now when I use SuperCard Player 4.81 as the target application, if with not resolve the AppleEvent request

More specifically, when the target application is SuperCard Player used address is a variation of <eppc:///SuperCard Player>.

And the command is : 

request CommandAE from program TargetApp

The returned result is “Program not found.”

But when I do : 

get appleScript(merge("tell application `[[TargetApp]]` to evaluate `[[CommandAE]]`"))

I am getting the expected result. 

It is also working well with AppleScript scripts running with the AppleScript Editor. 

Any idea of what might cause this malfunction?

Thank you for your help! 

Regards

André Tremblay
PhotoGraphex
403 Saint-Claude
Montreal Qc Canada
H2Y 3B6




codegreen

unread,
Jan 22, 2019, 4:50:49 PM1/22/19
to SuperCard Discussion
My guess is your problem stems from the fact that "SuperCard Player" has a space in it.

However you're constructing the address in TargetApp, try adding one final step:

  put replace(TargetApp, space, "%20") into TargetApp
 
-Mark

andre.tremblay

unread,
Jan 22, 2019, 11:15:41 PM1/22/19
to SuperCard Discussion
Hello Mark, 
 
However you're constructing the address in TargetApp, try adding one final step:

  put replace(TargetApp, space, "%20") into TargetApp

You got it, obviously it's an URL, I should have a taught about this! 

Thank you so much!

André 

codegreen

unread,
Jan 22, 2019, 11:48:12 PM1/22/19
to SuperCard Discussion
I've just updated things so that henceforth if the address is returned in URL form (i.e., if the host has an IP address) it's also percent-escaped automatically.

While I was at it I also removed the legacy 255 character length limit.

Thanks!
-Mark

andre.tremblay

unread,
Jan 24, 2019, 9:17:22 PM1/24/19
to SuperCard Discussion


Le mardi 22 janvier 2019 23:48:12 UTC-5, codegreen a écrit :
I've just updated things so that henceforth if the address is returned in URL form (i.e., if the host has an IP address) it's also percent-escaped automatically.

That's a very good improvement, thank you Mark!

BTW, how can I determine the address(es) of other SuperCard or SuperCard Player app(s) active on the network?

André 

codegreen

unread,
Jan 24, 2019, 9:37:36 PM1/24/19
to SuperCard Discussion
Sadly Apple broke the ability to detect PPC-aware apps on remote hosts in the name of security way back at the beginning of OS X.

I managed to keep things limping along for another decade or so by back-engineering the underlying network protocols (which they hadda leave in place for a while for Classic compatibility), but eventually around Yosemite they ripped even that stuff out.

Unfortunately since then I haven't yet been able to come up with a robust generic workaround based on more modern network discovery APIs (though it might be possible to do this just for SuperCard apps and standalones, I hadn't really thought of that before!).

Anyway in the meantime I got nothin'... :-(

Perhaps there's still some way using AppleScript? I dunno 'cuz frankly I try to avoid AppleScript myself - it makes me grind my teeth (or worse).

-Mark

andre.tremblay

unread,
Jan 25, 2019, 10:13:59 PM1/25/19
to SuperCard Discussion

Sadly Apple broke the ability to detect PPC-aware apps on remote hosts in the name of security way back at the beginning of OS X.

I managed to keep things limping along for another decade or so by back-engineering the underlying network protocols (which they hadda leave in place for a while for Classic compatibility), but eventually around Yosemite they ripped even that stuff out.

Thank you Mark for reminding the issue! 

I may add that up to Yosemite I was able to transmit AppleEvents between HyperCard with Classic emulation under Tiger to applications running under Yosemite. That was really useful for me, this ability was broken with the El Capitan system update and with it, the Answer Program  command. 
 
Unfortunately since then I haven't yet been able to come up with a robust generic workaround based on more modern network discovery APIs (though it might be possible to do this just for SuperCard apps and standalones, I hadn't really thought of that before!). 

Anyway in the meantime I got nothin'... :-(

Well I was just wondering about your expertise, at this point I am only interested to list the running SuperCard, SuperCard Player of Standalone applications over the network. 

Another solution would be to have a hard coded list of potential applications and regularly trying to initiate communication to elaborate the active list of apps.

Perhaps there's still some way using AppleScript? I dunno 'cuz frankly I try to avoid AppleScript myself - it makes me grind my teeth (or worse).

I am going to give a look to it!

Also, if I may add, should it be possible to send AppleEvents between SuperCard application over the Internet? Maybe should it be the subject of a new topic?

André 
Reply all
Reply to author
Forward
0 new messages