release of contact information for selection

Good day to all,

First of all, I am so new in programming.

I learn just about a week (Java language).

I already have a code that indicates the coordinates of the selected area.

But output in the text file is x, y, x, y, x, y...

I want the output to be x, x, x, and y, y, y... in the new line.

Example:

In the code, the output is:

2,458,476,442,484,420,519,363,528,355,554,334 578,337,529,488,512,526,478,512,486,464,484,464,480,475,477,475,479,458,477,458,472,462,47

What I want is:

578,529,512,489,478,486,484,480,477,479,477,472,472,476,484,519,528,554

337,488,526,517,512,464,464,475,475,458,458,462,458,442,420,363,355,334

I mean the coordinates x are on the front line and are on the second line.

Here is my code:

#target Photoshop

var data = mapa_seleccion(activeDocument,data)

function mapa_seleccion(doc,out) {}

HS var = doc.historyStates;

preferences.rulerUnits = Units.PIXELS;

doc.selection.makeWorkPath (1);

var p = doc.pathItems ["Work path"];

var a = new Array();

var t = 0;

var l = p.subPathItems.length;

for (k = 0; k < l; k ++) {}

var n = p.subPathItems [k].pathPoints.length;

a [k] = new Array (n);

for (i = 0; i < n; i ++) {}

a [k] [i] = new Array();

a [k] [i] = p.subPathItems [k]. PathPoints [i]. Anchor;

}

}

var t = 0;

for (k = 0; k < l; k ++) {}

var n = a [k] .length;

var s = 0;

for (i = 0; i < n; i ++) {}

var j = (i + 1) %n;

s += (a [k] [i] [0] * a [k] [j] [1]);

s = (a [k] [i] [1] * a [k] [j] [0]);

}

s / = 2;

t = s;

}

doc.activeHistoryState = hs [hs.length - 2];

out = new Array()

out. Mapa = has

out. Area = parseFloat(t/doc.) Resolution/doc. Resolution * 2. 54 * 2. 54) .toFixed (2) //conv ierte a cm2

return on

}

Alert (data .mapa [0]);

Data .Mapa [0];

If ($.os.search(/windows/i)! = - 1).

fileLineFeed = "windows".

on the other

fileLineFeed = "macintosh";

var fileName = app.activeDocument.name

fileOut var = new File('~/Desktop/coords.txt');

fileOut.linefeed = fileLineFeed;

fileOut.open ("w", "TEXT", "");

fileOut.writeln (data .mapa [0]);

fileOut.close ();

Thanks to muyshangai for the codes.

And you guys thanks in advance

var data=mapa_seleccion(activeDocument,data);

