Can you ask the user to select a point?

Is there a way in a javasript to ask the user to select a point and then get that information back as an X and Y value?
Eric

One way, if you have cs4, is have the user drop a color sampler. Then you could do something like this
app.activeDocument.colorSamplers[0].position;// get the position
app.activeDocument.colorSamplers[0].remove()// remove the sample

Similar Messages

  • JFileChooser, how can you allow the user to select MORE than 1 file?

    Hello everyone.
    I want to allow the user to select multiple files from a directory, not just 1, but not just the whole directory.
    Currently I see these 2 options from looking at the sun's JFileChooser demo:
    //Create a file chooser
            fc = new JFileChooser();
            //Uncomment one of the following lines to try a different
            //file selection mode.  The first allows just directories
            //to be selected (and, at least in the Java look and feel,
            //shown).  The second allows both files and directories
            //to be selected.  If you leave these lines commented out,
            //then the default mode (FILES_ONLY) will be used.
            //fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
            fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);but both don't allow the selection of more than 1 file.
    When I say, select more than 1 file I mean the user can hold in SHIFT or CTRL and select files.
    Any ideas how to do this?
    Thanks!

    http://java.sun.com/javase/6/docs/api/javax/swing/JFileChooser.html#setMultiSelectionEnabled(boolean)
    Cheers,
    Laird

  • How can i ask the user only once using Vectors?

    What i am trying to do is get an index of a vector.
    I know that i have to use the elementAt(int), but what i want to do is
    make it so only one screen pops up instead of all 4 of them.
    I just want to ask his custID and from there look up the users information from the Vector. I cant get rid of the variables in the public Employee (see Employee Class) or else i will not be able to get the other information (delete a JOptionPane and you will see what i am talking about). Dont worry about the int int the elementAt part. I figured that out already.
    public class Employee {
    // class constants
    // Data fields
    private String custName;
    private String custAddress;
    private double rate;
    private int custID;
    private double steve;
    public Employee(int id, String name, String adress, double ra) {
    custName = name;
    custAddress = adress;
    rate = ra;
    custID = id;
    public String toString() {
    return "Customer ID: "+ custID + "Customer Name : " + custName +
    "Customer Adrress" + custAddress + "rate: $" + rate ;
    public int getBalls(){
    return custID;
    public String getBallsy(){
    return custAddress;
    public double getRate(){
    return rate;
    the other one...
    package bars;
    import javax.swing.JOptionPane;
    import javax.swing.*;
    import java.util.*;
    public class EmployeeApp {
    //methods
    private static int readInt (String prompt){
    String numStr = JOptionPane.showInputDialog(prompt);
    return Integer.parseInt(numStr);
    private static double readDouble (String prompt){
    String numStr = JOptionPane.showInputDialog(prompt);
    return Double.parseDouble(numStr);
    public static void main (String[] args){
    //read and store the payroll data in an employee object
    Vector programmers = new Vector();
    for (int i = 0; i < 1; i++) {
    Employee programmer =
    new Employee(
    readInt("Enter Customer ID: "),
    JOptionPane.showInputDialog("Name: " ),
    JOptionPane.showInputDialog("Address: "),
    readDouble ("Enter hourly rate: ")
    int steve = programmer.getBalls();
    int bob = steve;
    programmers.add(programmer);
    System.out.println("here: " + steve);
    System.out.println(programmers.toString());

    A vector probably isn't your best bet. Try a Map, a TreeMap if you want them in order, otherwise a HashMap. Use new Integer(customerId).
    Map custMap = new HashMap(20);
    custId = readInt("Enter customer ID");
    custIdI = new Integet(custId);
    Employee emp;
    if(custMap.contains(custIdI)) {
        emp = (Employess)custMap.get(custIdI);
        ... old employess
       } else {
        emp = new Employee(....);
        custMap.put(custIdI, emp);
       }If you use a vector you'll have to search it with a look of your own for a matching id.

  • Can you change the color of selected text in word?

    I use Word 2010, and when I select text it is always blue, is there a way to change the color?

    I use Word 2010, and when I select text it is always blue, is there a way to change the color?
    My earlier posting was an error.
    I apologize.
    You seem to be saying that the default colour for text is blue.
    You need to change:-
    Normal.dotm
     - to change the default colour of text.
    In order to change the default colour of text take the following steps (that were tested on Windows 7 and Office 2007 - the process should be
    similar, if not identical, for yourself):-
    1. Open a new blank document (this should
    have the default text as blue).
    Save that document with a new name for example:-
    c:\word\testing_aug_25_2014_2
    2. In the above document:-
    Insert tab
    Text group
    Click on the drop down arrow to the lower right of:-
    Quick Parts
     - then click on:-
    Field . . .
    The:-
    Field
     - window should open.
    3. In the:-
    Field
     - window in the field called:-
    Field names:
     - scroll down to:-
    Template
     - and click on that option so that it's highlighted in blue.
    Now, towards the top right hand corner of the same window, click in the box called:-
    Add path to file name
     - so that it has a tick (check mark) in that box.
    Click:-
    OK
    The file name of the template should now be inserted into your document.
    On my machine this was:-
    C:\Users\user_name\AppData\Roaming\Microsoft\Templates\Normal.dotm
    The above path might be different for you.
    4. I saved my document at this point.
    5. Now open the file called:-
    C:\Users\user_name\AppData\Roaming\Microsoft\Templates\Normal.dotm
    A document should open on your screen (still with blue text) and with:-
    Normal.dotm
    - in the middle of the Title Bar at the top of the screen.
    Highlight all of the text in the document so that it's (for example) black.
    Save the file.
    6. Close all open documents in WORD and
    close WORD itself.
    7. Now open a new document and its default
    text should be set to the colour that you applied at step 5. above (I used black at that point).
    Does that resolve your problem?

  • How can you play the project from a certain point without having to watch it over from the beginning?

    I'm doing a project on iMovie and whenever I want to replay it replays from the beginning not from the point in the project that I would like to preview it from. How can I change this?

    Move the playhead to wherever you want to start then press the space bar.
    Geoff.

  • Create a dynamic stamp that ask the user to choose the icon to show

    I need to develop a interactive stamp.  The user should be able to enter text and a graphic that shows in the stamp.  I have been able to make this work when the stamp file is open but it would not work if I only have open the document in which I'm going to place the stamp.
    var cAsk = "Enter Exhibit Number" ;
    var cTitle = "Exhibit Number:  ";
    if(event.source.forReal && (event.source.stampName == "#eNVzyyEc8k0TPW34bdjlxB"))
      var cMsg = app.response(cAsk, cTitle);
      event.value = cMsg;
      event.source.source.info.exhibit = cMsg;
      var a = this.getField("Sign");
      a.buttonImportIcon()
    The user enters the exhibit number and then should be able to browse for an icon to be shown in the button "SIGN".  As I said, this works if I have the stamp pdf file open.  However, when I close it, it does not ask the user to select an icon.  It only ask the user for the exhibit number.  Any ideas why this is happening and how I can make this work?  Even if I have to open the stamp pdf file in the background to make it work.
    Thanks!

    You have to first configure a text field so it can be used for file selection. You do this on the Options tab of the field properties dialog. In order to select the corresponding check box, make sure only the "Scroll long text" option is selected.
    You then can set up a button that has the following JavaScript attached to the Mouse Up event:
    // Mouse Up script for button
    getField("upload_text_field").browseForFileToSubmit();
    Replace "upload_text_field" with the actual name of the file selection text field.

  • How can a jsp page tell which Oracle Responsibility the user has selected?

    We have two responsibilities - Timecard Administrator and Timecard Viewer. Everything that they can access is the same, except for one particular jsp page which we want to present a slightly different view if the user's responsibility is Timecard Viewer (specifically, the edit link in the results page will be suppressed). Unfortunately in order to implement this, the jsp code needs to be able to distinguish which of those two responsibilities the user has selected. I have written jsp code to print all the environment variables and unfortunately the environment is essentially identical regardless of which of the two responsibilities the user selected.
    How do I pass in the active responsibility to that page/environment in a way that can be tested by the jsp code?
    Thank you,
    Graham Toal <[email protected]>

    Yes, I tried something like this (shortened to the basics for this post):
    <pre>
    sqlQuery="select responsibility_name from fnd_responsibility_vl where responsibility_id = FND_GLOBAL.RESP_ID";
    stmt=con.createStatement();
    rs=stmt.executeQuery(sqlQuery);
    int field_count=rs.getMetaData().getColumnCount();
    while (rs.next()) {
    for (int i=0; i<field_count; i++) {
    logger.write("Responsibility: "+rs.getObject(i+1),"JSP",objName,0,-1,1001);
    </pre>
    However it did not print any results at all.
    I'm trying a different approach at the moment - I've cloned the menus from the Administrator responsibility to the new Viewer responsibility, and have altered the top-level menu so that I can insert a new variable into the process state myself; that way by the time the user navigates to the changed page, there should be a variable there that can be tested.
    Unfortunately the top-level menu isn't just a simple menu, it's a piece of code that issues an HTML redirect depending on the parameter passed in - which is set in the Oracle function screen for the function attached to that menu.
    (was something like utpa_top_menu.jsp?ADMIN and I changed it to utpa_top_menu.jsp?VIEWER, with appropriate tests for the new module name:
    <tt>
    else if ("VIEWER".equals(moduleName))
    url = "/utpa/jsp/admin_reports-viewer.jsp";
    </tt>
    In admin_reports-viewer.jsp I've added <tt>session.putValue("REPVIEWER","y");</tt> and in the actual target main page I have:
    <pre>
    if (session.getValue("REPVIEWER") == "y") {
    // viewer
    out.println("<CENTER><B>You are using the Timecard Viewer responsibility</B></CENTER><BR>");
    } else {
    </pre>
    And although the URL bar at the top of the screen is displaying the correct (redirected) URL, the page that is displayed is blank. Completely empty. 0 bytes. The file is present on the filing system; has content; has the correct ownership and permissions; I've reloaded apache, even had the systems guys reboot completely. I'm at a loss :-/
    Graham

  • Can you merge two user accounts on macbook? my wife has created a user on her new macbook , then inadvertently created a second one when using the migration tool. 1st ac has her office 365 install, yet 2nd has her itunes database, docs and contacts.

    Can you merge two user accounts on a macbook? my wife has created a new user on her new macbook air then, inadvertently, created a second one when using the migration tool. 1st a/c has her office 365 install, while 2nd has her itunes database, docs and contacts. What is the best way forward to get everything into the one account? Not sure if the office 365 will allow another installation into the second account, otherwise would just do that and delete the first, if that is possible?

    There is no merge but you can move data from one account to another via the Shared folder. Data is copied from Shared. Watch your free space when copying. These are large files.  Do one at a time if you are on a small drive. After making copy, delete from other users before you start next copy.
    Office365 installs in the main Applications folder and is available for all users on the computer. Activation is tied to the drive not the User.

  • How can you change your line access selection?  I have found where you can change your plan selection, but can you change the line access fee or is that a set amount?

    How can you change your line access selection?  I have found where you can change your plan selection, but can you change the line access fee or is that a set amount?

        DIVAB71,
    Great question. The line access fees for the account are a set amount and can not be changed unless you are going from a basic to a smartphone or vice versa. If you are wondering about adding the month to month discount if you are out of contract Ann154 has provided great information on how to access and add the feature.
    LindseyT_VZW
    Follow us on Twitter @VZWSupport

  • I pay for upgrading ifindyou and it doesn't work!!!! it clearly says that it tracks only your mobile in the lite version, after you ask the upgrade for all the mobile... can we call this a fraud????

    i pay for upgrading ifindyou and it doesn't work!!!! it clearly says that it tracks only your mobile in the lite version, after you ask the upgrade for all the mobile... can we call this a fraud????

    Hi,
    "A day after the name change became official my built in skydrive app stopped working"
    Did you point that SkyDrive changed to OneDrive?
    Did you move your OneDrive to another location or change its name?
    Please login OneDrive with web-based to check if you could access it successfully.
    Please refer to the following article to try the troubleshooter and check the service status:
    SkyDrive: FAQ
    http://windows.microsoft.com/en-in/windows-8/skydrive-app-faq
    Karen Hu
    TechNet Community Support

  • Can you export the date and user to Excel that appears into a Comments field in a tracking list?

    Hi everyone,
    Can you export the date and user to Excel that appears into a Comments field in a tracking list?
    When i export a tracking list with a Comment field in the Content type, the screen where you enter the data for an item, the Comments field just export the text of the comment into the Excel file.
    In the Comments field appears also, besides the comment text,  the user and date from who and when the comment is added.
    Is there a way to export also the user and the date?
    Thanks
    Wim

    create another comment field that doesn't use 'appending', and through SP Designer change workflow keep
    updating that field with the new comments  (prepend the field with date/username/new comment). Hide the field on all forms, but put it in the view you need to export to Excel.
    Please refer few more links: Hope they will help
    http://www.nothingbutsharepoint.com/2009/04/16/versioning-append-changes-to-existing-text-view-entries-aspx/
    http://sympmarc.com/2011/02/07/showing-all-versions-of-append-changes-to-existing-text-in-a-data-view-web-part-dvwp/comment-page-3/
    https://mossipqueen.wordpress.com/2013/03/06/display-all-appending-field-entries-in-a-single-list-view/
    http://community.office365.com/en-us/f/154/t/278560.aspx
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • On Yahoo Mail...and ONLY Yahoo Mail..I get a 404 error after entering my user name and password. This doesn't happen with IE, just Firefox, and just Yahoo Mail. Yahoo was absouletly no help whatsoever; can you solve the mystery? Thanks

    On Yahoo Mail...and ONLY Yahoo Mail..I get a 404 error after entering my user name and password. This doesn't happen with IE, just Firefox, and just Yahoo Mail. I tried uninstalling and reinstalling FF; no change. Yahoo was absolutely no help whatsoever; can you solve the mystery? Thanks

    HI Emmet,
    thanks so much for your posts back. I really appreciate it and yes that does help to know that you could not get it working.
    I did have some success, in removing the SSL Authentication checkbox in the smtp server settings - I found that this allowed my friend to be able to send mail from the mail app via his sbcglobal (yahoo) account.
    So that did help but of course the messages do not have ssl encryption and I'm not sure how big a deal that is for an individual. He is able to receive mail but unless the SSL authentication box is unchecked, he cannot send.
    i hope that helps anyone out there also!
    Thanks also for the tip about sparrow - yes I have heard of it and it is very popular, he may end up using that in the end.    
    Thanks again, much appreciated.
    Felix    

  • Can you limit the amount of data accessed per user on an AirPort Extreme?

    Can you limit the amount of data accessed per user on an AirPort Extreme?

    Your question was whether the AirPort Extreme is able to establish data limits per user.
    If you add another router that has this type of capability or install software on another router, then you will be able to establish data limits for each user. The AirPort Extreme will have no control over this.

  • Sent iphone 5 3x for repair ( 1 repair and 2 replacement ) in a span of 2 months.. And i just ask apple care to extend the warranty of my replacement iphone 5 for 6 month, i mean how can you trust the 2nd replacement if the 1st replacement didnt last long

    Sent iphone 5 3x for repair ( 1 repair and 2 replacement ) in a span of 2 months.. And i just ask apple care to extend the warranty of my replacement iphone 5 for 6 month and they reject it,  i mean how can you trust the 2nd replacement if the 1st replacement didnt last even for just 1 month? Really dissapointed!!

    No, really just want to voice out my dissapointments with apple care.. Im just really ****** off..

  • HT3965 Can you add multiple user profile to the iPad

    Can you add multiple user profile to the iPad

    Hi Friend,
    Apple devices are developed for single users.
    Hope it helps

Maybe you are looking for