• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
InDesign jumping to forground
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

InDesign jumping to forground


  • Subject: InDesign jumping to forground
  • From: Wayne Melrose <email@hidden>
  • Date: Thu, 12 Jul 2012 08:39:23 +1000

Hi all, 

I have a script that opens InDesign documents and exports them to PDF. 

I have a few users that are using this script. The idea is that InDesign runs in the background and allows the user to keep working in other programs. This works fine for most users, however there are some where InDesign jumps to the foreground when it opens each document.

I turn off user interaction as I start, and turn it back on when I finish, however it still doesn't seem to solve the issue. I've also attempted to 'hide' InDesign with system events, on those computers I'm having trouble on, it still happens. 

I have ALSO tried turning the InDesign window off, also no help. 

Anyone got any thoughts? 

Here's a simplified version of the script. 

(InDesign CS5 and Snow Leopard)



set strFolderPath to (choose folder with prompt "Choose InDesign documents folder") as string

set strOutputFolder to choose folder with prompt "Choose PDF export folder"

set lstSelectedFiles to paragraphs of (do shell script "ls " & (quoted form of (POSIX path of (strFolderPath))))


setUserInteration(false)

tell application "System Events"
set visible of process "Adobe InDesign CS5" to false
end tell

set intIndex to 0
repeat with strFilepath in lstSelectedFiles
set intIndex to intIndex + 1
set strCurrentFilePathHFS to (strFolderPath & (strFilepath as string) as string)


tell application "Adobe InDesign CS5"


open strCurrentFilePathHFS without showing window
export document 1 format PDF type to ((strOutputFolder & intIndex & ".pdf") as string) without showing options
close front document saving no
end tell


end repeat

setUserInteration(true)




on setUserInteration(blnUserInteraction)
tell application "Adobe InDesign CS5.5"
tell script preferences
if blnUserInteraction then
set user interaction level to interact with all
else
set user interaction level to never interact
end if
end tell
end tell
end setUserInteration



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: POSIX Puzzle
  • Next by Date: Re:
  • Previous by thread: Re: Satimage OSAX 64-bit compatible?
  • Next by thread: RE: InDesign jumping to forground
  • Index(es):
    • Date
    • Thread