Can you make a script for select cells?

Hi everyone
How can I tell the script
no matter my selection in which cell or cells
and what kind of select in cells
I want to select that table from top (first row) to first empty row
see pics:
before select:
selected:
thanks
John

Hi John,
Try this.
var doc = app.activeDocument,
    _selection = app.selection[0],
    _object = [];
if(_selection instanceof Table)
        for(var i =0;i<_selection.rows.length;i++)
                var con ="";
                for(var j =0;j<_selection.rows[i].contents.length;j++)
                        con +=_selection.rows[i].contents[j];
                if(con != "")
                        _object.push(_selection.rows[i]);
                        app.select(_selection.rows[0]);
                        app.select(_selection.rows[i], SelectionOptions.ADD_TO)
                else
                        break;
else
        alert("Select a table")
Regards,
Chinna

Similar Messages

  • Can you make a script for modify cells?

    Hi, every one,
    I am looking for a script can do this:
    If a slection a range of cell, the script can:
    (1) let the even number of column apply to character style “Color+Bold”
    (2) fill with colour of “\d% of PANTONE .+”
    before modify:
    after modify:
    SOMETIMES NEED TO
    (3) fill with boundary line colour of “PANTONE .+”
    John

    That was easier, than I thought before. Try this:
    if ( app.selection.length > 0 && ( app.selection[0].constructor.name == "Cell" || app.selection[0].constructor.name == "Table" ) ) {
        if ( app.scriptPreferences.version >= 6 ) {
            app.doScript( main, ScriptLanguage.JAVASCRIPT , [], UndoModes.ENTIRE_SCRIPT, "style every second column in selection" );        
        else {
            main();
    } else {
        alert ( "Nothing or wrong selection!" );
    function main() {
        var myColor = "Cyan";
        var myFillTint = 20;
        var myCharStyleName = "bold";
        var myStrokeWeight = 0.5;
        var curSel = app.selection[0];
        var allCells = curSel.cells;
        var startCol = curSel.cells[0].name.split(":")[0]*1;  
        var endCol = curSel.cells[-1].name.split(":")[0]*1;
        var startRow = curSel.cells[0].name.split(":")[1]*1;  
        var endRow = curSel.cells[-1].name.split(":")[1]*1; 
        var counter = startCol + 1;
        for ( var i = 0 ; i < allCells.length; i++ ) {
            var curCell = allCells[i];
            var curCol = curCell.name.split(":")[0]*1;
            var curRow = curCell.name.split(":")[1]*1;
            if ( curCol == counter ) {
                with ( curCell ) {
                    fillColor = myColor;
                    fillTint = myFillTint;
                    texts[0].appliedCharacterStyle = myCharStyleName;
                    rightEdgeStrokeWeight = myStrokeWeight;
                    rightEdgeStrokeColor= myColor;
                    leftEdgeStrokeWeight = myStrokeWeight;
                    leftEdgeStrokeColor= myColor;                
                if ( curRow == startRow ) {
                    curCell.topEdgeStrokeWeight = myStrokeWeight;
                    curCell.topEdgeStrokeColor= myColor;
                else if (curRow == endRow ) {
                    curCell.bottomEdgeStrokeWeight = myStrokeWeight;
                    curCell.bottomEdgeStrokeColor= myColor;
                counter = counter + 2;
            if ( counter > endCol ) {
                counter = startCol + 1;
            } // end if
        } // end for
    } // end main

  • Can you make a app for texting that dont need wifi for iPod touch

    Can you make a app for texting that dont need wifi for iPod touch

    I don't think that even possible without any kind of connection

  • Can you make IOS 7 for the iPod 4th Generation please?

    Can you make iOS 7 for the IPod 4th generation because to be honest it's not fair to us iPod 4th Generation users that the iPod 5 and the IPhone users get to have it but we don't

    All the iOS devices compatible (iPhone 4 and later, iPad 2 and later, and 5G iPod touch) with iOS 7 have at least 512 MB of memory. The 4G only has 256 MB

  • Can you make a movie for more than 2 minutes on an ipad and save it on a flash drive

    Can you make a movie for more than two minutes on the ipad and sve it on a flash drive using windows XP

    Using Apple's camera connection kit, you can use a flash drive to IMPORT photos and videos. However, you can't EXPORT any type of file to the flash drive.
     Cheers, Tom

  • Its our national day today. Can you make an emoticon for our flag Brunei Darussalam please?

    Dear apple software team,
    Its our national day today, Can you make an emoticon for our flag country Brunei Darussalam please?
    Thank you for making this possible.  

    Not talking to Apple here, only other users like yourself.
    If you want to make a suggestion to Apple you need to use their feedback forms, Apple - Feedback
    good luck

  • Can you make a multiple track selection without using a modifier key?

    i think this is mainly a wishlist kind of question as i'm pretty certain it's not possible. while the track tool can be accessed with a single key command, in order to select multiple tracks, you have to hold down the shift key. in FCP, the track tool had several options. for instance, TTTT would select all tracks forward but you could map this to a single key. so many things about premiere are great, but certain keyboard shortcuts are sadly lacking.

    yes, really. if i do something more than 5 times in any given day then i'd like to do it as efficiently and quickly as possible. as an editor, i use the select all tracks forward command in FCP at least 20 times a day, but probably more. so even though it's not a "big deal", it does slow down my workflow when i have to hit 2 keys. it's not a big deal to go to the post office but it really makes life easier when the mail carrier stops at my house.

  • Can you make custom clothing for 3d Models?

    Hello, I am new to Photoshop CS5 Extended and mostly bought the program for making textures for 3d clothing since it has a bridge from DAZ to Photoshop which I hope will make my work go faster. I have been using DAZ and Poser for a while now and have been working in photo editing and vector designing for 12 years. I am not new to this, just need to adobe products. I was wondering if it is possible to custom clothing for 3D Daz models using Adobe Photoshop CS5 Extended? I can find tutors on painting models but nothing on making the custom clothing itself, not a texture for other clothing but making my own clothing for DAZ Kids4. I have been using Hexagon to work with clothing but was looking for a photoshop alternative method.
    Thank you
    Kimberly

    for the mesh, hexagon is actually better than photoshop. Since it can create the actual mesh. Though, you can import the mesh into photoshop so you can see it while you paint the texture.
    The 3d creation portion of photoshop is still a bit limiting. (But my experience stops with CS5. I have not tried CS6 yet, so impovement could have been made)
    The issue I have with hexagon is the amount of bugs in it. I prefer a more robust and more expensive alternative. But thats me
    A free alternative is Blender. But I find the UI a bit outdated and hard to grasp. But again, thats me.
    Generate your UV maps as you normally would then load them into photoshop and get painting. You may like other texture generating apps to go along with photoshop. Genetica is great for making tileable textures.

  • Can you make a menu for the right-click search so that when I highlight text and search, I can choose which search engine to use?

    If you Highlight text you can right-click on it to pull up a short menu. One option is "Search x search engine for 'highlighted text'" Previously, the search engine selected would be whichever search engine was selected on the search bar, so Google or Amazon.com, etc. Because you can no longer change that selection before you search, the search engine is set to your default. Was an annoyance before, but now it's just a hindrance.

    Strongly recommend Context Search extension which will solve your problem
    - https://addons.mozilla.org/en-US/firefox/addon/context-search/?src=search

  • Can you make Custom Frames for HP Photosmart A826

    I was wondering if there is a way to make Custom Frames to be used for the: HP Photosmart A826 Home Photo Center
    Basicly I would like to add my company logo to photos printed with this printer if it is possible. 

    for the mesh, hexagon is actually better than photoshop. Since it can create the actual mesh. Though, you can import the mesh into photoshop so you can see it while you paint the texture.
    The 3d creation portion of photoshop is still a bit limiting. (But my experience stops with CS5. I have not tried CS6 yet, so impovement could have been made)
    The issue I have with hexagon is the amount of bugs in it. I prefer a more robust and more expensive alternative. But thats me
    A free alternative is Blender. But I find the UI a bit outdated and hard to grasp. But again, thats me.
    Generate your UV maps as you normally would then load them into photoshop and get painting. You may like other texture generating apps to go along with photoshop. Genetica is great for making tileable textures.

  • Can you make custom ringtone for iPhone 4 w/o using iTunes?

    My computer crashed and I had to redownload iTunes and all my music the other day. I plugged my iPhone 4 in to put a custom ringtone I made in iTunes on it and it says it wants to "erase and sync" my phone since it was connected to my old iTunes. Is there a way to fix this or is there a way to make a new custom ringtone for my iphone without using iTunes?

    about backup http://support.apple.com/kb/HT1766
    you're better off creating new ringtones.  Take a look at the first link I gave you, that will answer all your questions.

  • Can you make the installer for Vista 64bit as well?

    It shouldn't be too hard to make the installer available for Windows Vista 64 bit as well, should it? Or is there a special reason Scout is Windows 7 and >?
    I think there's still a lot of people  working on an old Vista machine (like me) who don't really want to upgrade just yet for 1 program?

    Hi RmdB2,
    Scout itself is not 32-bit compatible, it is not an installer limitation. Most OS's today are 64-bit and have been available for many years now.
    We totally understand your situation but not upgrading to 64-bit will probably prevent you from enjoying other tools pretty soon.
    Thibault Imbert
    Sr. Product Manager | Adobe Scout

  • Dear Verizon, can you make great help for me?

    Dear Sirs!
    My name is Anton, I  am from Moscow, Russia.    I never used  any Apple headseats, and always used android based phones and tablets.
    I working in  ISP http://seven-sky.net, in NOC department. We are colleagues with you, in some case.  My colleagues and friends, apple geeks, always were trying to put me in their side, and buy  apple iphone))))
    And my wife, Kate,   always was asking to buy "normal" phone for her, thanks God, my kids is too young for asking for it too.
    And one day I decided to try and buy the apple on my wife's birthday.  I can't buy a new phone, only used on local market www.avito.ru. 
    My choice was iphone 4s 32g, used. It cost 7500 rubles( ~ $190 ).  My incomes from all my jobs is about $1700 per month, but we  pay credits, and other pays. So i thought , that it was a good price for me.
    On avito.ru i found a seller,and bought this iphone.  My apple  friends told me , that it must be with no aplle-id  injected, no password, and must  doing reseting and erase with no problem.
    All this was OK, and I wait my wife birthday, with "new" black present.  But when it was her birthday, I started having problems....
    When i insert her SIM card in slot, nothing is happened. It can't register in any network!
    I started to checking , wthf, etc...  And now i know that this device is locked by you company for use only in CDMA network in USA.
    Why I don't check this when buying ? I don't know, I prefer to trust people, idiot.
    Of course , seller was cheater, and disappeared at next day.
    I start to find a way out, google google goooogle more and more.
    I learned a new words - "ESN, JailBreaks, modem versions, SAM, Super Geye...SIM , and other trash. And finally found nice web site .
    www.officialiphoneunlock.co.uk   - They confirm me, that my phone is locked, and offer me to unlock it for 60 GBP.  Idiot once and one more -  i have paid them.  After 18 days i have got  a answer -  sorry man and relax)))))
    You can check this:  https://www.officialiphoneunlock.co.uk/ru/status.php?key=ca2df7707e4cb201e349a97f8b48410f
    Am i idiot ?  Yes, i am. Sorry about that.
    I understand all bussines reasons for you to lock this phone, i hope it was just losted like no-payed on contract, and nobody suffered.
    But if you can help me, just for goodwill and in a great exception, and unlock this unhappy gift for use in Moscow GSM networks, I will be very happy and promise you, never repeat that idiotic workflow )).  If my old dream become true, and i will visit USA, I promise you, that i will use only your servises!
    Please ! DEAR SIRS! You are my last hope !!!
    I will repeat that - I am not  iphones dealer,reseller, geek, service man and other. I am just a simple man.  For example, my hobby is e-bikes  , and i have a web site  [removed] about it.
    [Personal information removed as required by Verizon Wireless Terms of Service
    Thank you, for your composure and sorry for my English)))
    Message was edited by: Admin Moderator

    Thanx, Ann154, for you advise.
    But I must be sure that there is no other options for me.
    I am scared, that if I sell it to some  good person in USA, he can't use it too, because it has BAD/LOST/STOLEN ESN.
    I  just want it to know.
    Look here:
    >> Link removed as it contained personal information <<
    I have a friends in USA. If i will give it them, like gift, and they will come to Verizon office, and try to activate it. Will it all ok?
    Or they will spend a night in police station, because of me ?
    Very strange, that there is no way to be sure:
    Apple Russia official support said -  It's locked, we don't know why, but on carrier.
    Verizon support said - It's stolen or lost but it's is ok, you can use it, we don't lock it,  please read our Unlocking Policy.
    The End)))
    Edited by:  Verizon Moderator

  • Font Book. Can you make Font Collections for all users?

    I set up a few font collections. Now when I login as another user, these font collections are not available. Each user seems to have to set up their own collections.
    Is there any way to set up font collections that all users may be able to access?
    This would be handy if all the users wanted the same collections. Is this possible?

    If you just edit the skeleton file for <code>.xinitrc</code>, then for each user that is created, it will automatically be set to run xfce.  The location of the file is <code>/etc/skel/.xinitrc</code> if that answers your question.

  • Can you make captions for a slideshow?

    can you make captions for a slideshow? otherwise how can i rename the photo so that i can select view titles in the slideshow and use it as a caption?

    Jim lo:
    Welcome to the Apple Discussions. You can't make captions with iPhoto. You can edit the title of a photo by selecting it and then going to the Info window at the bottom of the Source pane, the "i" button, clicking on the title field and enter what text you'd like.
    If you plan on using the slideshow in iDVD then those titles will not show as they will be lost in the "overscan" area that is common to all movies played on TV. You can create the slideshow in iMovie and have lots of control over titles and subtitles and greater control of the audio track, cut, fade in/out, etc.
    Do you Twango?

