How can I extract cursor coordinate in Adobe Photoshop for use in Action script?

What I want to do in Photoshop (version CC, but I think this applies to any version) is label a point using count tool under my mouse's current position, and label it multiple times (for different labels). I have an action that essentially does this:
(1) Add to count (under one label) (2) Switch to second label (3) Add to count (under second label) (4) Switch to third label (5) Add to count (under third label)
And the problem is that I need to be able to have a variable in the action script that uses the cursor's current position (X and Y numbers) on the canvas to set these three points when the macro is activated. Currently I am only able to record the script using constant X, Y values (the same point is labeled over and over when I play the recorded action). I am able to extract the code for the action for editing (via xbytor2's suggestion in this forum:https://forums.adobe.com/thread/696989) and I see where the variable can go, I just don't know what exactly to put in place of the constant X, Y values that will let Photoshop input the mouse's current coordinates...
Any ideas? Much appreciated!!

You could use the pen tool set to path and create a single dot, then run the script to get the cursor positions and use that in your script.
var strtRulerUnits = app.preferences.rulerUnits;
var strtTypeUnits = app.preferences.typeUnits;
app.preferences.rulerUnits = Units.PIXELS;
app.preferences.typeUnits = TypeUnits.PIXELS;
var doc = activeDocument;
var workPath = doc.pathItems.getByName("Work Path");
var pos = workPath.subPathItems[0].pathPoints[0].leftDirection;
$.writeln("x = " + pos[0] + " y = " + pos[1]);
doc.pathItems.getByName("Work Path").remove();
app.preferences.rulerUnits = strtRulerUnits;
app.preferences.typeUnits = strtTypeUnits;

