Write "inch" in scripts

Hi
The following is the script i wrote. I want to change the "point" {200,300} to "inch" {4.5i,5i} in demension.
After i change it , i cannot run the script. Does anybody know how to input "inch" instead of "point".
Many thanks, Neon
tell application "Adobe InDesign CS5"
  tell pages of active document
  resize item 1 in inner coordinates from center anchor by replacing current dimensions with values {200, 300}
  end tell
end tell

Hi Neon,
Try the below code in InDesign Scripting Guide provided.
tell application "Adobe InDesign CS5"set myDocument to active documenttell view preferences of myDocumentset myOldXUnits to horizontal measurement unitsset myOldYUnits to vertical measurement unitsset horizontal measurement units to pointsset vertical measurement units to pointsend tell--At this point, you can perform any series of script actions that depend on--the measurement units you’ve set. At the end of the script, reset--the measurement units to their original state.tell view preferences of myDocumentset horizontal measurement units to myOldXUnitsset vertical measurement units to myOldYUnitsend tellend tell
And also you can try this.
tell application "Adobe InDesign CS5"
  tell pages of active document
  resize item 1 in inner coordinates from center anchor by replacing current dimensions with values {"4.5 in", "5 in"}
  end tell
end tell
Thx
csm_phil

Similar Messages

  • To write a perl script for running a java program from cgi of web server

    I have to write a perl script to call a java program(.exe).I want to run this file through the cgi of the web server.
    java myprogram
    can anyone help me to write a perl script??

    It depends on what the java program does. For example, does it parse HTTP headers from standard input, or what?
    Are you sure it wouldn't be easier to turn the class into a servlet? etc.
    Take a look at IPC::Open2 and IPC::Open3 though. You may need them. (That's just a guess.)

  • How can I hide what I write in Java Script

    If I write a script, I offer it to many one to use it, but I don’t want to anyone to see what I write in the script, how can I do?

    In ESTK go to "File" and select "Export as Binary..."
    HTH
    Marijan (tomaxxi)
    http://tomaxxi.com

  • How do I write in greek script in Pages?

    I want to write in greek script (symbol font) but pages doesn't show it. It is in font book. How do I get pages to let me write in the symbol font?

    tgrebe wrote:
    How do I get pages to let me write in the symbol font?
    Make sure you never use the old symbol font for Greek.  The data it produces is actually Latin underneath, and there is no guarantee anyone else will see Greek.  Instead use the Greek keyboard, and the right font to produce real Greek will be used automatically.

  • Write the results script of results log pane to XLS or CSV file with VBA.

    Hi,
    How can I write the results script of results log pane to XLS or CSV file with VBA code or something? I tried so hard but i can't.
    Thanks

    MoGas,
    This is actually not a trivial process. You need to use the results object and code it to write to your file (it is described in the help files).
    e-Tester automatically saves the results log as a text file so you may just want to stick with that for simplicity.

  • How to write a shell script

    Hi,
    I am trying to learn to write shell script.
    Can anybody guide me throught this:
    I want to write a shell script that finds all the processes running in a database and then kill all these processes.

    Thanks Jen,
    I tried it and it worked.
    One question:
    What should I do to create a file and write a script in that file, so that when I run the file it will automatically kill the processes that are currently running.
    Should I use a "loop".
    I appreciate your help amd time.

  • How to handling ecxeptions on alv and how to write subrotiens on scripts

    Hi abapers..
    tell me how to handle ecxeptions on ALV, and how many exceptions are there ,which exception i have to use.
    AND is it possible to write subrotiens on script, if it is possible tell to me how to write

    There are already enough Exceptions provided for ALV .
    yes you can write sub-routines in scripts , search SDN and you will get answer for the same

  • How to write a shell script to execute a procedure with out parameter

    Hi,
    How to write a shell script to execute a procedure with out parameter.
    here is my procedure
    PROCEDURE sample(invar1 VARCHAR2,
    invar2 VARCHAR2,
    invar3 VARCHAR2,
    invar4 VARCHAR2,
    ecode out number);
    Any example really helpfull
    Thanks in advance

    Or if we're passing values in, maybe something like:
    Test procedure:
    CREATE OR REPLACE PROCEDURE p (myin IN VARCHAR2, myout OUT VARCHAR2)
    AS
    BEGIN
        myout :=
            CASE myin
                WHEN 'A' THEN 'APPLE'
                WHEN 'B' THEN 'BANANA'
                ELSE 'STARFRUIT'
            END;
    END;Shell script:
    #!/bin/bash
    my_shell_variable=$1
    unset ORACLE_PATH
    sqlplus -s un/pw@db <<-EOF
    set feedback off pause off
    set pagesize 0
    set autoprint off
    VAR out varchar2(30)
    VAR myin varchar2(30)
    exec :myin := '${my_shell_variable}'
    BEGIN
      p(:myin, :out);
    END;
    print out
    exit
    EOFTest:
    /Users/williamr: xx A
    APPLE
    /Users/williamr: xx B
    BANANA
    /Users/williamr: xx
    STARFRUITObviously in a real script you would not hardcode the password or let it show in a "ps" listing.
    Message was edited by:
    William Robertson

  • I need to write a Java script to make my Art board bigger by 1 (one) inch on the Width and Length, Regardless of the Content?

    Hi,
    I am currently using "Visible bounds" (java script)to add 1 inch to the width and to the Length of my Art board, but when i make a clipping mask it actually reads the hidden content from the Clipping mask and makes conforms my art board to that particular shape. Am using Adobe illustrator cs6 Here is My Code:
    var myDocs = app.documents;
    var i = 0;
    for (i = myDocs.length-1 ; i >= 0; i--)
        var doc = myDocs[i];
        app.activeDocument= doc;
        var myVisibleBounds = doc.visibleBounds; //Rect, which is an array;
        myVisibleBounds[0] -= 36;
        myVisibleBounds[1] += 36;
        myVisibleBounds[2] += 36;
        myVisibleBounds[3] -= 36;
        doc.artboards[0].artboardRect = myVisibleBounds;
    All i Want is to add 1 inch to my width and length and this does it but if i have a clipping mask it will pick up the bounding box i guess? and it will conform it to the shape... any help please... Try my code and you will see that it does add 1 inch but now make you artboard lest say 12" x 12" and make a shape bigger than the art board and you will see how it adds 1 inch to the art board based on that shape...  now if you make a clipping mask to fit that shape in the 12" x 12" art board you will still get 1 inch bigger than the shape thats being clipped ... 

    yes, visible bounds is reading the non-visible masked objects too.
    you're going to have to do it the hard way, loop through all your objects to get your bounds manually, and while you're at it, test for clipping masks and use the masking path instead.

  • Need to write a startup script for TunTap

    Dear community,
    I am using 10.10.1, 13" MBPr Late 2013 and I need to be able to access my Work VPN. From what i have been told, the OS X client can't work and that I have been advised to use Shrew Soft VPN. (We initially tried to get the WatchGuard Firewall to build a Mac .dmg and that didn't work). To get ShrewSoft to work, I have had to follow these steps:
    http://ulaptech.blogspot.co.uk/2012/11/shrew-soft-vpn-client-for-mac-os-x.html
    ·         Install the qt-mac-opensource-4.7.1.dmg file first
    ·         Install the tuntap20111101.tar.gz file second
    ·         Install the shrew soft client.
    But the TunTap download that is above will not work as it is unsigned and Yosemite has now killed off unsigned kexts.I tried turning off the requirement for OS X for signed kexts by using this command:
    sudo nvram boot-args="kext-dev-mode=1"
    Then rebooting, but it didnt work.
    I can get the VPN to work if I open up terminal and enter these two commands:
    sudo kextload /library/extensions/tap.kext
    sudo kextload /library/extensions/tun.kext
    But I have to do this everytime i turn my Mac on.
    Could somebody please help me write those two lines into a startup script? As I really have no idea how to do it.
    Your help and guidance would be appreciated

    Choose Utilities from the Finder’s Go menu, open the AppleScript Editor, and paste in the following:
    set thepassword to text returned of (display dialog "Your administrator password is required." default answer "" with hidden answer)
    do shell script "kextload /Library/Extensions/tap.kext" with administrator privileges password thepassword
    do shell script "kextload /Library/Extensions/tun.kext" with administrator privileges password thepassword
    Save it as an application and set it as a login item.
    (120186)

  • AftValidate write to file script

    I have developed a script which writes FDM data to a file in the following format.
    Entity, Account,Period, Amount
    ABC,100.Jan,100000
    ABC,100,Feb,200000
    I need to change the format of the out put file to get it into column as shown below.
    Entity, Account, Jan,Feb
    ABC,100,100000,200000
    Looking for pointers in achieving this.
    Thanks in advance.

    Yes, the file is generated after the Export step in the path specified in the script. I am using Pull adapter here.
    The only issue though is i am able to get period in one column and data value in the second, where as I need period in multiple columns with corresponding data.
    I have moved a step further and this is what i could achieve.
    Entity,Account,Jan,Feb
    ABC,100,100000,
    ABC,100, ,200000
    Now I think,it is just a matter of grouping it up to get the values in a single row instead of multiple rows.

  • Need Someone to write me a script for ExtendScript Tool

    My understanding is that Adobe InDesign no longer highlights relink files and I need someone to write a script for ExtendScript Tool to resolve this issue.  Our print publication is generally printed grayscale but our online version is full color...after creating the print edition we relink hundreds of images to go online...it becomes time consuming, hense the issue.

    If you have all your color images in a folder together, you could use "Relink to folder" to update them all at once.
    (Below is from Adobe Help)
    Relink to a different folder
    When you use the Relink To Folder command, you can point to a folder that contains files with the same names as your out-of-date links. For example, if your current links point to low-resolution images, you can specify a different folder that contains high-resolution images. You can specify a different extension for the files, allowing you to change links from .jpg to .tiff, for example.
    Select one or more links in the Links panel.
    Choose Relink To Folder from the Links panel menu.
    Specify the location of the new folder.
    To use a different extension, select Match Same Filename But This Extension, and specify the new extension (such as AI, TIFF, or PSD).
    Click Select (Windows) or Choose (Mac OS).

  • Please help me to write a simple script.

    I wonder to tell a application named "Alien BBS", to input "right key" then wait for 5 seconds to input "left key".
    How can I do that by using a simple script ?
    tell application "AlienBBS"
    activate
    input ?
    end tell
    Please do me a favor to write~ cause I don't have any computer language background. Thanks in advance.

    Hi Tim,
    When you run an application it becomes a process. You can do stuff with the process. One thing is ui scripting which means that you're interacting with the user interface of tghe process. Some Processes don't have the same name as the application it was launched from, but usually they're named the same. You can try this:
    tell application "AlienBBS"
    activate
    end tell
    tell application "System Events"
    tell process "AlienBBS"
    keystroke (ascii character 29) -- right key
    delay 5
    keystroke (ascii character 28) -- left key
    end tell
    end tell
    You need to test it out and adjust.
    gl,

  • Could anyone write an Illustrator script for me? will pay

    Hi,
    I am looking for a illustrator script to help my work. I have lots of pictures placed in illustrator, and a drew line with a custom size. The size of the pictures can not be changed, and what I want to do is the script can auto select pictures and line them up (with a custom space between the pictures), so the length of the pictures can be equal to the line's length. After the script finished with one group of pictures, it will turn to line up another group automatically.
    How long it gonna take for you to write a script like that and how much is it?
    Thanks
    Michelle

    align and distribute can't do that?
    Adobe Illustrator * Moving, aligning, and distributing objects

  • My $20 to the person who can write this simple script for Fission

    Here is what I need to automate. I don't care if it's an Apple Script, or an Automator work flow - whatever - just so it will work with my present setup. Once I test it and it works, I'll send $20 to the first person who can help me.
    Script needs to apply to each (and every) MP3 file in a selected folder:
    Open the first file with Fission v1.6.6 (from: www.rogueamoeba.com)
    Select all
    Normalize
    Save audio (in same folder)
    A warning dialog pops up: "File already exists..." -- answer with "Replace"
    Close file
    Repeat for next file in the folder, until every file has been Normalized
    End script when the last file in folder has been Normalized
    I don't mind finding the folder (which will be in my iTunes Library), and then starting the set of actions on the folder but I definitely don't want to be required to take any additional action on each and every file.
    I'm presently running Fission v1.6.6 under MacOS 10.4.11 on a PPC desktop, so it needs to work in that environment.
    Note that the latest version of Fission requires MacOS 10.5 - I can't use any script that requires that version. Rogue Amoeba's Legacy software page (http://www.rogueamoeba.com/legacy/) shows Fission v1.6.8 as working with 10.4, but that contradicts the Version History for Fission which shows 1.6.6 as the last one for 10.4 - still investigating.

    Pierre L.
    Thanks for the effort!
    First, I can clarify this: Rogue Amoeba confirms that I can use the version 1.6.8 of Fission located on their Legacy page with my OS version 10.4.11, so I've upgraded from 1.6.6 to 1.6.8. Seems to be working OK.
    Next, let me apologize for being mostly ignorant about all things AppleScript. I'm really in over my head, here, because I've not used the ScriptEditor for more than a few minutes before today.
    What I've done so far:
    I checked the box in the Universal Access preferences pane to enable access for assistive devices.
    I copied your script from this forum and pasted it into Script Editor.
    I've Compiled your script, then "Saved As" an "Application" on my Desktop.
    When I double click the icon for the saved script (which ends in xyz.app), a navigation window appears, which I used to select a test folder on my desktop.
    When I Choose the test folder, Fission launched, and selected the whole file, as expected. Then I get an error:
    "NSReceiverEvaluationScriptError: 4" - with buttons to "Edit" or "OK"
    Thinking it might be a timing error, I edited the delays:
    set theFolder to choose folder
    tell application "Fission" to activate
    tell application "Finder"
    set theApp to POSIX path of (get file of process "Fission")
    set theFiles to document files of theFolder
    repeat with thisFile in theFiles
    open thisFile using POSIX file theApp
    tell application "System Events" to tell process "Fission"
    delay 18 -- adjust if necessary
    keystroke "a" using command down -- Select All
    delay 2 -- adjust if necessary
    click menu item "Normalize Selection" of menu 1 of menu bar item 7 of menu bar 1
    delay 4 -- adjust if necessary
    keystroke "s" using {shift down, command down} -- Save Audio…
    delay 3 -- adjust if necessary
    keystroke return -- Save
    delay 2 -- adjust if necessary
    click button "Replace" of sheet 1 of window "Save Audio"
    end tell
    end repeat
    end tell
    tell application "Fission" to quit -- optional
    ... Compiled, and Saved again.
    Now, the script runs up to the point where it should answer the Save pop-up window: "File already exists..." with the keystroke to "Replace" - but the script stops there, with the same error: "NSReceiverEvaluationScriptError: 4"
    Bottom line: so far, I've been able to get the first mp3 file in my test folder Normalized, but not Saved. Any suggestions?

Maybe you are looking for

  • Can't setup scan to email with google apps for your domain (HP Officejet Pro 8500 A910 Printer)

    Printer HP Officejet Pro 8500 A910 Web interface (HPLIP installed on ubuntu 11.10, but problem is linked to web config.)  "The device could not send the test e-mail message. (EmailAccounts-timeout)" when going through the full setup, and "The device

  • New iPad and Gmail as Exchange

    I tried setting my gmail up using the Exchange method that works on all other iOS devices. It allows you to save the account and gives you check marks however it constantly says connection to server failed. I have deleted and re-added the account and

  • Hide columns in ALV grid?

    Hi all, I define a structure in the ABAP dictionary. I declare a table of that type in my program. I populate the table with records. I then display the table of data in an ALV grid. I hide three fields in the grid when I build the field catalog. Whe

  • Output to phone isn't full screen

    Hey, I've searched the forum for a solution but have not had much luck. Whenever I preview to a mobile device, the content isn't 100%. My stage is set up to the correct resolution of the target device (1280px X 720px) I'm using Edge Inspect but this

  • CS5 Photomerge

    When i try to stitch photos together in cs5 the progress bar completes & i see the stiched panorama for approx 1 second then it disappears. Im using xp professional 32X. latest version 12.04 photoshop. Can anyone help?