Want to select path or mask

if file have path named "Path 1"
i want selection from that path
else if there is no path  please check channel named "Alpha 1" is there i want selection from that channel
please help me

That will learn me to be lazy and copy/paste/edit in the browser window…
var doc = app.activeDocument;
if ( doc.pathItems.length > 0 ) {
          doc.pathItems[0].makeSelection( 0, true, SelectionType.REPLACE );
          doc.pathItems[0].deselect();
} else {
          try {
                    doc.selection.load( doc.channels.getByName('Alpha 1'), SelectionType.REPLACE, false );
          } catch(e) {}
Would have thought you could have sorted that mistake thou…

Similar Messages

  • Path vs Mask

    Hey all... this may just be symantecs or terminology, but why does anyone use masks?  Doesnt creating a path layer with the pen tool away from the actual object layer allow you to do everything and anything with that path area?  I.e., if you CNTRL+Click on that path layer, it will highlight the path area, and then you can go to any image layer you want and do whatever you want, from cropping, inverse cropping, create a layer of any color and opacity, or edit whatever is within that path area in any way PS allows you to...
    So in other words, is masking just another way to achieve the same result, or is there something the "mask" feature allows that what I mentioned above cannot do?  Personally it kinda annoys me for the masking process to highlight areas while I am pathing, but maybe I am not even on the right track here, dunno...  any elucidation would be awesome, because for some reason I "hear" more about masking than simple pathing and go.

    In addition to the above comments, where some confusion could be creeping in is that Selections and Paths can usually be converted to the other.
    Masks are basically Selections and appear as Channels. They can be applied in several ways, with Layer Masks and Clipping Masks being mentioned already.
    From a Path, one can convert that into a Selection (in the case of most Paths), and those Selections can be turned into Masks of various types.
    A Mask can usually be Loaded as a Selection, and then that can be converted into a Path.
    Masks can be easily painted onto, effectively painting IN, or painting OUT the Mask. A Path can really only be Filled or Stroked, and the pixels that make up the Fill, or Stroke will need to be on a Layer. They can be painted onto, but the Path, itself, cannot.
    As Selections can be converted to a Path, where file size is an issue, one can convert that Selection to a Path, then Save the file, after removing the Selection, which would be saved as a Channel and occupy the full Image Size.
    Paths are mathematically defined, while a Mask (or a Selection) will be pixel-based. Paths are infinitely editable, but the editing of a Selection, or a Mask is a bit more limited, and remember, they are pixel-based. Most of my Masks start out as Paths, and then become Selections (where I might do more work to refine), and then become Masks.
    With but a few easy steps, each can be converted to the other, so there can be confusion. The Help Files cover each in detail, with examples of each one's use, and also the possible conversions. I would pour over those files, and conremplate the similarities but mainly the differences.
    Each has its own uses, and knowing those will benefit you, in almost everything that you do in PS, so time to learn each, inside and out, will not be a waste of time.
    Good luck,
    Hunt

  • Name and Number selected paths?

    I am working on a very large .ai file of a baseball stadium render. It contains many small sections and box seats that need named and numbered in this format: section::100, section::101, ... and so on. Right now, I'm having to go through and rename each path individually. Is there a script that will save me TONS of time by automating this for me?
    I found this one on here, which is a good start for what I need, but it doesn't let me only number selected paths, nor does it let me start the numbering where I want (say at 100 and go up from there).
    #target illustrator
    var docRef = app.activeDocument;
    var newName = prompt ("What's the base of the new name","base");
    var myNB = docRef.pathItems.length;
    for ( i = 1 ; i < myNB; i++)
    var finalName = newName + i;
    docRef.pathItems[i].name = finalName
    Thanks in advance!!

    I have taken a quick guess at what you want but Im supposed to be busy at work…
    #target illustrator
    var docRef = app.activeDocument;
    var newName = prompt ("What's the base of the new name","base");
    var stNumb = prompt ("What's the start number","1");
    var myNB = docRef.selection.length;
    for (var i = 0 ; i < myNB; i++) {
         var finalName = newName + stNumb;
         if (docRef.selection[i].typename == 'PathItem') {
              docRef.selection[i].name = finalName;
              stNumb++;

  • Path to mask using JS

    How can I convert a path to a mask using JS ? 98% of my images contains a path and would like to convert the selected path to a mask.
    Thanks in advance

    Yes I can... I already making a selection of the appropriate path... That's the one I would like to convert to a mask using JS.
    As for the background, that is no problem either...
    The thing is sometime my script crashes due to various things. I presently make the selection of a path then invert the selection and delete everthing not needed. Then I export in vaious formats.
    Instead of deleting I would like to mask it.
    I have 6000+ images to export.

  • Is it possible to use an object as a selection path?

    I know in photoshop you can make shapes with the pen tool and then covert them into a selection path.
    I was wondering if there is such similar feature in Illustrator
    For example with the picture I posted here, what I want to do is be able to select the objects that are in contact with the black object on top without having to individually select them or use the "lasso" tool
    It would make things easier with a "Select all objects under or above" option, theres only the "Select next object under or above"

    Djxyz0 wrote:
    It would make things easier with a "Select all objects under or above" option, theres only the "Select next object under or above"
    the script works exactly the way you originally asked, you draw a path, with the pen if you want, then run the script and everything under this path of yours will get selected.

  • How to select a layer mask (not its contents) and another layer/folder at the same time?

    I can do one or another, but both at the same time?
    It is annoying because a mask selection turns into layer selection when you select a second layer/folder.

    Well a layer mask is just that for that layer. If you want to apply that mask to a new layer, you can drag it or alt drag to drag a copy to the new layer. Then it will have its own layer mask. When your done, if needed you can then remove that mask from that new layer, if for some reason you only wanted to see a temporary mask.

  • Updating Jtree witout loosing selected Path

    Hi,
    I want the user to be able to get the most recent version of the database structure that is represented by the tree, without loosing the selected path.
    that's mean i would like to update the Jtree structure without changing the selected path.
    i tried to use myJtree.getModel.nodeStructureChanged((TreeNode) changedNode) but without success the selcted path is losed.
    Is there any idea?
    Thanks in advance

    no this dosen't work , here after my code:
    DefaultMutableTreeNode addedNode=new DefaultMutableTreeNode("NewNode");
    ParentNode.add(addedNode);
    // and i fired this event to cheng the tree
    ((DefaultTreeModel) myTree.getModel())).nodeStructureChanged((TreeNode) node);
    but with this i lose mu selected Path
    and i also tried this
    ((DefaultTreeModel) myTree.getModel())).nodeChanged((TreeNode) node);
    but no success i can't update my tree structure

  • CLIENT_TEXT_IO.put_line how to make user select path

    Hi. I am using oracle forms and creating a text file using CLIENT_TEXT_IO.put_line.
    But forms creates file wherever it wants. Is it possible to make user to select path for text file.
    Thanks...

    See e.g. here:
    CLIENT_GET_FILE_NAME  Specifying path
    also there are tons of samples if you search for clent_get_file_name on google.
    cheers

  • I have several disks with many comedy routines;I want to select a few from each disk and combine them to one disk for my personal use.How?

    I have several disks with many comedy routines;I want to select a few from each disk to make one single disk for my personal use.How?

    Copy the routines into a new folder on your hard drive. Then burn the folder to a new blank disc using Disk Utility.

  • How can I change (or select) what is being being used when I share, as the file cover. When I Share lets say "Master File" i want to select a frame that is used as the file cover. So when its on my desktop I see this image as the file icon.

    How can I change (or select) what is being being used when I share, as the file cover. When I Share lets say "Master File" i want to select a frame that is used as the file cover. So when its on my desktop I see this image as the file icon.

    I don't think Finder does this (I've tried).
    iTunes does though. Where you can set artwork or the "poster frame"...
    This may not be what you want but if it helps, I know 2 ways  do this is
    Open the video in QuicktimePlayer7 | View | Set Poster Frame (even then, you might need to save it as .mov (ie in a 'mov container').
    Drag the file into iTunes and set the artwork (as in http://www.dummies.com/how-to/content/adding-album-cover-art-or-images-in-itunes .html)
    From there, iTunes will use that frame as the "poster frame" ie the photo/frame that shows when you browse your videos. Which is what you want, but limited to iTunes.
    When I do either of these above, the frame I set does not show when exploring files in "Finder" (or in the other Explorer tool I use called "Pathfinder").
    So it maybe, that exactly what you want, is not possible.

  • I plan on buying a new  I Pad wit wifi and cell from Apple. But  I don't want to select a cell carrier right now. Q 1: Do I have to select a carrier at purchase? and Q 2, In the meantime will I be able to get on line at home using my Cox Internet wi fi co

    I plan on buying a new  I Pad wit wifi and cell from Apple. But  I don't want to select a cell carrier right now. Q 1: Do I have to select a carrier at purchase? and Q 2, In the meantime will I be able to get on line at home using my Cox Internet wi fi? Thanks. 

    Thanks for the help. Now I can feel comfortable in not having to sign up for cellular when I buy, esp. Since I'll be using my new IPad mostly at home on my Cox wi fi. Then I can see, in using the i pad, how often I'd actually use the cellular, and where. This can help decide which type of cell plan I get. Small problem it may seem, but a very helpful answer. Thanks.

  • Want to select link in query

    Hello,
    I want to select a link in a sql query.
    I create a report with the following sql query
    select ' '||'<a href=www.nu.nl /a>' link from dualwhen i run the page I do not get a link to the www address.
    If I look at the source the sourve is like this:
    <less than sign> a href=www.nu.nl /a<greater than sign>
    what am I missing??
    Regards

    Try this:
    select {single quote}{less than sign} a href="www.nu.nl">{single quote}||link||{single quote}</a {greater than sign}{singel quote} from dual
    Edited by: Bob Richards on Nov 10, 2010 12:46 PM
    Edited by: Bob Richards on Nov 10, 2010 2:26 PM

  • I have F.F 3.6 and windows 7.: 1) When i want to buy a airplane ticket and want to select 2 adults or 2 children, the draw down select, does not work in any websides,? WHY?. 2) Have FF any problems with SKYPE

    I have F.F 3.6 and windows 7.: 1) When i want to buy a airplane ticket and want to select 2 adults or 2 children, the draw down select, does not work in any websides,? WHY?. 2) Have FF any problems with SKYPE
    == This happened ==
    Not sure how often
    == After innstalling windows 7

    As a suggestion I'd put the Text_io segments into their own begin - exception - end sub-blocks within the main code. This way if Text_io does raise an exception you can catch it earlier as it may be able to recover - That is if it is a text_io exception.
    Other than that you;ll have to step through in Debug.

  • In OB29 which box should I flag on if I want to select my fiscal variant N6

    Hello,
    On BW side I want to select my fiscal year varaint as N6, so I go to tcode OB29 and which cloumn should i flag on the first one or second (year dependent or calendar year) right now none of that boxes are selected. ?
    The calendar year cloumn has 5 boxes flaged on K0 to K5 what does that mean ?
    Can i make the changes staright away in production?
    After making the changes do i have to reload the data to get right periods for the transaction data?
    Thanks in advance

    fiscal year variants are usually defined on the source system. We transfer the global settings from the source system to BI for currencies, fiscalyear variants, UOM, factory calender. Go to source system, right click on ur source system - transfer global settings - fiscalyear variants - Mode - update tables.

  • Want to select expence acount?

    hi expert all.
    i  want to select  all  expence acount (this expence account is showing in Grid. ) for a one Item(like pipe) from  Item master data.
    where  set GL account  By Item level
    Edited by: john_kk on Jun 29, 2009 1:00 PM

    HI,
    SELECT T0.ItemCode,T1.[ExpensesAc] FROM OITM T0  INNER JOIN OITW T1 ON T0.ItemCode = T1.ItemCode WHERE T0.[DfltWH] = T1.[WhsCode]
    Take care, this query is not checking that the G/L Account determination set to by WareHouses.
    Regards,
    János
    Ps:
    as Vitor has been already written when G/L Method is set to  -
    - Item Group, the  OITB.ExpensesAc will be used for posting in this case G/L Method set to C
    - Warehouse the OWHS.ExpensesAc  will be used for posting n this case G/L Method set to W
    - Item Level, then OITW.ExpensAcct will be used.n this case G/L Method set to L
    Edited by: János Nagy on Jun 30, 2009 10:42 AM

