How to access a file on a remote computer

Peter Haworth pete at lcsql.com
Mon Jan 19 19:01:42 EST 2015


Hi Jacque,
I read the link and I think whey talk about "iTunes controllers", they mean
apps that communicate directly with iTunes, not sure what happens if you
run an Applescript to do that.

The program I've written doesn't communicate with iTunes at all.  It gets
all the music information by parsing the iTunes Library.xml file and then
doesn't touch anything else, other than play the files of course.

I've run it now as  a standalone on OSX 10.7, OSX 10.9, and OSX 10.10 and
it seems to work fine on all of them so I guess I'm not breaking any
sandbox rules.  I know there are some very knowledgeable people on the list
when it comes to sandboxing so maybe they will comment.

I should say, this isn't something I was planning on selling or even
distributing although I might offer it as a freebie on my web site since
it's worked out pretty well.

I started it as an exercise in using the Livecode player control but, as
these "quick" projects do, it rapidly developed into learning more than I
really wanted to deal with on remote file accessing, unicode, and a few
other things.  But I guess that will all be good knowledge for the future.

Anyway, thanks again to all the advice from everyone. It all contributed to
figuring out how to solve the issue.

Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>

On Mon, Jan 19, 2015 at 1:49 PM, J. Landman Gay <jacque at hyperactivesw.com>
wrote:

> If it works then my answer doesn't apply. But I got curious and did some
> research on the OS X sandbox. Most of what I found was old info but there's
> a reasonably readable explanation here:
>
> <http://www.cultofmac.com/113977/os-x-lion-sandboxing-
> is-a-killjoy-destined-to-ruin-our-mac-experience/>
>
> Which mentions iTunes controllers:
>
> "As pointed out by MacRumors, there are other apps that will be negatively
> impacted by sandboxing:
>
> • iTunes controllers (Tagalicious, CoverSutra)"
>
> But apparently you've got it working. I'm not sure about LC 7 file paths,
> haven't gone there yet.
>
>
> On 1/19/2015 3:26 PM, Peter Haworth wrote:
>
>> Hi Jacque,
>>
>> Using the "/Volumes" way of opening the file worked!
>>
>> I ran into one issue - some of the filenames have unicode characters in
>> them.  I searched the list and found this solution from Bjornke:
>>
>> put unidecode(uniencode(tVar,"UTF8")) into tFilename
>>
>> That makes things work whether the file name has unicode characters in it
>> or not.
>>
>> This, of course, is using pre-7.0 technology.  Ou of interest, if I used
>> 7.0 how would I set about translating a string with unicode characters in
>> it into a form acceptable as an OSX filename?
>>
>> In answer to your thought about sandboxing, I'm doing exactly the same as
>> iTunes - accessing music files in the ~/Music/iTunes folder so I assume
>> they would be within the app's sandbox.
>>
>>
>> Pete
>> lcSQL Software <http://www.lcsql.com>
>> Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
>> SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>
>>
>> On Mon, Jan 19, 2015 at 11:50 AM, Peter Haworth <pete at lcsql.com> wrote:
>>
>>  Right, yes I did try that and all works fine using the contents of the it
>>> variable that comes back. It uses the "/Volumes" format for the mounted
>>> folder/file.
>>>
>>> Problem is though that I already have the location of the file I want to
>>> play (but in "file://" URL format so don't want to prompt for it.
>>>
>>> Maybe I can get this working by somehow transposing the "file://" format
>>> file URL I already have into a "/Volumes" format.  I'll give that a try
>>> and
>>> report back.
>>>
>>> Pete
>>> lcSQL Software <http://www.lcsql.com>
>>> Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
>>> SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>
>>>
>>> On Mon, Jan 19, 2015 at 11:23 AM, J. Landman Gay <
>>> jacque at hyperactivesw.com
>>>
>>>> wrote:
>>>>
>>>
>>>  On January 19, 2015 1:14:04 PM CST, Peter Haworth <pete at lcsql.com>
>>>> wrote:
>>>>
>>>>> Thanks for all the suggestions.  Still trying to get this working.
>>>>>
>>>>
>>>>
>>>> I can't remember if you tried this yet but what happens if you do an
>>>> "answer file" dialog and use the file path that comes back?
>>>> --
>>>> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
>>>> HyperActive Software           |     http://www.hyperactivesw.com
>>>>
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>
>>>>
>>>
>>>  _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
>
> --
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list