Maybe you are looking for

  • XML data from a Web Service sometimes missing fields I need, any ideas on a trap?

    I get reports from our ERP via a web service to SSRS.  Just got asked to make a tweak in a report and find that the WebService only sends data that is needed for this transaction.  My issue is our entire system is based around EACH item we make.  New

  • How to Read Variable Values in WAD 7.0 Using JavaScript

    I found a how to: How to Read Variable Values in WAD 7.0 Using JavaScript on SDN. I get a Javascript error: bics.getElementsByTagName is not a function vars = bics.getElementsByTagName("VARIABLES")[0]; // <VARIABLES> Thats my script: function currenc

  • Suspected overheating issues

    Hey, everybody. I've had my PB for about 3 years now, and lately it's been freezing in the middle of graphics- or memory-intensive activities, like playing video games and watching movies stored on my hard drive. I've double-checked for viruses, corr

  • MacBook Pro 10.6 randomly freezes, ~2x daily?? Screenshot link inside.

    For a while now, I've just been putting up with it, but thought I'd give it a shot here. It's not completely unbearable, just mildly annoying as I must reboot the system. No data is ever lost. I just make sure to save my work constantly. Anyway, atta

  • How do I set Stateful/Stateless behavior  in 9.0.5

    Good afternoon, In JDeveloper 9.0.3 I could set my root application module definition to stateful or stateless. How do I do that in JDeveloper 9.0.5? Thank you