Maybe you are looking for

  • I want to transfer a product from 1 adobe ID to another adobe ID

    The wonderful experience with Adobe: step 1: years ago I created a behance account step 2: 1 year ago i created an adobe ID for CS6 step 3: today i logged into behance and thereby created a SECOND adobe ID step 4: i tried to cancel my CS6 adobe ID wi

  • Accessing EAR file or its contents in an Oracle App Server

    We deploy a single ear file on multiple servers (test, user acceptance, production) and would like to, at start up, read every .JSP file in that ear looking for certain tags. It is no problem in dev to walk the directory structure to read the JSPs, b

  • FOR UPDATE OF table.field

    Why does the following not work create table division (code varchar2(2) primary key, div_desc varchar2(20)); insert into division values ('01', 'Ninja assassins'); insert into division values ('02', 'Working for the man'); create table employees (tk

  • No. of javabeans in jsp pages

    Hi, If i am having 180-200 textfield in a jsp page and i want to submit the whole data in database table then how many beans should be used to improve the performance . Can it be done using only single bean and if not then what should be the criteria

  • Lenovo Twist - keyboard

    Hi everyone, I bought a Lenovo twist in EEUU and it has the keyboard from there. I am from Argentina, so, I decided to change the keyboard configuration to the latin version ( this is caused because in Argentina we use the "ñ"). But there is a little