Similar Messages

  • How can I download complete Version of Adobe Reader for offline installation?

    How can I download complete Version of Adobe Reader for offline installation?

    From http://get.adobe.com/reader/enterprise/

  • Can I get a discount on Adobe Photoshop for mac if I own cs6 for windows?

    Can I get a discount on Adobe Photoshop for mac if I own cs6 for windows?

    It might be possible, though you will have to check with Adobe directly.  Normally, an upgrade involves going from a product to a product or from a suite to a suite, but not a product to a suite or vice versa.  And I don't know that this would be an upgrade since you are moving laterally rather than up.  I have heard of exceptions being made, so your best bet is to contact someone who has the ability to work out a deal with you.
    I am pretty sure that if you had a Creative Cloud subscription the question of Mac versus PC is moot as you can have installations for both machines with the subscription.  But Creative Suites are different animals.

  • How can I receive an invoice from Adobe instead of using a credit card?

    I would like to contiunue to use Photoshop, I have only aprrox 20 days left. I need to receive an invoice to the company where I work. I cannot be taken from my credit card. How can I do?
    /Sofi

    Adobe provides an email version of the invoice. You could ask if that would suffice or a printed copy of that email. If they want the email, then I would think the subscription would have to be in the companies name.

  • How can I extract data from ST03 - what tables are used?

    Hi
    I currently have to create performance statistics daily for management. To do this I use transaction ST03 and manually copy the previous days Dialog average response time, DB, CPU and GU av. times into a spreadsheet, and also the average dialog response time for 4 key transactions from the transaction profile.
    It would be nice to automate this. I was thinking of writing a basic ABAP program to query the relevant tables to extract this data - does anyone know which tables are used? I'd tried running a trace but it was not clear which tables/rows etc would be required.
    Thanks
    Ross

    Ok, that FM is an old one - for NW2004s (700) need to use 'SWNC_COLLECTOR_GET_AGGREGATES'.
    Have a basic program below. What I'm trying to do is get the average response time for transactions. I can get 'respti' from the table but I think this is the total response time - what field represents average response time?
    Also, the numbers that it's pulling back don't seem to match the numbers in ST03 at all... except 'dcount'. This seems to correct ly show the number of steps... but the other values don't match anything. What am I doing wrong?
    Program below...
    Cheers
    Ross
    REPORT  Z_GETSTATS.
    PARAMETER: day TYPE dats DEFAULT sy-datum.
    DATA: t_usertcode  TYPE swnc_t_aggusertcode,
          wa_usertcode TYPE swncaggusertcode.
    START-OF-SELECTION.
    CALL FUNCTION 'SWNC_COLLECTOR_GET_AGGREGATES'
        EXPORTING
          component     = 'TOTAL'
          periodtype    = 'D'
          periodstrt    = day
        TABLES
          usertcode     = t_usertcode
        EXCEPTIONS
          no_data_found = 1
          OTHERS        = 2.
      LOOP AT t_usertcode INTO wa_usertcode.
             WRITE:/ wa_usertcode-entry_id.
             WRITE:/ wa_usertcode-respti, wa_usertcode-procti, wa_usertcode-cputi, wa_usertcode-dcount, wa_usertcode-ucount.
             WRITE:/ '*************************************'.
      ENDLOOP.

  • How can we update or manage the Adobe Product for example Adobe Reader and Flash Player in a enterprise environment.  Enterprise lifecicle management

    We want to maintenance the adobe products in the enterprise environment. Specially Update for he reader and players.
    Thanks

    You will need to apply for both Reader and Flash Player Distribution agreements if you intend on enterprise deployments of these products.
    Adobe - Adobe Runtimes / Reader Distribution License Agreement
    If you are using SCCM and SCUP then use the available catalogs for both products.
    11   SCCM-SCUP — Enterprise Administration Guide
    Flash Player enterprise deployment | Adobe Developer Connection

  • How can I extract parts of the EXIF metadata to use in a Smart Collection?

    I want to aggregate all of the images I've captured by Capture Month and identify those images that were scanned or have no Capture Date.  This question actually attempts to open the door for read access to all of the image metadata and the ability to store some of it in user-identified fields which, somehow, the user will be able to populate.
    So - if the date fields (i.e. DateTime Original, DateTime Captured, DateTime Modified ) were broken down into, for example using DateTime Original:  Original Year-YYYY, Original Month-MM, Original Day-DD.  It may be possible to do this with a redefination of the schema used to define each of the fields.  That would be the simpliest, easiest way - if that's possible.
    If it isn't possible (or not in the near future, anyway) does anyone have any ideas?
    Thanks

    With over 45 years in IT (I know, it only means I'm an old man - not that I learned anything ), I observed that many of the problems I identified had simple solutions.  The reason they weren't in the original releases was, the testers felt "Why would someone want to do that?  Or need that data?  Or that field?"  Why would you hold an iPhone quite like THAT?
    Since Adobe defined the schema that captures the image metadata and defined what fields would be accessable and in what way; the most direct solution to this is to modify the schema through a redefinition of the date fields — all of them — so the individual elements are accessable.
    Also, because one of Lightroom's key features is image management, these new data fields should be accessible for Smart Collections.  There's at least one other person in this community who's interested in a By Month Across Year sort and I suspect many people don't speak up, even if they have a similar need.
    That's what I meant.  While outside developers (non-Adobe employees) might be able to come up with a patch for the solution, the underlying problem will still remain until Adobe acts.  Solving the problem is the less expensive means of dealing with the issue.
    I think.

  • How can I fix audio problems on Adobe Presentation? (Using Lion)

    I'm taking online classes and one of my classes, I'm having problems with the lectures. Sometimes when you open them, it says 'No Audio'. I have to refresh the page in order to get the audio to come back on. I updated my Flash and Java. Anyone have any idea about this? Other people in my class are having this issue too.

    YOu should probalby post on the Adobe forums:  http://www.adobeforums.com

  • How can I extract model dll information (inports, outports etc) using VeriStando API?

    Hi,
    I am working in a system that may run using the actual or modelled UUT. Besides this, it uses 3 heavy models running at 5 kHz.
    I am looking for a way to inspect the model dll and extract its information as System Explorer does when the model is included.
    Is it possible to do this using VeriStand API?
    Cheers,
    Cláudio H.
    CHCastro

    Hi Jarrod,
    This VI does what I am doing now but in a cleanner way.
    I made some changes to let it model independent.
    The point is: it is necessary to run the project to retrieve the model information. My feeling is that System explorer does this without run the project and this is what we would like to do.
    Other point: when we compile the model we fill the fields of information in "NI Information" which we want to retrieve. These information field are avaiable in system explorer during in4 creation.
    Is this possible?
    I am including the generic version of your VI that I changed.
    Cheers.
    Cláudio H.
    CHCastro
    Attachments:
    Simple LabVIEW API Example.zip ‏20 KB
    Simple LabVIEW API Example.zip ‏20 KB

  • How can I display the elapsed time of the course using Advanced Actions in Captivate?

    I have a Captivate course which is approximately 35 minutes in length. On each slide I would like to display to the user, the current elapsed time.
    EXAMPLE:
    25/35 minutes complete
    The 35 would remain static, so I have been working with the elapsed time system variable in CP: elapsed:$$cpInfoElapsedTimeMS$$
    I can't seem to get the variable to properly display the elapsed time in minutes, rather than miliseconds. Attached is a screen shot of my advanced action.
    Can anyone provide guidence regarding how I should structure this differntly?

    I talked about that Timer widget in that blog post and pointed to another one:
    http://blog.lilybiri.com/timer-widget-to-stress-your-learners
    If you are on CP7, you'll have this widget also as an interaction, which means it is compatible with HTML5 output. Amd there is also an hourglass interaction, with similar functionality but... did not blog about that one
    PS: Check Gallery\Widgets to find all widgets. Default path is set to Interactions

  • How can I export or convert to AVI file for use on PC?

    I know I did this back in Jan 2009 but can't remember the process to get an AVI file that retains the sound. I thought I exported a SWF and then somehow converted it to an AVI.
    *The file:*
    *Retains sound, builds and movement.*
    *Automatically advances, using "control p" to pause (did not retain the click-to-advance feature).*
    I've been reviewing third party software but they seem to all state that the won't retain the sound/builds etc.
    Any ideas?
    Thanks!

    The simplest way is to export as QT and then open the QT using Quick Time Player. If you've got pro you can export as .avi.
    There are videos on youtube showing you how to upgrade to QT Pro for free...

  • How can i create an ID without credit card for use in iphone?

    Am I able to create an ID without creditcard so that i can sign in in my iphone? how?

    Instructions here > Create an iTunes App Store account without a credit card

  • How can I trigger an automatic update of firefox for use with selenium?

    Firefox auto-update is not working on the server that I am working on. I am only able to update firefox by going to the menu|about page. I want to automate the update of firefox so that before I run my tests every night it will be updated to the newest version.

    You normally trigger an update check by opening the Help > About window.
    I don't know if you can trigger this action via Selenium.
    Otherwise you would have to check the update.xml file to see if updates are available.
    The Live Http Headers extension should give the URL after opening the Help > About window.
    *https://addons.mozilla.org/firefox/addon/live-http-headers/

  • How can I know which IP port is free for use?

    I am doing a internet project that the sender need to send voice at a port and receive the voice from another port.
    I want to assign the port to the send function and receive function automatically, so I want to use some API to determine which port in local machine is free and assign that one for the function.

    If you bind to port 0 the system will assign the next available port to you.

  • How can I extract certain pages from my document and save as another file?

    How can I extract certain pages from my document and save as another file?

    You would need Adobe Acrobat to do that, not Adobe Reader.

Maybe you are looking for

  • After IOS8 upgrade IPhone5s syncs with exchange but IPad2 syncs ONLY Mail and Contacts, NOT Calendar.  Totally stumped. Ideas anyone?

    After IOS8 upgrade IPhone5s syncs with exchange but IPad2 syncs ONLY Mail and Contacts, NOT Calendar. Also, my other tablet - Samsung TabS - has same issue - calendar wont sync. My IPhone and my desktop (windows) synch just fine. Google calendar sync

  • ALV TREE Report

    Dear all, I am currently working on a tree alv report. Here i have 3 levels of heirearchy each heirearchy level has different fields to be displayed. Can anyone please help me out how to build the fieldcatalog when the field changes for each heirearc

  • Good news: We won't have to put up with the poor i...

    http://thenextweb.com/uk/2011/08/08/the-bbc-launches-a-new-tv-friendly-version-of-iplayer/ It actually looks really good, check out the video. BTW: Yes, it does say HD in the images but there is no mention in the article or on the video.

  • Best Practices for Team Development

    Hi! I've a question regarding a project using JHeadstart 10.1.2. I've a small team that will work on a new project. 1. Which are the best practices to handle a project in a team environment? Besides using a version control system and so on. Is it adv

  • Oracle Business Intelligence - Past Due Schedule Value Aging report

    Hi, I am a beginner in Oracle Business Intelligence. There is an issue with 'Past Due Schedule Value Aging' report [this report displays order lines that are booked, but not yet fulfilled, and the date past the schedule ship date.]. Actually, the rep