Add filename AND rotate to match mask angle?

Hello,
  I'd like to be able to automatically add a document's filenmame to a series of masked files. Thanks to a previous question (http://forums.adobe.com/thread/547382?tstart=0) I have a series of 'panels' files that have all been saved out from a master file. There are hundreds of them and that last script was a giant help.
  I could probably figure this out if it weren't for the fact that some of the documents contain masks that are not rectangles. All masks have perfect vertical edges and most have horizontal tops and bottom. However, quite a few have angled top and/or bottom edges.
  Any advice on how I can create some javascript that can automate the process of labeling these files? This could be run on a series of files, or one at a time if needed. It would have to:
1) determine the filename of the document being 'labeled'
2) insert the text into the mask path item as the top item in the mask.
3) determine the angle of the top of the mask
4) rotate the text item to match the mask angle if other than horizontal
5) inset the label from the edge slighlty (configurable in the script?)
6) Outline the lable text
I have attached a sample file that roughly illustrates the kind of file the script might be used on.
Thanks,
Tony

Hi, first thanks and second i have good news.
As you may have noticed KERNELS parameter usually changes and thus the rule does not apply, but the path /dev/input/by-id don't change, so:
Create a udev rule:
## /etc/udev/rules.d/99-fix-jsx-eventx.rules ##
SUBSYSTEM=="input", ATTRS{idVendor}=="045e", ATTRS{idProduct}=="0745", KERNEL=="js[0-9]*", RUN+="/usr/local/bin/fix-jsx-eventx.sh"
Then create the script to change permissions:
## /usr/local/bin/fix-jsx-eventx.sh ##
#!/bin/bash
sleep 5
chmod a-r-w "/dev/input/by-id/usb-Microsoft_Microsoft®_2.4GHz_Transceiver_v7.0-if02-event-joystick"
chmod a-r-w "/dev/input/by-id/usb-Microsoft_Microsoft®_2.4GHz_Transceiver_v7.0-if02-joystick"
The "sleep 5" is necessary because the eventX is not immediately created, making that permissions aren't applied correctly.
# chmod +x /usr/local/bin/fix-jsx-eventx.sh
After that, reload rules
# udevadm control --reload
Then replug the device and voilà! Both problems solved, get rid of fake joystick and working multimedia keys.
Bye!"
PD: Google translated...
Last edited by ThecaTTony (2015-05-01 07:43:00)

