opening a pdf file

Alex Clay aclay at mac.com
Tue Aug 28 21:38:39 EDT 2018


I think Launch Program will work fine. If I were going to script it, I would use $root.$runapplescript with do shell command and invoke the macOS "open" command. It's quite versatile.

Open terminal and run "man open" to get documentation on this command.

Alex

> On Aug 28, 2018, at 17:19, Plum Hollow Software <plum_hollow at cogeco.ca> wrote:
> 
> Moving forward, should I use launch program or use applescript?
> 
>> On Aug 28, 2018, at 5:15 PM, Michael Matthews via omnisdev-en <omnisdev-en at lists.omnis-dev.com> wrote:
>> 
>> It should use whatever you have set your Mac to use.  The default is for Preview to open PDF docs, but you could override it.
>> 
>> Mike
>> 
>> 
>> 
>>> On 28 Aug 2018, at 22:13, Plum Hollow Software <plum_hollow at cogeco.ca> wrote:
>>> 
>>>> pcFilePath is the path to file to open - path to the file is not the application but let say a .pdf?
>>> 
>>> Does launch program just look at the .extension to determine what app to open?
>>> 
>>>> On Aug 28, 2018, at 11:13 AM, Alex Clay via omnisdev-en <omnisdev-en at lists.omnis-dev.com> wrote:
>>>> 
>>>> Hi Randy,
>>>> 
>>>> On macOS, we use this command to open files using the default application:
>>>> 
>>>> 	Launch program ,[pcFilePath] (Do not quit Omnis)
>>>> 
>>>> pcFilePath is the path to file to open.
>>>> 
>>>> This works just fine in 8.1.x.
>>>> 
>>>> Alex
>>>> 
>>>> 
>>>>> On Aug 28, 2018, at 11:07, Plum Hollow Software <plum_hollow at cogeco.ca> wrote:
>>>>> 
>>>>> Hi List,
>>>>> 
>>>>> In Omnis Studio 5.1I could open a pdf from a list using the follow code:
>>>>> 
>>>>> 	Set event recipient {FINDER}
>>>>> 	Send core event Open Documents (pRow.iPDF_Path)
>>>>> 	Send core event Open Documents (pRow.c2)
>>>>> 
>>>>> But in Studio 8.1 I get this:
>>>>> 
>>>>> 	Set event recipient OBSOLETE COMMAND {FINDER}
>>>>> 	Send core event OBSOLETE COMMAND Open Documents (pRow.iPDF_Path)
>>>>> 	Send core event OBSOLETE COMMAND Open Documents (pRow.c2)
>>>>> 
>>>>> What would be the equivalent to replace this.
>>>>> 
>>>>> Thanks,
>>>>> 
>>>>> Randy
>>>>> 
>>>>> _____________________________________________________________
>>>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>>>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
>>>> 
>>>> _____________________________________________________________
>>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
>>> 
>>> _____________________________________________________________
>>> Manage your list subscriptions at http://lists.omnis-dev.com
>>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
>> 
>> 
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
> 
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 




More information about the omnisdev-en mailing list