Running scripts from Finder, and printing without a dialog

Two questions:
1. I need to launch an InDesign script from outside of InDesign -- such as launching the script from the finder (Mac) and having it run in InDesign. How can I do this?
2. How can I script printing a document so that it automatically prints, bypassing the Print dialog box that a user would need to click on (I want it to print automatically in the background without the user doing anything)?

1. Just save your script as an application and wrap your stuff in an "on run" statement.
on run
tell application "Adobe InDesign"
--do stuff
end
end
See the Applescript Language Reference at developer.apple.com/applescript for more info.
2. Yup. The "do stuff" in your case will probably look something like this:
tell active document
--Set up options, assumes you have created a printer preset
-- with the output options you want
set active printer preset of print preferences to "my printer preset"
set page range of print preferences to all pages
--And then print
print without print dialog
end

Similar Messages

  • Errors running scripts from Carl and Viska

    When uploading and running the following scripts I get the same error:
    http://htmldb.oracle.com/pls/otn/f?p=24317:136 from Viska's site file f24317.sql.
    http://htmldb.oracle.com/pls/otn/f?p=11933:22 from Carl's site file otn_examples_1_18_06.sql.
    The Error is:
    ORA-06502: PL/SQL: numeric or value error ORA-06512: at "SYS.OWA_UTIL", line 325 ORA-06512: at "SYS.HTP", line 1322 ORA-06512: at "SYS.HTP", line 1397 ORA-06512: at "SYS.HTP", line 1689 ORA-06512: at "FLOWS_020000.WWV_FLOW_SW_API", line 426 ORA-01006: bind variable does not exist
    In Viska's file the error is with the block that starts on line # 10934 with:
    declare
    s varchar2(32767) := null;
    l_clob clob;
    l_length number := 1;
    begin
    s:=s||'<!-- Dependencies -->'||chr(10)||
    In Carl's file the error is with the block that starts on line #399 with:
    declare
    p varchar2(32767) := null;
    l_clob clob;
    l_length number := 1;
    begin
    p:=p||'declare'||chr(10)||
    SINCE this is happening on both files I guess the problem is at my end but I don't have a clue how to debug it.
    Any help will be appreciated.
    Thanks,
    Linda

    Thanks Carl. It would sure save you guys a lot of time if there were one place to go for these directions.
    I'm now getting the following error on the bottom of my pages that use your template.
    if(GetCookie('MarvelQuickEdit') != null){ if(GetCookie('MarvelQuickEdit') == 'SHOW') quickLinks('S
    Also, when I try to add data to your random tables I get:
    error ORA-04098: trigger 'APEXDEMO.BI_RANDOM_DATA_CATEGORY' is invalid and failed re-validation
    AND
    error ORA-04098: trigger 'APEXDEMO.bi_RANDOMDATA' is invalid and failed re-validation
    Any ideas?
    Any clue on the login for vikas app?
    Linda

  • HT1222 hi i have a apple imac 27 2009 and i have purchased mountain lion but near the end it says An error occurred while running scripts from the package "mzps6175750011235388779.pkg"

    hi i have a apple imac 27 2009 and i have purchased mountain lion but near the end it says An error occurred while running scripts from the package “mzps6175750011235388779.pkg”
    can you please advise me what should i do to fix this

    Some ideas.
    https://discussions.apple.com/message/20034600#20034600

  • Problems downloading and installing OS X Yosemite An error occurred while running scripts from the package

    Hi! I have problems downloading and installing OS X Yosemite.
    While downloading this message pops up:
    An error occurred while running scripts from the package \U201cwct8079783343594854923.pkg\U201d.
    and in /var/log/install.log i can see:
    MacBook-Pro installd[1086]: PackageKit: Install Failed: PKG: pre-install scripts for "com.apple.pkg.InstallMacOSX"\nError Domain=PKInstallErrorDomain Code=112 UserInfo=0x100193c00 "An error occurred while running scripts from the package “wct8079783343594854923.pkg”." {\n    NSFilePath = preinstall;\n    NSLocalizedDescription = "An error occurred while running scripts from the package \U201cwct8079783343594854923.pkg\U201d.";\n    NSURL = "#InstallMacOSX.pkg -- file://localhost/Users/username/Library/Application%20Support/AppStore/91504108 2/wct8079783343594854923.pkg#Distribution";\n    PKInstallPackageIdentifier = "com.apple.pkg.InstallMacOSX";\n}
    does anyone have an idea about this?
    thank you very much

    Mucked up installation. If the installer app is still in /Applications, delete it and start over.
    27" i7 iMac (Mid 2011) refurb, OS X Yo (10.10.2), Mavs, ML & SL, G4 450 MP w/10.5 & 9.2.2

  • HT204408 Can I delete files in "All My Files" under Finder and Favorites without deleting them in the actual folders?  If they will be deleted from the original folders then how do I put them on the external hard drive to save the documents, photos, and v

    Can I delete files in "All My Files" under Finder and Favorites without deleting them in the actual folders?  If they will be deleted from the original folders then how do I put them on the external hard drive to save the documents, photos, and videos?

    Switch to the Finder app and open its preferences.
    Remove the check mark on the items you don't want displayed in the Sidebar tab.
    The originals are not removed from the machine.

  • Script Alert "You should only run scripts from a trusted source."

    I created a small javascript which opens Photoshop and resizes some images.
    I want to be able to double-click the .JSX file from Windows Explorer, and have Photoshop execute the script. Likewise, I want to be able to run the .JSX file from the command line.
    The script runs perfectly. However, the problem is that I don't want any user interaction. I want to be able to run the script from the command line without the user having to click anything. What happens now when I try to run the file from Windows Explorer of the command line is, I get a Script Alert with the following text:
    You are about to run a script in Adobe Photoshop CS3. You should only run scripts from a trusted source. Do you want to run the script? Yes/No
    Is there any possible way to bypass this message or to answer in the affirmative?
    Thanks,
    Jamie L.

    Hi... Sorry to revive such an old thread,
        Does anyone know the "trusted source" folder for MAC CS4.
    EDIT!
    My bad.  "The /users/<user_name>/documents/Adobe Scripts" folder is working for this purpose for me.  I needed a path to it and forgot that the ~ resolves to the current user.  Sweet.
    -Bill

  • An error occurred while running scripts from the package "mzm,stuhjljp.pkg".

    I hope someone can help, I have now tried downloading Lion OSx 4 times and I keep getting this message: An error occurred while running scripts from the package "mzm,stuhjljp.pkg".
    I go back to the app store and it kindly tells me it's installed. It's not quite simply it is nowhere to be found.
    Nice one Apple for moving away from those reliable discs and causing pain, wasted productivity and a **** of a lot of frustration. $29.99 to annnoy the **** out of me, thanks.
    Anyone have a solution that may be of assistance.

    Mj, I can't offer much help but you may be able to use this method to "find" Lion OS X in the App Store again.
    Hold down the "option" key while clicking on the App Store icon.  Keep holding down the option key, then click on the "Purchased" tab at the top of the page. 
    With any luck the button to the right of Lion OS X will now say "install."
    I'm having a similar problem reinstalling Lion, so don't be surprised if you try to reinstall and get the same error.
    Good luck,
    Contender

  • Issues in running scripts from OTM

    Hi ,
    I have created an endtoend scenario where the script starts from creating requistion, approval, PO creation approval , receipt creation then Invoice and payment.
    My script failing with different reason for different runs. Mailnly its failing whenever the steps are referrred to Standard Oracle Forms.(Eg: Invoice Batch, Receipt Form etc).
    I am running this from machine where Openscript and OTM is installed.
    I tried the command line arugment like " -delayPercentage -1 -delayMin 1 -delayMax 20 " while running the script from OTM. Still issue is same. If I am not using this commad the script steps deviates and failing. I mean in script the step is to choose some responsibility A it is choosing B. To override think times recorded I have used thread.sleep(2000) after every thinktime entry to run it from openscript.
    and to run it from OTM I am using above command.
    Now can anyone suggest me is anyother way that we can overcome these timeout errors. Am I using command line argument in correct way ? Please help

    Hi,
    First try your playback from OpenScript.
    Before play back go to View -> OpenScript Preferences -> PlayBack -> Oracle EBS/Forms Functional
    Increase timeouts in Event Timeout. Also Increase timeout in Web Functional (Object timeout)
    Then Apply and OK    
    Now try play back from OpenScript
    Regards,
    Deepu M
    [email protected]

  • To Fetch Data from GTS and print in R/3

    Hi,
      iam in need of help.
    the core is i have a print program in R/3.from R/3 i have to validate some field with SAPGTS.
    so that i have to apply a RFC call from R/3 ( print program ) to GTS and i have to fetch the data from GTS and print in R/3.
    help me out in finding the RFC.
    the print program is for VL02N

    Mohan:
    SAP and GTS are linked through a RFC destination and the RFC user ID is used to make the call. Once this is set up, you can call GTS through a Function Module call. The set up is normally done by BASIS team
    From the program /SAPSLL/SAPLCD_PI_R3 you can drill down to get details of the specific user-exit which you can use to call GTS tables for specific data.
    Let me know if this helps
    Siva

  • An error occurred while running scripts from the package "ztb343812063996219254.pkg

    i tried to upgrade my os lion 10.7.5 to os x yosemite on my macbook pro and in the middele of downloading I'm getting this notice: an error occurred while running scripts from the package "ztb343812063996219254.pkg
    help me please…..
    i think i have problem with the app store cause sometimes I'm getting more errors like error no 13 or 100
    what should i do?

  • Error when running script from OTM

    Hi team,
    Customer is trying to run script from OTM but is getting a "JWG file does not exist" error. I found the following metalink note and the customer has verified that the repositories are defined with exactly the same names & paths in OTM & Openscript.
    Scripts Failing To Play Back From OATS Test Manager (OTM) (Doc ID 1587941.1)
    I've also checked the following post in the forums but this doesn't apply to the customer because both the OTM & agent are on Windows:
    https://forums.oracle.com/message/10707963
    Appreciate any pointers
    Thanks,
    Krishna

    Hi Krishna
    Is the agent running as a windows service or started from an interactive batch?
    What kind of script is that? Web, Forms, Siebel, other?
    Are they different repositories or the same? If different, how do you copy scripts from one to the other one?
    Cheers
    JB

  • "An error occurred while running scripts from the package "DeveloperTools.pkg"

    I'm trying install my xcode 4.2 and check log and this where there is problem
    "An error occurred while running scripts from the package “DeveloperTools.pkg”

    II found the answer elsewhere. I logged in from a diffent admin acount and the install went fine.

  • HT4356 My iPad does not find the printer. I have tried the HP app and it works, but in any other app the printer is not seen. How do I get this printer visible to the iPad. All my other network computers find and print with out a problem.

    My iPad does not find the printer. I have tried the HP app and it works, but in any other app the printer is not seen. How do I get this printer visible to the iPad. All my other network computers find and print with out a problem.

    hi
    could you tell us what the other app is please

  • A Script to Find and Replace Layer Names

    Are there any scripts to find and replace layer names?
    There is an excellent script available for Photoshop which allows you to not only replace words in layer names, but also insert words as Prefixes, Suffixes and Sequential Numbers.
    The illustrator version of this script only allows sequential numbering: It doesn't offer find and replacing of words.
    Ideally, it would be great if there was something that could do multiple find and replaces in one go:
    (e.g.
    You have layers like this Car, Dog, Bat
    You enter: car(Option1), dog(Option2), Bat(Option3)
    Your layers then become: Option1, Option2, Option3).

    big_smile, that's a very good start! Step 1 of Learning How To Script is indeed, adjusting an existing simple script to make it do more complicated things. (And usually then "break something", which is also a required part of the process.)
    You are correct in your observation this is repetitive stuff. For one or two different items that wouldn't be a problem, but in longer lists you soon get lost.
    The usual way of working with find-change lists is to build an array:
    var layernames = [
    [ 'FHairBowlBoy *Hair', 'Hairboy1' ],
    [ 'FHairCurlyafroBoy *Hair', 'Hairboy2' ],
    [ 'FHairSpikyBoy *Hair', 'Hairboy3' ],
    The general idea is to loop over all names, check if the current layer name is "layernames[i][0]" (the left column) and if so, rename it to "layernames[i][1]" (the right column). If you know how to write a loop in Javascript, then you can implement this right away.
    However ..
    A more advanced way to do this doesn't even need loop to over all layernames -- instead you can immediately "get" the correct name per layer! It's magic! Almost!
    The trick is to use a Javascript object instead of an array. Javascript objects are nothing special; Illustrator's 'layers' is an array of objects, and each object "layer" has a property "name", whose value you can read and set. What I do here is create a new object, where the "name" part is the original layer name and its value is the new layer name. All you need to check for per each layer is if there is a property 'object.originalLayerName', and if so, assign its value to that layer name.
    This looks a bit like the array above, except that (1) you use {..} instead of [..] to create an object, and (2) you add "name:value" pairs instead of "value" only (actually, the 'name' of a value in an array is simply its number).
    So this is what it looks like:
    // JavaScript Document
    var doc = app.activeDocument;
    // name indexed object
    var layernames = {
    'FHairBowlBoy *Hair':'Hairboy1',
    'FHairCurlyafroBoy *Hair':'Hairboy2',
    'FHairSpikyBoy *Hair':'Hairboy3'
    // loop through all layers
    for (var i = 0; i < doc.layers.length; i++)
    //Set up Variable to access layer name
    var currentLayer = app.activeDocument.layers[i];
    if (layernames[currentLayer.name])
      currentLayer.name = layernames[currentLayer.name];
    Enjoy!

  • Find and print illegal character in a string using regexp

    I have the following simple regexp that checks for illegal characters in a string:
    String regexp = ".*([\\[\\];]+|@).*"; // illegal: [ ] ; @
    String input = "Testing [ 123";
    System.out.println(Pattern.matches(regexp, input));How can I find and print the character that is invalid??
    I've tried using the Matcher class togheter with Pattern but cant get it to work. :(
    Like this:
    Pattern pattern = Pattern.compile(regexp);
    Matcher matcher = pattern.matcher(input);
    matcher.lookingAt();
    int matchedChar = matcher.end();
    if (matchedChar < input.length()) {
        String illegalCharFound = String.valueOf(input.charAt(matcher.end()));
        System.out.println(illegalCharFound);
    }What am I doing wrong?

    1. You call lookingAt(), but you don't check its return value, so you don't know if the regex actually matched.
    2. matcher.end() returns the index of the character following whatever was matched, assuming there was a match (if there wasn't, it will throw an exception). So either it will point to a legal character, or you'll get a StringIndexOutOfBoundsException because an illegal character was found at the end of the input. The start() method would be a better choice, but...
    3. Your regex can match multiple consecutive square brackets or semicolons (and why not put the at-sign in the character class, too?), but you're acting like it can only match one character. Even if there is only one character, group(1) is an easier way to extract it. Also, if there are more than one (non-consecutive) illegal characters, your regex will only find the last one. That's because the first dot-star initially gobbles up the whole input, then backtracks only as far as it has to to satisfy the rest of the regex. If your goal is to provide feedback to whoever supplied the input, it's going to be pretty confusing feedback. You should probably use the find() method in a loop to pick out all the illegal characters so you can report them properly.

Maybe you are looking for