1 Reply Latest reply on Mar 3, 2016 10:39 AM by mikebeargie

    Mac OS Preview Window focus on exported files




      I have pdf files contained in container fields. To view these I have a script that exports the files and launches a pdf reader (see below)


      Set Variable [ $file_name; Value:Substitute((GetAsText(fichiers et divers 2::FC_fichiers_container)); "remote:"; "") ]

      If [ Get ( SystemPlatform ) = -2 ]


      Set Variable [ $path; Value:"filewin:" & Get ( TemporaryPath ) & $file_name ] Else


      Set Variable [ $path; Value:Get ( TemporaryPath ) & $file_name ] End If

      #on exporte le fichier vers le dossier temporaire

      Export Field Contents [ fichiers et divers 2::FC_fichiers_container; “$path” ]

      #importing again the file in a generic container field

      Go to Layout [ “BGR_File_Viewer” (BGR__BoutonsGraphiques) ]

      Insert File [ BGR__BoutonsGraphiques::DW_global_container; “$path” ]

      #activating the container field launches pdf reader ("Preview" on  a macintosh)

      Go to Field [ BGR__BoutonsGraphiques::DW_global_container ] [ Select/perform ]


      Since Filemaker 14, the window of "Preview" was staying in front of the interface (see video opening_FM13), but now since Filemaker 14, the window disappears behind the Filemaker interface. It does this even if I close the "Preview" app between opening files.


      This is on Mac OS X El Capitan 10.11.3


      - Is this a normal behavior or should I report this as an issue ?


      - Is there a workaround ?


      Thanks in advance for your help