Launch with specific app?

HI,
I need to open a .png file in the Preview.app, as opposed to the default app (photoshop).

I have looked in the language reference, but it has no example of defining the app to open the file in.

Can anyone help.

Thank you all in advance.

You need declares or MBS. I’ve since lost the declare, but here’s the MBS solution:

var tfPNG as FolderItem = // Your png folder item

  if NSWorkspaceMBS.openURL(tfPNG.URLPath, "com.apple.Preview") then
    // Success!
  
  end
3 Likes

Another option is using AppleScript from the Xojo code to open a file in a particular application.

Another option is to simply change the default app of .png files to preview.