Similar Messages

  • Add filename and path to Designer form footer.

    I am somewhat of a novice at creating forms in Livecycle designer and need help adding a filename and path to the footer of a form after clicking on the "save as' button.  I have not found any answers anyplace so help would be greatly appreciated ASAP. Thank you!!

    Create a field on your masterpage. Get rid of the caption, appearance=none and set as Protected. Also set your width to expand to fit. In the layout:ready event of your field, add this JavaScript:
    this.rawValue=event.target.path
    That should do it.
    Kyle

  • Trying to add filename and path in footer of Word doc and it only lets me "Convert to PDF"?

    I am running MS Office 03 and just installed Acrobat 9.0 Pro. When I try to insert the Filename and Path from the insert option of the footer properties, it only gives me the option to "Convert to PDF". I don't know why it's doing this, but it started after the install of Acrobat 9.0. What should I do?

      To get the path ... event.target.path;
    To get the file name .... event.target.documentFileName;

  • Are there any plans to add Measuring and Rotation tools into Adobe Reader for iPad. Currently using V11.2.0 (86952)

    We need to provide our planning officers with io site access to plans via iPads.  Whilst they can view the plans in .pdf format via Adobe Reader, they need to be able to rotate and measure whilst on site.

    For Adobe Reader, the stated features are highly unlikely but you might want to fill the feature request form at: Adobe - Feature Request/Bug Report Form
    Regards,
    Rave

  • Add filename and path into PDF-form

    Hello,
    I create different PDF-forms for our company with LiveCycle Designer 8.2.1 .
    Now I have to integrate the name of the form-file and its path automatically into the form. My idea is to place a text-field, I will give the type "calculated" in the value-tab of the object-palette. This Text-field should be filled with the file name and the path where it's stored in the background. I find these two values in the info-tab of the form-properties dialog-box. My questions is: How do I get these values, that I can place them via script into my text field?
    Can someone give me a hint? Thanks.

      To get the path ... event.target.path;
    To get the file name .... event.target.documentFileName;

  • Quicktime Pro for XP - Transitions and Rotate

    Can anyone point me to how to add transitions and rotate .aviu videos using Quicktime Pro

    Enter Your Name and QuickTime Pro Registration Code
    Enter your name and QuickTime Pro registration code in the fields exactly as they appear in the email from the Apple Store online confirming your QuickTime Pro purchase.  Then click Apply.
    It may be helpful to copy then paste from the email.

  • I need to know how to edit a drawing - basically remove the arrows and text but at the same time match the background of the existing pic. then re add new text. how do i erase the arrows and text and arrows but match current background of pic. step by ste

    i need to know how to edit a drawing - basically remove the arrows and text but at the same time match the background of the existing pic. then re add new text. how do i erase the arrows and text and arrows but match current background of pic. step by step explanation please beginner

    Please post (a relevant section of) it right on this Forum.

  • After installing 10 .5.1 and buying itunes match I click add this computer and I get a window saying itunes has stopped working and itunes closes

    after installing 10 .5.1 and buying itunes match I click add this computer and I get a window saying itunes has stopped working and itunes closes

    I found that after I turned on geniuseverything worked

  • Minidump filename and .time output does not match

    Hi,
    I have a few minidumps from different machines. As far as I know, the filename of the minidump indicates the date of dump creation and so does the .time command in windbg. But in my case these do not match for the same dump. THe date in .time is one day
    later than the minidump filename.
    Is my understanding correct about the minidump filename and .time output?
    thanks
    Kunal

    Hi Kunal,
    Can you please check if there's a difference in the date/time between the dump filename and the "Date Modified" for the dump files. You can check the "Date Modified" in windows explorer.
    Hope, that'll answer your query.
    (Please mark as answer if this resolves your query. Please upvote if this post is helpful.)
    Regards,
    Rajesh

  • Make Brush preset doesn't match canvas angle

    Hello!
    I'm running a demo version of Photoshop Cs 5 on my brand spanking new Macbook pro 2.3 ghz with 8gb of ramalama.
    I work on comics and I create a lot of preset brushes as I go, using an action script.  I'll draw a path, and the script witll fill that path with black, make the path a selection and turn it into a brush preset.
    Problem is, when I have the canvas rotated, and I make a brush preset, the new brush is not matching the angle the canvas is CURRENTLY rotated at.
    For example, if I've rotated the canvas 45 degress clockwise, and create a brush, the brush will be 45 degress sounter clockwise to what I intended.
    This is NOT the way CS 4 worked.
    Any thoughts?

    weird new info:
    let me try to calrify again, cuz I know it's odd and difficult to visualize:
    lets say im drawing a face and i want to add some feather using a brush pattern:
    I create the shape, fill it with black and choose make brush, but it will create the brush canted at the angle in relation to the canvas at zero degress rotation.
         Above is my canvas set at zero degrees.  All is well.
    Above, I've rotated the canvas and used the lasso tool to draw a shape.
    Now Ive filled it with black and makingit a brush  preset.
    In the last image, you can see that the created brush preset was generated as if it had been created at 0 degress to the canvas instead of in relation to the screen!  WTF indeed!

  • Curious issue with extrude and rotate

    I've found a curious issue with extrude and rotate in CS6. It's not a bug, but it is a nonintuitive behavior that is confusing, and sometime troublesome. I think this is something that ought to go on the to-do list for the devs. Anybody else agree? Disagree?
    Example:
    I began with an arrow-shaped path, to which I applied the "extrude" effect. I then put an icon on top of the arrow, and grouped the icon and arrow. Now, I'm using this icon-arrow in several different parts of my design, in different orientations. As I rotate the arrow, the relative position of the icon and the arrow appears to shift. I believe this is happening because, as you rotate the icon-arrow, Illustrator rotates both the icon and the arrow about the center of the bottom face of the arrow. This is because the top face of the arrow is essentially fictitious, just an artifact of the extrude effect. So, even though the icon appears as if it is drawn on the top face of the arrow, it behaves as if it is attached to the bottom face of the arrow. When you apply a transform, that transform affects the bottom face of the arrow, causing the top face to shift relative to the icon.
    The solution would be to add an extra check box to the extrude effect, asking whether you wanted to extrude upwards (the way things are currently done) or downwards. If you could extrude downwards, then the top face of the arrow would be the "real" face, the one affected by transformations. You could then put an image on the top face, group the arrow and the image, and when you applied a transform, the icon would remain fixed relative to the top face, which would meet your intuitive expectations.
    If anyone is curious to experiment with this particular example, I've posted this file to Google docs here:
    https://docs.google.com/file/d/0B0Hoxcl5zTEtTXo5QnNsMGwwOGc/edit?usp=sharing

    but it does work because i downloaded your file and i did jsut that. it isn't exact, but your suggestion on how to fix it wouldn't fix it anyway. the reason the acorn doesn't match is because of the distortion from the perspective not the direction of the extrusion. even if you could dictate the extrusion to go downward, the arrow would still rotate into perspective (distort) and then extrude. to avoid that, what you want is to extrude in axonometric and to do that you make your perspective rotation angle 1 degree, then make your extrusion length a lot longer to match what you want. with 1 degree there will be minimal distortion to the arrow as you rotate it and the acron will match.
    i uploaded your file with your orignal 10 degree angle, and you'll see that they stay in sync pretty well. i drew a box around the acorn to better distinguish the difference. then i recreated the same thing with a 1 degree angle and on that version it stays in sync almost perfectly.
    again. it doesn't matter wich direction you extrude since in perspective both faces will be distorted. if you want to keep the distortion from the perspective, you can apply the same perspective rotation to the acorn without the extrusion and it will distort in the same way as the arrow. i added that option to your file. they are all group and you can rotate them and see that they stay together pretty well, except the first one is a little off.
    i uploaded your file with my solution
    https://docs.google.com/file/d/0B4ilRoSBagc3WDY3MUR1bDNpV0E/edit

  • Error 1074395241: The template descriptor does not contain data required for rotation-invariant matching.

    Hello all,
    I am using the IMAQ Match Pattern 4 to detect the rotation angle of a template image. However, it shows the error: "Error 1074395241: The template descriptor does not contain data required for rotation-invariant matching." What is the problem exactly? How to solve this? The details are explained below.
    My project is a little bit complicated. Part of the block diagram containing the IMAQ Match Pattern 4 is shown below:
    The source image is a series of frames of images read from an AVI video (I used a for loop to process the images frame by frame). The template image is a selected region of the first frame. So it means, the user selected the object of ineterst in the first frame of the video, and in each of the following frames, we need to find the matched object of interest & determine its rotation angle. When I run the block diagram shown above, it does not have any error. However, it shows the rotation angle as zero no matter what it "really" is. Therefore, I changed the block diagram by adding the parameters, shown below:
    But in this case, when I run it, it shows the error that I have indicated in the subject line.
    If you need more details about my project to identify the problem, please let me know.
    Thanks in advance.
    Solved!
    Go to Solution.

    -Please go through pattern matching example which comes along with labview fiirst
    Go to labview Help>>Find Examples and you can search for example.
    -You have create template with angle range and what type of pattern matching you want use.
    -For this you have to use IMAQ Learn Pattern before using IMAQ Match Pattern 4
    Refer :http://zone.ni.com/reference/en-XX/help/370281U-01/imaqvision/imaq_match_pattern_4/
    Thanks
    uday,
    Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
    Certified LabVIEW Associate Developer (CLAD) Using LV13

  • To match the angle of the gradient to the path?

    Hello everybody!
    I checked a little bit the other posts and I saw one from Steve similar but I think my question is a little different:
    If you consider this example on the picture, is it possible that the gradient automatically comes to the same angle of the path?
    (instead of searching degree per degree which angle more or less fits..)
    I use sometimes the measure tool but u know how it is, it doesnt match really good..
    Thanks,
    Thomas

    You can do it exactly and without guesswork.
    Here's one way:
    Direct select and copy one long side of the shpe you want to fill with a gradient.
    Paste in Front (Cmd+F on a Mac).
    Double-click on the Rotate tool (R) and enter 90°.
    Make a guide of your path (Cmd+5). This new guide is the direction of your gradient.
    With Smart Guides turned on, use the Gradient tool (G) to drag the gradient to fit the width of the shape.
    Here's another way:
    Rotate your shape until it is vertical. Colour it pink-or-something.
    Then fill it with the gradient from a swatch and rotate it back to where it was.
    You can also make "steel bars" with a blend between two strokes, a dark thick one behind and a light thin one in front.
    But that's another story. :-)

  • How would i make an object and rotate it?

    ok, i'm trying to get java to make a graphics object, and then create an array of said objects (basically just a bunch of rectangles organized into rows/columns) with the end goal being that i be able to put this collection of rectangles into a JPanel and then move it around and rotate it without changing its dimensions (so each rectangle in the collection retains the same height and width but with a different placement/orientation angle )
    My java textbook (yes, college student) doesn't cover the Graphics2D stuff which SEEMS to be what i would use... but beyond that I'm finding the resources on the topic to be uniformly opaque. i think i just need some starting point to extrapolate from. could anyone reply me a crash course in the above...?

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Blocks extends JPanel {
        Block[][] blocks;
        int dx = 2;
        int dy = 2;
        public Blocks() {
            registerKeys();
            setFocusable(true);
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            if(blocks == null) initBlocks();
            g2.setPaint(Color.red);
            for(int j = 0; j < blocks.length; j++)
                for(int k = 0; k < blocks[j].length; k++)
                    blocks[j][k].draw(g2);
        private void initBlocks() {
            int rows = 6;
            int cols = 3;
            Dimension d = new Dimension(200, 200);
            BlockMaker blockMaker = new BlockMaker(rows, cols, d);
            blocks = blockMaker.getBlocks();
        private void registerKeys() {
            getInputMap().put(KeyStroke.getKeyStroke("UP"), "UP");
            getActionMap().put("UP", up);
            getInputMap().put(KeyStroke.getKeyStroke("LEFT"), "LEFT");
            getActionMap().put("LEFT", left);
            getInputMap().put(KeyStroke.getKeyStroke("DOWN"), "DOWN");
            getActionMap().put("DOWN", down);
            getInputMap().put(KeyStroke.getKeyStroke("RIGHT"), "RIGHT");
            getActionMap().put("RIGHT", right);
        private void step(int x, int y) {
            for(int j = 0; j < blocks.length; j++)
                for(int k = 0; k < blocks[j].length; k++)
                    blocks[j][k].move(x, y);
            repaint();
        private Action up = new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                step(0, -dy);
        private Action left = new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                step(-dx, 0);
        private Action down = new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                step(0, dy);
        private Action right = new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                step(dx, 0);
        public static void main(String[] args) {
            Blocks blocks = new Blocks();
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(blocks);
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    class BlockMaker {
        Block[][] blocks;
        int PAD = 20;
        public BlockMaker(int rows, int cols, Dimension size) {
            int w = (size.width  - (cols+1)*PAD)/cols;
            int h = (size.height - (rows+1)*PAD)/rows;
            blocks = new Block[rows][cols];
            for(int j = 0; j < rows; j++) {
                int y = PAD + j*(h + PAD);
                for(int k = 0; k < cols; k++) {
                    int x = PAD + k*(w + PAD);
                    blocks[j][k] = new Block(x, y, w, h);
        public Block[][] getBlocks() {
            return blocks;
    class Block {
        int x;
        int y;
        int w;
        int h;
        public Block(int x, int y, int w, int h) {
            this.x = x;
            this.y = y;
            this.w = w;
            this.h = h;
        protected void draw(Graphics2D g2) {
            g2.drawRect(x, y, w, h);
        protected void move(int dx, int dy) {
            x += dx;
            y += dy;
    }

  • How can i add filename on a document in pages 5.1 ?

    I am allways using a template to make documents, that I save under different names. How can I add the (changed) filename in the footer of a saved document ?
    It is important to me to print the filename on document, to find and edit it on my mac later.
    In MS Word it is easy to automaticaly add filenames, path, author and other filedata to the document. I can't find how to do that automatically in Pages templates.
    I saw earlyer answers to this question on this community, but they don't work as I expect, or only on earlier versions of pages.....  I trust there is an easy way to do this.
    Can someone help me please ?

    That function, present in "Pages 09" (i.e. Pages 4.3) , was not included in Pages 5.0-5.1.  (Nor were nearly 100 other such features, from mail merge and bookmarks to non-contiguous text selection, 2-up page viewing and the ability to set alternating left/right margins, headers & footers.Version 5.1 is also notably buggy. One work around, or partial work around, is to click the file name at the top of the window document. You can then select the filename, copy it  and paste it whereever you like. As far as I can see, however, there is no way to include the path: all you get is the filename and extension.

Maybe you are looking for