function mapa_seleccion(doc,out){
  var hs = doc.historyStates;
  preferences.rulerUnits = Units.PIXELS;
  doc.selection.makeWorkPath(1);
  var p = doc.pathItems["Work Path"];
  var a = new Array();
  var t = 0;
  var l = p.subPathItems.length;
  for ( k = 0; k < l; k++) {
       var n = p.subPathItems[k].pathPoints.length;
       a[k] = new Array (n);
       for ( i = 0; i < n; i++){
            a[k][i] = new Array();
            a[k][i]=p.subPathItems[k].pathPoints[i].anchor;
            }
       }
  var t = 0;
  for ( k = 0; k < l; k++) {
       var n = a[k].length;
       var s = 0;
       for ( i = 0; i < n; i++){
            var j = (i+1)%n;
            s+=(a[k][i][0]*a[k][j][1]);
            s-=(a[k][i][1]*a[k][j][0]);
            }
       s/=2;
       t+=s;
       }
  doc.activeHistoryState = hs[hs.length-2];
  out=new Array()
  out.mapa=a
  out.area=parseFloat(t/doc.resolution/doc.resolution*2.54*2.54).toFixed(2) //conv ierte a cm2
  return out
}
// data,mapa is an array of nested arrays
alert(data.mapa.toSource());
// here is how to 'split' the x,y array of the first subPath
var xArray = [];
var yArray = [];
for(var i=0;i 
         

Tags: Photoshop

Similar Questions

  • Impossible to get hardware information for selected machine (Ubuntu 64 physical)

    Hello

    I need p2v a Ubuntu 10.10 64-bit physical and I get the error 'Unable to obtain information on selected hardware machine' busy.

    I have attached the log files, I also noticed that in the auth.log of the server when you try to make the conversiton, the following lines flow:

    1 dec 11:13:42 seg - dev sshd [9830]: password accepted root of x.xx.xx.xx port 63552 ssh2
    1 dec 11:13:42 seg - dev sshd [9830]: pam_unix(sshd:session): session opened for user root by (uid = 0)
    1 dec 11:13:42 seg - dev sshd [9830]: pam_unix(sshd:session): session closed for the root user
    1 dec 11:14:01 CRON seg - dev [9922]: pam_unix(cron:session): session opened for user root by (uid = 0)
    1 dec 11:14:01 CRON seg - dev [9922]: pam_unix(cron:session): session closed for the root user

    I don't see any failure to authenticate, and can the machine the converstion server runs on ssh to the machine to convert and open a session as root with question.

    I get the same error if I disable the linux Firewall service running on the machine (ufw).

    All in all this is a pretty simple vanilla LAMP server, but it does not convert. Help, please!

    Billy

    Hi Billy,

    I think I found the problem - it's in your/import/storage volume. If you look at the log of the sysinfo file it says

    -->

    If you look at the path of unity that's devicePath = "/ dev/cciss/c0d1 '. More late looking disks section in sysinfo exit disk c0d1/dev/cciss/c0d1 who has c0d1/dev/cciss/c0d1p1 partition there. This means that any * disk * is used as a volume, but not only the partition. Unfortunately the converter does not support these configurations. What happens is it trying to fill in the hardwareInfo.storage.volume.diskId for each volume and assumes that each volume is a partition on a disk or an LVM logical volume. As for volume/import/storage , none of them are true (it is a partition or a logical volume) hardwareInfo.storage.volume.diskId is left not defined, and this is the error reported later:

    2011-12 - 02T 10: 35:20.989 - 05:00 [198536 error 'Default'] not initialized: converter.info.ComputerHardwareInfo hardwareInfo.storage.volume.diskId

    I can think about is to run the conversion again and try to deselect the/import/storage volume, convert the operating system, and after (if) the conversion is successful, you can start the target, manually re-create the volume/import/storage , and then copy the data from the source.

    Hope this helps,

    Ivan

  • Contact information for user browser card window

    Hello

    Say, for example, the map is displayed in the browser (height x width) for example: 300 x 250. I got the centerX and CenterY values of the map using the Javascript API. I want to get the top left and bottom right coordinates of the map window. Is there a Javascript method that can help get these values.


    Thank you

    Published by: user5108636 on 04/12/2010 18:51

    Hello

    MapViewer javascript api has two functins, that you can use for contact information:

    1. to a point, use MVMapView.getMapCoordinates (screenXY)

    2. to get the bounding box of the mapwindow use MVMapView.getMapWindowBBox)

    Both will give you an MVSdoGeometry object.

  • Contact information for the user

    Hi, I want to access the application to the personal data of the users. Name, phone, email, etc... How can I get this information?

    As far as I know, you will not be able to access "contact information" unless you embed a form in the application are users to fill in the details themselves (sharing of personal data and the extraction is illegal in some countries). You can create an HTML form and use in your folios where end-users can fill the data itself and create a 'Submit button' who sent you the details.

  • BlackBerry Smartphones Can I retrieve contact information for a database without the BlackBerry

    This is my story - a couple of weeks, I dropped my 8130 Pearl in a large cup of water. After miraculously, he came back to life, I decided that it was time to SAVE my contact... information so I used the version of the office for 4.3.0.17 Manager do... Only, I clicked on "Addresses", which I guess means contacts. I joke that my poor BlackBerry not - the VERY NEXT DAY, went into the pool with me. Now, despite the fact that I just mentioned after swimming, I actually do not lead a lavish lifestyle... I live in the desert, and I had to enter my poor toddler, overheated in the pool as soon as possible. I have no cell phone insurance, but I don't have the $50 deductible to get a new BlackBerry. Now I use a Casio g opportunity ' Boulder area. I had so much contact info, I need. So, here is my question. Is there a way to convert information database (IPD file) I saved in a word document, or other legible form so I can get all my contacts?

    Thank you in advance,

    Crystal

    Crystal, Hello and welcome to the Forums of Support BlackBerry.com.

    Yes, google search for ABC Amber IPD Converter and use it. It is not free, but the trial software will manage a limited number of records.

    If you end up having a new BlackBerry, you can restore this backup IPD file on your new device.

  • Transfer photos and contact information for the razr of motorola (V3) to my computer using the usb connection

    I need instructions step by step to transfer my info and contacts, photo, and waiting for a cell phone motorola razr V3 I dropped and now the screen is white. I am on an acer inspire laptop which uses windows 7.

    I need instructions step by step to transfer my info and contacts, photo, and waiting for a cell phone motorola razr V3 I dropped and now the screen is white. I am on an acer inspire laptop which uses windows 7.

    Hi Trey

    If the phone is damaged, it is something you will need to contact the Motorola Support for the information you are looking for. Here is the link.  Motorola support
    I hope this helps.

    Thank you for using Windows 7

    Ronnie Vernon MVP
  • Contact information for installation of blackBerry Smartphones.

    I recently purchased the Blackberry Torch; the numbers were transferred over my old Blackberry Pearl phone.

    One of my many Contacts had NO code appearing in front of the 7 - digit telephone number.  I tried to text him and of course, she came back with the error message.  I went and edited the number to include the area code (made a 10-digit number) - and I still get the same error message.

    I deleted this contact 3 times and entered its data with different names - but the same phone with all the 10 listed numbers - and I still get an error code when I text.  I just listed the number under the 'work' instead of 'mobile' - always impossible to send text.

    I called him - no problem; He can call me - no problem; He can text me - no problem; I just can't text or make a text.

    What is going on?  Does anyone have a solution for this?

    Smartphones Dang sure too!

    OK, sounds similar to something that happened to me last week, I tried to call a number instead.

    Look at your call history, by accessing your Messages folder > press Menu > folders > phone call logs and you will need find and remove all previous attempts to call this number.

    Also, in the same place, watch sending SMS and delete all previous attempts of SMS.

    Your device "to remember" and use these previous calls to that number as a story of several parameters and if you remove all the people, I would then do a full restart on the device, in this case > with smart BlackBerry poweredphone, remove the battery for a minute and then reinsert the battery to restart. A reboot in this way is prescirbed for most the gltiches and operating system errors, and you will lose any data on the device doing so.

    Now, after, you have removed all instances of old of the call/SMS and restarted, try again.

  • How to find contact information for vcenter

    I would like to get all the info from vcenter as below

    Name Version Release of Build Setup Version

    vCenter Server 5.5 updated 3A5.5 U3a2015 10-2231421963154313

    I did google but have not found powercli which can find it

    The cmdlets for this?

    Thank you

    Sorry bad google search

    Download the Version of vCenter using PowerCLI

  • Contact information for return pixel Imaq image with the mouse click event

    Hello

    I'm trying to get the coordinates in pixels of an image Imaq based on a mouse click event, similar to this post and this post. The problem is that with the first post, I get the coordinates in the image control and hesitate to trust them, they seem to have the Center origin, may return negative coordinates and do not represent the actual size of the detector that I use (512 x 512). It also returns the coordinates outside the actual data when it is clicked on the image control framework. The second method returns simply null coordinates. What I want are the coordinates of the pixel displayed when hovering the mouse imaq image control framework.

    What baffles me, is that I tried the second method with a png stock file and it works fine, it is only when I create an image from the data of my camera than the coordinates are returned null. Note data views of camera under control of image very well.

    Any ideas would be useful. Enclosed is a picture of the offending code and the Panel before displaying the camera data is coming (I know it needs some cleaning).

    Thank you

    Tyler

    for help, please send your vi

    but I think that this example vi is your solution

    check this vi

  • contact information for signature for when I send mail.

    need counseling to addeding my details on all my emails out, I get lost reading all quick you offer.

    You use the same method that I posted in the previous query.

    In your e-mail client, press F1 and search for 'signatures', click 'Add signatures' or similar.

  • Contact information for InvokeRequest

    I try to get the coordinates when share contact chose to contacts and my app has been invoked.

    onInvoked is called, but I can't understand how to get the Contact of the InvokeRequest that I receive as an argument.

    That's what I tried...

    void ApplicationUI::onInvoked(const bb::system::InvokeRequest& invoke)
    {
        qDebug() << "oninvoked";
        Contact contact;
        ContactService cs;
        cs.contactFromVCard(QString(invoke.data()));
        qDebug() << "name: " << contact.displayName();
    
    }
    

    But it seems to be wrong, how to do what I'm doing?

    If you call uri(), then you can see the URL to the local file

    request.uri()
    

    This can be converted to the local file path:

    request.uri().toLocalFile()
    

    All you need now is to open the file and get all your data

        QString localpath = request.uri().toLocalFile();
        qDebug() << "localpath = " << localpath;
        QFile file(localpath);
        if (file.open(QIODevice::ReadOnly | QIODevice::Text))
        {
           QTextStream in(&file);
           while (!in.atEnd()) {
              QString line = in.readLine();
              qDebug() << line;
           }
        }
    

    This isn't the perfect solution, but it should work

  • Contact information for export

    We have 10,000 PSD files that contains several layers. The PSD contains the photo of the product.

    1 of these layers, a red dotted line was created (to indicate the area where we want to put a sticker). Is it somehow possible to export the information from these PSD files in which we can find the coordinates of these red dotted lines and their width and height information?

    Yes, with the scripts. Are all these layers with the same line? I've got "move your scripts Photoshop forum post.

  • Contact information for travel after registration

    Hello

    Need help here I think.

    Not sure if I'm doing something wrong or if it's a bug.

    I create a drawing pixel-like using squares of 1 mm, must be very specific.

    Go through this process...

    -J' have a file .psd as an image of background reference (black on the attachment).

    -0 / 0 leaders

    -have a grid of 1 mm in place

    -place my first pixel to an integer x / coordinate

    -then object > transform > move in integer numbers

    -then start to create the illustration (magenta squares)

    -every now and then I'll check the coordinates of the individual squares and all looks fine

    Save the document

    Then come back that which was 25 on the x axis is now 25.002 and similarly for the axis y.

    Tried with and without the grid, with and without the snap to grid... all with the same results.

    Can anyone help?

    See you soon

    Mick

    Screen Shot 2014-10-13 at 13.19.32.png

    It should give you integer values overall, Mick.

  • Contact information for locking?

    Can Photoshop lock coordinated to avoid deformation during image measurement?

    I have a logo file that I make available to users of the various editing capabilities. Can I lock the coordinates X and Y so that the image can not be accidentally distorted during scaling manually?

    Thank you very much

    Meervaldo!

    This has nothing to do with the image, these are functions of the program which cannot be controlled. Even if there is a way to do in PS by a metadata tag, other users might still just use another tool and even distort the image.

    Mylenium

  • Contact information for text in TextArea

    I am writing a custom control that extends a text box and provides IDE-style AutoComplete functionality. To do this, I need to position a menu drop-down below the beginning of the word being modified.

    So, I need x and is coordinated to a specific index in my TextArea. I was hoping some kind a TextRange object would give him to me, but it's not.

    Any suggestions?

    The textField to text objects property has an getCharBoundaries method. This property returns a Rectangle object describing the coordinates of a nth character in the text.

    I used this to draw rectangles that cover certain words in a textArea. By getting the rectangle of the first and the last charcters of the word, I could calculate the necessary coordinates from that. The main statements were of this form:

    var myRect1:Rectangle = myTextArea.textField.getCharBoundaries (n);

    where n is the index of character.

    I'm pretty new to Flex and do not know if there is another way to achieve this. If there is, I'd love to hear.

    Concerning

Maybe you are looking for

  • is it possible to have the recipients to vote?

    just wondering if you can add a feature to vote by e-mail? beneficiaries to vote on a question and then send it back to the original sender. similar to outlook. Thank you

  • HP Pavilion dv-7

    my bluetooth headset would automatically sound too itself when turned on but now I too manually swith above using the volume also icon now blue tooth of the counter has disappeared from the sound box

  • Repairs of Smartphones blackBerry media card

    PLS HELP!I jes had a bb 9790, I used 3 different memory within a week of purchase cards, first who I am, I tried to copy the files from my laptop on my memory card and after 2 h abt I restarted only display-"Media card contains a few errors, repair"

  • Why no HP Toolbox installed?

    HP LaserJet P2055dn LAN networking with Win 7 SP1 and XP SP3 Bought and installed in early March 2012 Installed off the CD (PITA) for Win XP and HP Toolbox is installed and available in the task bar. Installed on the CD for Win 7 and the drivers are

  • "Insert" option is disabled in the context menu for the XQuery Mapper

    In regards to the XQuery Mapper fails when you drag from the Source to the target (Doc ID 1962165.1()Insert option is disabled in the context menu due to a complex type in the XSD. How this complex type can be mapped if the target instance must be cr