[JS CS3] How to select Selection Tool

Hello,
At the end of a script I wish to return to the Selection Tool (black arrow). Now the Text tool is active because the last thing the script did was to create a text frame. I do not see any property I can use to invoke the selection tool.
Thanks,
Tom

The following script gives the distance between two parallel guides and places that distance on the clipboard. For whatever reason I always end up with the Text Tool as the active tool.
var arrGuides = app.selection;
var docUnits = findDocUnits();
selectOnlyGuides();
switch(arrGuides.length){
        case 0:
        alert("Please select two parallel guides. \r\rYou did not select any.");
        break;
        case 1:
        alert("Please select two parallel guides. \r\rYou selected only one.");
        case 2:
        twoGuidesSelected();
        break;
        default:
        alert("Please select only two parallel guides. \r\rYou selected three or more.");
        break;
        }//end switch
arrGuides[0].select();   
arrGuides[1].select(SelectionOptions.ADD_TO);
//******FUNCTIONS************       
function findDocUnits(){
    if(app.activeDocument.viewPreferences.horizontalMeasurementUnits !=app.activeDocument.viewPreferences.verticalMeasurementUnits){
        alert("The vertical and horizontal units must both be either inches or picas. Please check the Preferences and set them the same.");
        exit();
        }//end  if
    else{
    var currentUnits = "";
    switch(app.activeDocument.viewPreferences.horizontalMeasurementUnits){
        case MeasurementUnits.INCHES:
        case MeasurementUnits.INCHES_DECIMAL:
        currentUnits = "inches";
        break;
        case MeasurementUnits.PICAS:
        currentUnits = "picas";
        break;
        default:
        alert("Your document should be set in only inches or picas. Please check the Preferences.");
        break;
        }//end switch
    }//end else
return currentUnits;
}//end function findDocUnits
function selectOnlyGuides(){
try{
    for(var i = 0; i< arrGuides.length; i++){
        if(arrGuides[i].constructor.name != "Guide"){
            var alert1="Please select two parallel guides and no other elements.";
            alert(alert1);
            exit();
        }//end try
            }//end if constructor.name
    }//end for
catch(e){
    alert(alert1);
    }//end catch
}//end function selectOnlyGuides
function twoGuidesSelected(){
    //testing to see if perpendicular guides have been selected by user.
    try{
     if(arrGuides.length==2&&(arrGuides[0].orientation==HorizontalOrVertical.vertical&&arrGuides[1].orientation==HorizontalOrVertical.horizontal)||(arrGuides[1].orientation==HorizontalOrVertical.vertical&&arrGuides[0].orientation==HorizontalOrVertical.horizontal)){
        alert("Please select two parallel guides. \r\rYou selected two perpendicular ones.");
        }//end  if; test for perpendicular guides
    //testing if only horizontal or vertical guides have been selected. If yes, tell difference.
     if(arrGuides.length==2&&(arrGuides[0].orientation==HorizontalOrVertical.vertical&&arrGuides[1].orientation==HorizontalOrVertical.vertical)||(arrGuides[0].orientation==HorizontalOrVertical.horizontal&&arrGuides[1].orientation==HorizontalOrVertical.horizontal)){
        var deltaDistance = Math.abs((arrGuides[0].location)-(arrGuides[1].location)).toFixed(4);
        alert("The distance between the two guides is: "+deltaDistance+" "+docUnits+".\r\rThis figure is now on your clipboard if you want to paste it.");
        var numToCopy = deltaDistance;
        copyNum(numToCopy);
    }//end if; test for parallel guides.
}//end try
catch (e){//do nothing
    }//end catch
return arrGuides;
}//end function twoGuidesSelected
function copyNum(numToCopy){
var framePropRecord = {contents:numToCopy.toString()}
var myTextFrame = app.activeDocument.textFrames.add(framePropRecord);
myTextFrame.parentStory.texts[0].select();
app.copy();
myTextFrame.select();
myTextFrame.remove();
    }//end function numToCopy

