Need simple script, I think.

I have just created a 500+ page merged document [first time to use datamerge -- coolio] but now need to apply a swatch color to a grayscale graphic (a QR code) on each page. I could convert all the K files to CMYK, triple the file size of 2700 graphics and suffer an inelegant solution OR get someone to help me with a simple applescript to do the same thing... unless there is another way to do it that I haven't figured out.
I have NO scripting experience and no time to learn it for this project. Anyone feeling the generosity of the season and willing to direct me along the right path?
Many thanks in advance.
Jessica
[CS5 on Mac 10.5.8]

Here you are.
In the first line you should put your swatch name in the place of "Gray". Copy, then save as plain text (if you are using TextEdit on the Mac, select this first in the Format menu) in your Users Script folder as "MakeAllGraphicsGrey.jsx". Double-click to run and sit back.
var swatch = app.activeDocument.swatches.item("Gray");
for (var i=0; i<app.activeDocument.allGraphics.length; i++)
          app.activeDocument.allGraphics[i].fillColor = swatch;
Here is a Before (left) and After (right) picture to show it axually works.
(Jongware himself posing with his new tattoo.)

Similar Messages

  • Needed simple script to reset multiple images to 100%

    I don't know if this is the right place to ask, but I cannot find such a script anywhere: what I want is to reset the size of multiple selected images back to 100%.
    Looks like such a simple and needed function is not included in InDesign CS3...
    (MacBook Pro, Indesign CS3).

    "codevar" at the start oughta be just "var".
    "idx[idx]." oughtta be "sel[idx]." -- twice.
    Otherwise (untested) it seems it should work.
    Harbs, was this sent by e-mail? I've been having flowers weird problems lately, trying to format something as quote or code with the flowers Jive web editor. Some flowers line of flowers java keeps popping up -- using IE 8, latest flowers update.

  • HELP!! Need a script for DUMMIES for a simple login/register feature

    I know very little html and am more of a designer, but my programmer has let me me down so I have to take this on myself.
    I want to include a very common feature where visitors register to my site, so I can collect some information and contact details from them, then they can access hidden pages of the site and receive some exclusive download links by email, allowing them to download content (only once). They can then login each time they visit with a userID or email and a password.
    My host supports almost every scripting language.
    I've been told PHP is what I need, but I know absolutley nothing about it. My host said there is templates for such a simple script out there on the net for free but I'm being passed from pillar to post with scripts for much more complicated and rarer scripts than I need.
    Hope you can help.
    LB

    Do I need to create a database to store users info first?
    Yes. Without a database, it won't work.
    Is this a basic html page with a table with lots and lots or rows and columns for each of the details they have entered (e.g Name, DOB, Address.....etc)??
    No, I'm afraid not. Dreamweaver's PHP server behaviors work in conjunction with the MySQL database. If your hosting company supports PHP, you will almost certainly have access to a MySQL database and phpMyAdmin, a web-based program that helps create and maintain MySQL databases. As a minimum, your users table in the database will need three columns:
    user_id (a number that acts as the primary key for each record)
    username
    password
    You can also have other columns to store other details, such as first name, family name, and any other information that you want to store.
    If you have never done any PHP or database development before, this is going to be a major undertaking for you. The Adobe Developer Centre has some articles that show you how to set up a PHP/MySQL testing environment (http://www.adobe.com/devnet/dreamweaver/articles/setting_up_php.html) and create your first database-driven pages (http://www.adobe.com/devnet/dreamweaver/articles/php_event_registration.html). The Dreamweaver help files also step you through the process of creating a login system (http://help.adobe.com/en_US/Dreamweaver/10.0_Using/WScbb6b82af5544594822510a94ae8d65-7883a .html).
    Working with PHP/MySQL isn't difficult, but there's a lot to absorb. If you're going to start working with login systems and other database-driven features, you might find it useful to take a look at one of my books about Dreamweaver and PHP. I have different editions for Dreamweaver 8, CS3, and CS4. You can find more details at my website (http://foundationphp.com/).
    Good luck.

  • Simple script needed

    I work with InDesign doing text layout. I have used scripts, but have never had the time to learn JavaScript. I need what I assume is a fairly simple script. The script needs to do the following:
    1. Open a document.
    2. Ignore the missing font dialog box.
    3. Load all text style from another file, with the styles from that file overwriting the styles in the current document.
    4. Save the open document with the same name.
    The script needs to be able to batch process all of the document in a folder.
    If this is simple enough to do with several lines of code, I would appreciate it if someone could help me out. If it is more complex than that, I can possibly pay.

    Hi kwilson68, could you contact me by email? I might be able to help you out.

  • I need a simple script (Break Link To Style)

    Hi nice guys,
    Can someone please provide a simple script that will break the links to styles in all the paragraphs in a document.
    Thanks in advance
    Maria*
    *An non coder designer that simply is not capable of understanding javascript... (but I have tried!)

    Hi Maria,
    Jongware's post (http://forums.adobe.com/message/1890625#1890625) gave me a clue on how to do this.
    Give this a try:
    var i, j, myDoc = app.activeDocument,
              allStories = myDoc.stories,
              thisStory,
              thisPara;
    for (i = 1; i < allStories.length; i++) {
              thisStory = allStories[i];
              for (j = thisStory.paragraphs.length - 1; j >= 0; j--) {
                        thisPara = thisStory.paragraphs[j];
                        thisPara.applyParagraphStyle(myDoc.paragraphStyles[0], false)
    alert ("Job Done!");

  • Need a script for squaring images of various sizes please

    Hello, new to this group but have been using photoshop for years doing basic editing. I have never done any sripting. I have a project on my hands. I have a lot of image of various sizes with some taller or wider than others. I need to make all these images exactly square though. Currently they vary and are wider or taller etc.
    I was wondering what process I could use hopefully with batch editing but was told scripting might be the answer to automate this process as I have about 8,000 images.
    So for example one image might be 200 pixels wide and 400 pixels high and another is 100 pixels high and 600 pixels wide and so on. I would need the
    1st example to be 400 x 400 and the 2nd example 600 x 600.
    I am using photoshop 5.5
    The software for a shopping cart is using a feature that allows you to zoom in on the image but if it is not perfectly square the image doesn't appear
    well in the software. Using magento e-commerce.
    Thanks for your help and any thoughts on this project of mine.
    Dave

    Here a simple script the does what I think you want.
    // squares the canvas. uses the background color
    var doc = activeDocument;
    var maxDim = Math.max( doc.width, doc.height );
    doc.resizeCanvas( maxDim, maxDim, AnchorPosition.MIDDLECENTER );

  • Could someone please sketch out this simple script for me?

    Could someone please sketch out a simple java script for me. I will have a document with one background
    layer and a layer set (group) called "Analyze" that consists of 63 adjustment layers. The layer names in that "Analyze" group(folder) will be
    "01" ...through "63" with 01 on the bottom and 63 at the top. Initially, all of the adjustment layers will be invisible and  the
    group will be closed (not expanded). I need a simple  script that will check for the first invisible layer in that group
    and make it visible without selecting that layer nor expanding the group. The script has to check
    for the first invisible layer every time it runs because other actions may have turned off a layer in the set.
    The point of this is so I can hotkey flipping on the layers one at a time without expanding the set or
    changing focus off the  background. It seems it should be a simple loop, but I just can't wrap  my head
    around all the objects (e.g. Layer as opposed to Layers  and  Artlayer as opposed to Artlayers)
    and the constants constants.
    for (i = 63; i>0; i--){                 /* I have found layer indexes 0 are the topmost layer */
      if( layerset[i] == INVISIBLE){
               layerset[i] = VISIBLE;
                  break;
    Could someone please write me a simple script that would do this?
    Edit I found this and its very close to what I need:
    var doc = app.activeDocument;
    for(var i = 0 ; i < doc.layers.length;i++){
      doc.layers[i].visible = (i % 2 == 0);
    From here : Function to show/hide layer with Photoshop script (JSX) - Stack Overflow
    In my case I would rewrite it to this
    for(var i = 62; i >=0; i--){
         if(  !doc.layers[i].visible){
              doc.layers[i].visible =TRUE;
              break;
    My problem is I just need  to traverse the layers in my layerset "Analyze"
    How do  I reference just those? Is there a doc.layersets["Analyze"].layers[i].visible = TRUE?
    Message was edited by: Shawn Laughlin To add more information

    Well this works:
    var doc = app.activeDocument;
    var analyze = doc.layerSets.getByName("Analyze").layers
    for(var i = 62 ; i >= 0; i --){
        if (!analyze[i].visible){
            analyze[i].visible =1;
            break;
    Hard to believe TRUE is not a constant in java.

  • Simple Script works on 10.6 but not 10.5.8

    Hi,
    Brand new to Applescript...I made a simple script (saved as an application) to rename Excel Sheet Tabs and it works on my MBP (10.6.2) however when I try sharing with other users (10.5.8), it fails to carry out properly. It opens a blank workbook rather than the "test.xls" workbook and won't go any further. Am thinking it might be due to:
    1) where the script and .xls file were originally created/saved?
    2) 10.6.2 vs. 10.5.8?
    3) method of sharing? Tried attaching to Mac OSX Server Wiki, NAS and e-mailing but still wouldn't work.
    here's the script-
    tell application "Microsoft Excel"
    try
    open workbook workbook file name "test.xls"
    activate object worksheet "names"
    set myRange to range "A2" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 3 to myName
    set myRange to range "A3" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 4 to myName
    set myRange to range "A4" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 5 to myName
    set myRange to range "A5" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 6 to myName
    set myRange to range "A6" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 7 to myName
    set myRange to range "A7" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 8 to myName
    set myRange to range "A8" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 9 to myName
    set myRange to range "A9" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 10 to myName
    set myRange to range "A10" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 11 to myName
    set myRange to range "A11" of worksheet "names"
    set myName to input box prompt "Please type a Student Name" title "Students"
    set value of myRange to myName
    set name of sheet 12 to myName
    end try
    end tell
    Any suggestions will be greatly appreciated! THANKS!

    more info:
    a co-worker with a MacBook (10.5.8) was able to download the script and .xls file from our server and it worked...
    An eMac (10.4.11) was not able to run the script.
    All machines are running 2008 Office for Mac

  • Need a script to enable in-place hold on Office 365

    Hello, I need a script to enable in-place hold on Office 365 for my users.
    The options that I have found for this so far is to enable in-place hold for a DL or an individual user. Is there a way to use a CSV instead?
    This is what I have used before.....where "allstaff" is the name of a DL.
    New-MailboxSearch -name "3 Year In-Place Hold" -SourceMailboxes allstaff -InPlaceHoldEnabled $true -ItemHoldPeriod 1095

    That doesn't seem to work.........I think it's trying to create a new hold query for every user.
    PS C:\scripts> ./user_hold.ps1
    WARNING: The hold setting may take up to 60 minutes to take effect.
    Name                CreatedBy           InPlaceHoldEnabled  Status
    3 Year In-Place ... S-1-5-21-2495351... True                NotStarted
    Unable to execute the task. Reason: A mailbox search named <3 Year In-Place Hol
    d> already exists or is currently being deleted. Please choose a different name
        + CategoryInfo          : InvalidArgument: (Microsoft.Excha...DiscoverySea
       rch:MailboxDiscoverySearch) [], MailboxSearchTaskException
        + FullyQualifiedErrorId : [Server=BLUPR06MB097,RequestId=e8df9b95-2e00-428
       d-813f-da05ea8d09d4,TimeStamp=11/5/2013 9:38:05 PM] [FailureCategory=Cmdle
      t-MailboxSearchTaskException] 95CD9ECA
    So my next question...........how do I add users to an existing In-Place hold?

  • HOW TO : Writing simple scripts in SQL Developer??

    Here is a simple script I run in SQL*Plus...
    the first SQL prints the QCSID, the second script prompts for a SID which is the QCSID from the first SQL... once provided it gives me the output I want...
    I just cannot do this in SQL DEVELOPER..... or Can I?
    select distinct qcsid from v$px_session;
    select sid,serial#,qcsid,qcserial#,degree,req_degree from v$px_session
    where qcsid in (select qcsid from v$px_session where sid='&sid');

    Ganesh,
    Simple substitution and defines work in SQL Developer scripts.
    I think the problem with running your script is that the first query results are not displayed before the window asking for the '&sid' value. That is the output to the 'screen output' tab is buffered and not synchronized with additional pop up (or dialog) windows. Is that correct?
    Currently:
    You can use substitution variables in the f5 'Run Script' but no bind variables.
    You can use bind variables in the f9 'Execute Statement' but no substitution statements.
    You can use anonymous PLSQL blocks, and packaged functions and procedures, so you can store per session state in PLSQL packages.
    -Turloch

  • Need simple class for communicating with Solaris account

    Hey, gang. After over a week of searching this forum and the Web for a solution, I'm stuck. I hope someone here can help.
    I've got a Java application intended to run on both Windows and Solaris systems that needs to perform the following automated operations:
    1. Connect to a user account on a Solaris server.
    2. Login.
    3. Run an sccs command.
    4. Retrieve the output from the sccs command.
    I can run commands (such as sccs) directly from Java; I've worked out how to do that. My situation is that I need to run sccs from an authorized account so that all file checkin/checkout operations are tagged properly. So the requirement to connect to a server isn't one I can ignore. I also don't need a full-up interactive client interface -- this needs to be an automated process.
    What I'm hoping is that someone here will be willing to provide (or point me to) some relatively simple source code I can call to do this stuff. Maybe an example of a class that uses Socket and a couple of streams to programmatically connect to a server, send commands, and capture input. That's really all I need.
    I've tried calling the Jakarta Commons telnet class to connect to the Solaris server, but it's more overhead than I need. (Plus the input stream kept blocking when I tried to use it in a purely automated mode.) I've also tried rolling my own code using the minimal info available on Google, but have not been able to figure out the magic words necessary to get anything back but gibberish. (InputStream and BufferedReader just do not seem to want to cooperate. Either I get back only garbage text, or readLine() or read() gets nothing and just sits and waits until the timeout.)
    So I turn to the experts here. If anyone can offer (or direct me to) any simple, non-libraried source code that enables my Java code to connect to and talk to a Solaris machine, I'd be grateful.
    Thanks!

    I was hoping a separate server-side process wouldn't be needed -- if you're thinking of something like RMI, that's also a bit heavyweight for my needs. I know I can talk to the remote server on telnet port 23, though.
    Further experimentation today with the Jakarta net library has generated something that works using their telnet classes. (After I asked for help here, of course. The same thing happens when I shop for groceries....) But using this leaves me referencing an external library that:
    1. has functionality I don't need that complicates the code, and
    2. forces me to address licensing requirements.
    So I'd still love to see an example of a telnet-like Java class that strips away all the non-essentials in the Jakarta telnet library code, leaving behind a simple public domain class that can be used to connect to a remote host and transfer characters over that connection.
    I appreciate that this may be asking for a lot, but as they say, if you don't ask, you don't get. ;-)
    Thanks!

  • Simple script in /usr/local/bin just won't start - SOLVED

    I put this really simple script for starting psi into my /usr/local/bin, set it a+xr and added /usr/local/bin to my path. However, I just can't start the damn thing.
    Here's the script itself (I really don't think there's something wrong with it, since if I type it in the shell it works fine):
    #!/bin/zsh/
    #start psi, never stop
    while true;
    do psi;
    done
    Here's my users $PATH:
    ─$ print $PATH
    /bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin:/usr/local/bin:/opt/kde/bin:/opt/mozilla/bin:/opt/qt/bin
    Here's the permissions of the script:
    $ ls -lah /usr/local/bin
    total 4.0K
    drwxr-xr-x 2 root root 80 Dec 15 03:52 ./
    drwxr-xr-x 10 root root 240 Dec 10 18:55 ../
    -rwxrwxr-x 1 kamagurka users 60 Dec 15 03:51 psi.start*
    And here's what happens when I try to execute it:
    $ psi.start
    zsh: command not found: psi.start
    So, I'm either missing something incredibly obvious, or something freaky's going on here. I hope it's the former.
    EDIT: I had no idea where to put this, so I put it into Desktop Env since I'm trying to start a graphical app, but feel free to move it.
    EDIT: Yea, I was being a little dense.

    smoon wrote:Not sure if that's the problem, but try removing the trailing / (slash) from your script's shebang.
    See, something really obvious. Stupid, even. You can see, I don't do a lot of scripting.

  • HELP, need quick script fix

    Hi,
    Our InDesign is acting up here. We are designing massive amounts of tables for various annual reports. After the design for print is done, these tables need exporting to xHTML.
    We have tested this extensively, and written complicated CSS files and many cell-styles to make it work.
    The thing is, that now when the final test-export needs to be done. InDesign suddenly returns a Stack Overrun error message when exporting. The only thing that seems to happen is that we cut out each page, paste it into a new document, save, and then do the xHTML export. But we are talking hundreds of pages here.
    My Apple script is not too good, but I am sure this can be done by a simple script. And I am quite sure it has been done before.
    Can anyone here please point me in the correct direction.
    PS. A bug report has been made to Adobe about this issue

    Thank you for the quick reply. Smart ports look very cool. I like the idea and may find this useful for other purposes but if I am reading this right, it won't work for what I need. It looks like he would need to log into the switch to apply the macro. He is a phone guy and does not want to actually touch the switch. So I was looking for like a perl script of something that I could configure with my TACACS credentials. Also I won't know what port he needs reconfigured until he needs it, so I need him to be able to add the port number as a variable without him actually having to do any programming. he would be will to run it as part of a command (i.e run command.exe 10.10.10.22 g1/0/22 222, where 10.10.10.22 is switch IP, g1/0/22 is port, and 222 is the new vlan) or if I can do somekind of prompt that would be great!

  • Help with simple script

    I was wondering if someone could help me with a simple bit of action script 3. I need to make a movie clip (single_mc) disappear when the user clicks on the mouse (stop_btn). Here’s what I have so far.
    function setProperty(event:MouseEvent):void
    single_mc.alpha=0;
    stop_btn.addEventListener(MouseEvent.CLICK, setProperty);
    Also I was wonder if you could recommend an Action script 3 book for me. I would like one that is not a training book, but has situations and then the script written out. For example: I click a button and a movie symbol disappears from the stage. I am a graphic artist, that from time to time, needs simple interaction in flash, but cant justify the time to learn the script.
    Thanks for your time

    use the snippets panel to help with you with sample code for basic tasks.
    function setProperty(event:MouseEvent):void
    single_mc.visible=false;
    stop_btn.addEventListener(MouseEvent.CLICK, setProperty);

  • [SOLVED] Help with a simple script

    Hi guys! A problem is connected with switching cpu governors. Usually I set it by commands and made alias in .bashrc:
    sudo cpufreq-set -c 0 -g performance && sudo cpufreq-set -c 1 -g performance
    sudo cpufreq-set -c 0 -g ondemand && sudo cpufreq-set -c 1 -g ondemand
    sudo cpufreq-set -c 0 -g powersave && sudo cpufreq-set -c 1 -g powersave
    Could you help me with script which can read system information about current cpu governor and switches the next governor
    Last edited by noMaster (2012-01-27 06:36:55)

    noMaster wrote:
    JuseBox wrote:Can you please be more specific with what you are trying to accomplish?
    I need that script for set it on hotkey and change cpu states. Unfortunately I havent scripting experience
    I make one thing but it doesnt work for me
    ### Toggle Super Hybrid Engine ##################################
    she_names=("performance" "ondemand" "powersave")
    she_value_performance=( "0" "performance")
    she_value_ondemand=( "1" "ondemand")
    she_value_powersave=( "2" "powersave")
    # Find current
    she_current=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor`
    if [[ "${she_current}" == "${she_value_performance[0]}" ]]; then
    she_next=${she_value_ondemand[0]}
    elif [[ "${she_current}" == "${she_value_ondeman[1]}" ]]; then
    she_next=${she_value_powersave[0]}
    elif [[ "${she_current}" == "${she_value_powersave[1]}" ]]; then
    she_next=${she_value_performance[0]}
    fi
    function she_toggle() {
    if [[ "${she_names[${she_current}]}" != "${she_names[${she_next}]}" ]]; then
    cmd="/usr/bin/notify-send -t 5000 SHE changed"
    echo ${she_next} > ${she_current}
    else
    cmd="/usr/bin/notify-send -t 5000 SHE original"
    fi
    case $1 in
    # "debug")
    # print_debug
    "powersave")
    she_next=2
    she_toggle
    "normal")
    she_next=1
    she_toggle
    "performance")
    she_next=0
    she_toggle
    she_toggle
    esac
    ### End of file #################################################
    I am looking over the script. Without it, do you think you could explain what your trying to accomplish? What states and when should they toggle? Something rough to get an idea? I think if I am thinking correctly this could be easier then it seems. I will help ya.

Maybe you are looking for

  • Deskjet 3050 does only print JPG files in color - all other docs are only printed in black and white

    Dear All, I have a problem with my Deskjet 3050 Printer. (USB connected with my laptop). My printer won't print colored documents in color but only in black and white (except for JPG files (photos) which are printed in color. Word documents or PDF fi

  • Why i can't install itunes on my PC with win 7 pro 32 bit ?

    dear apple. Could you tell me how to install itunes 10 or 11 on my pc with win 7 pro 32 bit ? when i try to installing itunes my PC has appear error so i can't complet install itune on my PC Im trying many time but it just send me error and i cant fi

  • F110 APP run Error

    Hi Experts, When I try to run F110. Below Error shown. I pasted  Error Job log below: Job started Step 001 started (program SAPF110S, variant &0000000002020, user ID SAPUSER) Log for proposal run for payment on 12.07.2014, identification WIP4 Informa

  • Asset master report- supplier details

    HI All, My customer wants to have tax details of the vendor to be recorded and reported for an asset Though supplier name and number can be directly saved in asset master, is there any way to get the VAT reg number, state tax registration number, Inc

  • How to set default duration of photo clips, using ipad

    I Cannot seem to find a way to set a default durarion for my photo clips. i Have to modify them one by one using the pinch...which is extremely clumsy. i Am using the iPad version...not desktop