Similar Messages

  • How to select tool when url is wrong?

    In order to watch some vid streaming, I loaded the vshare plugin. It does what it's supposed to do but also has inserted a toolbar (which I can not display) but when I enter a URL that can't be found, I get a page from vshare.
    Can I; how? change this to another search page?

    No. In finder hold down the option key and in the GO menu select Library. In the window that appears Open the  Preferences folder then scroll down and find com.apple.iMovie.plist and com.apple.iMovie LSSharedFileList.plist and drag them to the trash. Do this with iMovie closed. Thenreboot and relaunch iMovie.

  • How do i get my direct selection tool to work properly?

    using adobe cc 2014 and all of a sudden the space bar does not turn the direct selection tool into the hand to drag a pasteboard.
    it seems universal across the above programs
    amazing how such a little thing kills productivity

    spooney,
    As I (mis)understand the issue, you may try the list.
    The following is a general list of things you may try when the issue is not in a specific file, and when it is not caused by issues with opening a file from external media. You may have tried/done some of them already; 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    If possible/applicable, you should save current artwork first, of course.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to at least 5 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible), for CS3 - CC you may find the folder here:
    https://helpx.adobe.com/illustrator/kb/preference-file-location-illustrator.html
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall (ticking the box to delete the preferences), run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • How do i change the default hand tool to select tool when a document opens?  also how do i get it to open in a single page view instead of 2 pages side by side

         how do i change the default hand tool to the select tool when i open a document.
    how do i change the view from 2 pages to a single page?

    Try setting the check boxes in Edit>Preferences>General for the following:
    - Make Hand tool select text & images
    - Make Hand tool read articles
    - Make Hand tool use mouse-wheel zooming
    Adjust these as needed but does it make any difference?

  • How do I get rid of the Red Thing that's obstructing my selection tools?

    I have just installed Elements 12 (on a Mac using OS 10.9.5).  Every time I use the selection tools I get a rectangular red window that covers the selected area.  This serves no purpose that I can see and is a disruptive annoyance.  How do I get rid of the $%^&&* thing???

    It looks like this.    MH

  • How do I turn off preview of hidden areas when dragging an image in frame with Direct Select Tool?

    CS5, Not sure how to word this...
    In previous version of ID, if I had a graphic in a frame, I could drag the image around inside that frame with the Direct Selection Tool.  I can still do this with CS5 but it seems to want to show the entire image in a ghosting way that is outside of the frame.  Is there a way to turn this preview type look off like it was in previous versions?  I feel like its slowing my computer down bigtime because I am dealing with a large image.  Everytime I click to drag it, everything slows to a crawl and unusable.

    Go to the Prefernces and set Live Screen Drawing to Delayed.

  • KdeGraphics-Okular - How to change the color of Text Selection tool

    Hello All
    I'm trying to know how to change/fix the color of the Text Selection Tool (Ctrl + 4). Because when I highlight the text, it's only one color (Dark Blue) that make me could not read clear.
    ---- My OS Configuration
    OS : Arch
    DE: LXDE
    WM: OpenBox

    The highlight color is determined by the system-wide color scheme that you're using. There's no way to change it only for okular.

  • In Preview, I suddenly am unable to get the "Adjust Color" tool panel to edit images. I just get the rectangular image selection tool instead. How do I ge the "Adjust Color" tool panel back?

    In Preview, I suddenly am unable to get the "Adjust Color" tool panel to edit images. I just get the rectangular image selection tool instead. How do I ge the "Adjust Color" tool panel back?

    Hmmm, I wonder if that window is hidden or off screen? Have you moved the pic window around to look under it?
    Might try this...
    Safe Boot , (holding Shift key down at bootup), use Disk Utility from there to Repair Permissions.
    Then move these files to the Desktop for now...
    /Users/YourUserName/Library/Preferences/com.apple.finder.plist
    /Users/YourUserName/Library/Preferences/com.apple.systempreferences.plist
    /Users/YourUserName/Library/Preferences/com.apple.desktop.plist
    /Users/YourUserName/Library/Preferences/com.apple.recentitems.plist
    /Users/YourUserName/Library/Preferences/com.apple.Preview.plist
    /Users/YourUserName/Library/Preferences/com.apple.Preview.bookmarks.plist
    Reboot & test.
    PS. Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.

  • Quick selection tool,How to programme the function of this tool?

    Recently, I intend to extract from a picture on the edge of oil tank。I found  that this quick selection tool  can meet my
    requirement。 But I do not know how to achieve it in VC ++ 。I would like to ask somebody who knows it???thanks~~~~~

    The question doesn't make sense in the SDK forum either.
    Why are you trying to control the tool programmatically?
    And I don't think you really can control that tool programatically - it's meant to be interactive.

  • I'm trying to use the quick selection tool in Photoshop Elements 12 but it keeps getting stuck on minus.  How do I fix this?

    I'm trying to use the quick selection tool in Photoshop Elements 12 but it keeps getting stuck on minus.  I've reinstalled twice and it will work for a little while and then get stuck again.  When I select something, I have one shot at it and as soon as I let go of the mouse it switches to minus and I can't add anything else.  How do I fix this?

    When a tool misbehaves, go over to the far upper right corner of the tool options area and click the four-lined square. Choose Reset Tool from the popout menu.

  • How do I specify exact corners with the rectangular selection tool?

    Suppose I have an image 2000 pixels wide by 1000 pixels high.  Pixel (0,0) is at the top left as you view the image.  Using the rectangular selection tool, how can I specify an exact area to select?  Say, for example, I want to select the area defined by (0,0), (100,0), (100,100) & (0,100), how would I do this?
    I'm using Photoshop CS6 on a Mac with OSX 10.8.3.
    Any help is appreciated.
    Thanks,
    Kevin H.

    Mylenium,
    33,406 posts!  That's amazing.  Thanks for your technique for specifying an exact selection size.  I tried it out and it works, but is there a way to get the marquee to snap to the guides, as opposed to snapping to pixels.  I can't quite get the marquee to fall exactly where I place the guides, at least not easily.
    Here's a method I've come up with since posting my question.  (I guess I should have tried harder to figure this out before asking the question.)
    Figure out beforehand where you want the corners of the selection marquee to be.
    Activate the rulers: View>Rulers or (Cmd-R.)
    Set rulers to pixels: Photoshop>Preferences>Units&Rulers>Rulers>Pixels
    Select the rectangular selection tool.
    In the menu bar for the selection tool choose Style>Fixed Size.  Then in the dimension boxes to the right of the Style button, type in the width and height you want for your selection, e.g. 200 by 100 pixels.
    Zoom in on where you want the top left pixel of your selection to be.  Zoom in enough to clearly see the pixel.
    With the selection tool active, click-and-release on the pixel you have zoomed in on.
    Go back to normal view (Cmd-0) and you should see your entire selection.
    This answers my own question, and with your method I now have two ways to do this.
    Thanks,
    Kevin H.

  • How to implement text selection tool

    Hello,
        I need to develop one plug-in. On click of menu, the cursor should change to text selection tool.
       On selection of text, I need to get coordinates of text.
      How to do this. Please help me to solve this issue.
    Thanks,
    Shilp

    Hello,
            Thanks for your response.
            I have implemented the function for AVToolRec as follows.
            AVToolRec AVRect;
            AVRect.size = sizeof(AVToolRec);
            AVRect.GetType = ASCallbackCreateProto(GetTypeProcType, &ToolGetType);
            AVRect.DoClick = ASCallbackCreateProto(DoClickProcType, &DoClick);
            AVRect.AdjustCursor = ASCallbackCreateProto(AdjustCursorProcType, &AdjustCursor);
            AVAppRegisterTool(&AVRect);
            ACCB1 ASBool ACCB2 AdjustCursor(AVTool tool, AVPageView pageView, Int16 x, Int16 y)
                   AVSysSetCursor((AVCursor) LoadCursor(NULL, IDC_CROSS));           //Works fine for cross
       I want to develop the cursor as acrobat provides.. "Selection tool for text and images"
       I tried to change the cursor to IDC_BEAM,  But it's not useful. Is it possible to create the cursor as acrobat provides and get coordinates for the text selection.
      Please help me to solve this.
    Regards,
    Shilp

  • The select tool is missing from my tool bar in indesign. Instead the page tool is there. How do I get the selection tool back?

    The selection tool is missing from my tool bar in indesign. Instead the page tool is there. How do I get the selection tool back?

    Your reply is blank. The forums do not accept attachments, so  if that's how you tried to post a screen shot please come back to the web page and use the camera icon to embed it in a post, like this:

  • How do you change the minus symbol on the quick selection tool to a plus symbol? im finding it difficult to select an area.

    how do you change the minus symbol on the quick selection tool to a plus symbol? im finding it difficult to select an area.

    You can use the Alt/Option key to toggle between add + and subtract -
    http://helpx.adobe.com/photoshop/using/making-quick-selections.html
    First though select the Add to Selection in the tool options bar for that to work.

  • How do I disable auto select for the path selection tool?

    For the move tool you can choose to disable auto selection, auto select a group, or auto select a layer. By default though the path selection tool autoselects a layer. How can I disable autoselection?

    I can’t seem to reproduce what you describe.
    Please elaborate, possibly with the help of some screenshots.

Maybe you are looking for

  • Selecting the first file from a group of opened files in Photoshop

    Hi, I've been digitizing microfiche with 200 or so pages photographed onto one image file, laid out in a grid pattern. I've been using actions in Photoshop to cut out one page, create a new file in Photoshop from that page, then return to the first,

  • Windows Updates not working

    We are having a problem with Windows update not wanting to work with the filters up and running. When I drop the filtering Windows Update from the workstations works just fine. When I have the filters up we get an error code of Error number: 0x80072E

  • Is it safe/okay to use RSNAST00 program in a user-exit?

    Hi Experts, I got a business requirement and its: After SAVEing the sales order......by using the user-exit USEREXIT_SAVE_DOCUMENT I have to trigger custom IDOC (currently its in the system and using for some other application) outbound direction to

  • Chart from SQL Colour

    I am creating reports in information publisher and wish to include charts from SQL to summarise the data. As some of these reports will include job execution status and similar status fields it would be useful to show Failures in Red and Successes in

  • Material ledger single level run error

    Hi All, During last month ML run, we faced a problem. For some of the Material of certain Material Type even Single level run could not be done. On analysis we found that for these materials previous periods ML run was not done. We are not sure why i