[AS][Photoshop] Checking if there is any paths or clipping paths

Hey guys,
I would like to determine if there is any paths or clipping paths in the files dropped onto the droplet. Then sort them into different folders. One folder for files with paths and one for without paths. Getting the files to move I think I can manage, but I can't get checking for the paths to work. Anyone got a clue? This is how far I have got.
> on open fileList
> tell application "Adobe Photoshop CS3"
> activate
>
>
> repeat with thisFile in fileList
> open thisFile showing dialogs never
>
> set CountOfPaths to count of path items
> display dialog CountOfPaths
>
> end repeat
>
> end tell
end open

Solved it! :D
on open fileList
tell application "Adobe Photoshop CS3"
activate
-- DO WITH EVERY FILE DROPPED ONTO THE DROPLET
repeat with thisFile in fileList
open thisFile showing dialogs never
tell current document
-- CHECK FOR PATHS
set CountOfPaths to every path item
if CountOfPaths is equal to {} then
-- IF THERE'S NO PATH
tell application "Finder"
-- MAKE RED IN FINDER
set the label index of thisFile to 2
end tell
else
-- IF THERE IS A _CLIPPING PATH_
if exists (every path item whose kind is clipping) then
tell application "Finder"
-- MAKE GREEN IN FINDER
set the label index of thisFile to 6
end tell
else
-- IF THERE IS A PATH BUT _NO_ CLIPPING PATH
tell application "Finder"
-- MAKE PURPLE IN FINDER
set the label index of thisFile to 5
end tell
end if
end if
end tell
-- CLOSE THE FILE
close current document saving no
end repeat
end tell
end open

Similar Messages

  • To check whether there is any format mismatch between columns of two tables

    Hi,
    I have got a table 'T' (Source table) with columns
    T_Lat Varchar2(50);
    T_Amt Varchar2(50);
    T_Cat Varchar2(50);
    (all these above columns have numeric data)
    Actually, Here I have taken only the columns having numeric data from table 'T'
    Now I have another table 'M'(Destination Table) with columns
    M_Lat number;
    M_AMt number;
    M_Cat number;
    Now my task is I have to do a prevalidation of the data in 'T' that whether all the data in those columns will suit for the destination table columns respectively (to check whether there is any format mismatch). This check should be done dynamically(as there are more than 50 columns in real).
    Note:- There is no unique mapping column for these two tables
    I think it can be done using arrays or plsql tables. But i dont have idea using them.
    Can any one help me in this regard.

    Why, What's wrong with these post and there responce?
    {message:id=10480898}
    {message:id=10472737}

  • To check whether there is any size mismatch between columns of two tables

    Hi,
    Here i got two tables T and M where i am going to migrate data from T to M. But before migrating i need to check whether all the data in source table fits into destination table columns. The datatypes of all columns in source table T is of Varchar2 only as it is a temp table.
    Ex :- Table 'T' (Source table) with columns
    T_Lat Varchar2(50);
    T_Amt Varchar2(50);
    T_Cat Varchar2(50);
    T_Vat Varchar2(50);
    Now I have another table 'M'(Destination Table) with columns
    M_Lat Varchar2(50);
    M_Amt varchar2(25);
    M_Cat date;
    M_Vat number;
    Now my task is I have to do a prevalidation of the data in 'T' that whether all the data in those columns will suit for the destination table columns respectively (to check whether there is any size mismatch). This check should be done dynamically.
    For suppose, in T_Amt(source column of T table) if text is abt 50 characters, it cant fit M_Amt(destination column of M table). In this case it should throw an error indicating that destination column size is less for the source column.
    Note:- There is no unique mapping column for these two tables and there are about 400 columns in the source table to be validate
    I think it can be done using arrays or plsql tables.
    Can any one help in this regard.

    >
    Now my task is I have to do a prevalidation of the data in 'T' that whether all the data in those columns will suit for the destination table columns respectively (to check whether there is any size mismatch). This check should be done dynamically.
    >
    Just because the source table T_Amt column is defined as 50 doesn't mean any of the data is really that long. So the data itself needs to be checked. That is just what a simple query can do.
    See my answer in this thread Posted: Jul 25, 2012 1:14 PM
    Re: Help in Execute Immediate - Invalid relational Operator
    Here is the modified sample query and results for a query of a clone of the EMP table with some modified data
    select count(*) cnt,
           -- job column
           sum(case when job is null then 1 else 0 end) job_nul,
           sum(case when job = 'SALESMAN' then 1 else 0 end) job_salesman,
           min(length(job)) job_minlength, max(length(job)) job_maxlength,
           min(job) job_min, max(job) job_max,
           -- hiredate colulmn
           sum(case when hiredate is null then 1 else 0 end) hiredate_nul,
           min(hiredate) hiredate_min,
           max(hiredate) hiredate_max
            from emp1
    CNT JOB_NUL JOB_SALESMAN JOB_MINLENGTH JOB_MAXLENGTH JOB_MIN JOB_MAX  HIREDATE_NUL HIREDATE_MIN HIREDATE_MAX
    14    2       4            5             9             ANALYST SALESMAN 0            9/28/0001    12/3/9999With one query and ONE pass thru the table I was able to get the COUNTs, the MIN and MAX values for each column and the MIN and MAX lengths of the VARCHAR2 columns.
    There are 14 total records, 2 where JOB is null, 4 where the JOB is SALESMAN. The MIN length of the JOB data is 5 and the MAX is 9.
    Look at the date values. The results tell me I have some problem data.
    The length data tells me if I try to put the JOB data into another table I need to define the length as at least 9 or it won't fit.
    For your use case you might find that all of the data in the T_Lat column is shorter than 26 and will actually fit into the M_Lat target table column.

  • Check whether there is any Special Characters in a String ?

    Hi All,
    I am having a very large String. I like to know how to check whether there is any special characters present in a string
    Thanks,
    J.Kathir

    I am having a very large String. I like to
    I like to know how to check whether there is any
    special characters present in a stringAll characters are special in a way. You shouldn't just single a few out because they don't look "normal" to you. Maybe they have golden hearts?

  • To check whether there is any format mismatch

    Hi,
    I have got a table 'T' (Source table) with columns
    T_Lat Varchar2(50);
    T_Amt Varchar2(50);
    T_Cat Varchar2(50);
    Actually, Here I have taken all the columns from table 'T' having numeric data.
    Now I have another table 'M'(Destination Table) with columns
    M_Lat number;
    M_AMt number;
    M_Cat number;
    Now my task is I have to do a prevalidation of the data in 'T' that whether all the data in those columns will suit for the destination table columns (to check whether there is any format mismatch)
    Note:- There is no unique mapping column for these two tables
    Can any one help in this regard.

    Hi,
    How to see if your data is in the correct format depends on your data.
    In general, see {message:id=3603878}
    For more specific requirements, something more efficient might be possible. For example,
    LTRIM ( t_lat,
          , '0123456789'
          )   IS NULLwill be true if (and only if) t_lat consists entirely of digits (or if t_lat is NULL).
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
    In the case of a DML operation (such as INSERT) the sample data should show what the tables are like before the DML, and the results will be the contents of the changed table(s) after the DML.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using.
    See the forum FAQ {message:id=9360002}

  • What is the command to check if there are any active calls before restarting the voice router?

    what is the command to check if there are any active calls before restarting the voice router? thanks

    Hi.
    I can suggest show call active voice or show voice call status or show sip-ua call brief in case of SIP TSP.
    HTH
    Regards.
    Carlo

  • How to check if there is any problem in the interaction center inbox

    hi,
    how to check if there is any problem in the interaction inbox for recieving the attachments/cic0
    some users who are sending withattachments is not able to reach the sap indox./
    but without the attachments the mails are coming
    I want to know how we can able to find out were is the problem.
    thanks in advance
    Prajith P

    hi,
    Any update for the above query.
    Thanks & Regards
    Prajth P

  • To check whether there is any format mismatch between two tables

    Hi,
    I have got a table 'T' (Source table) with columns
    T_Lat Varchar2(50);
    T_Amt Varchar2(50);
    T_Cat Varchar2(50);
    Actually, Here I have taken all the columns from table 'T' having numeric data.
    Now I have another table 'M'(Destination Table) with columns
    M_Lat number;
    M_AMt number;
    M_Cat number;
    Now my task is I have to do a prevalidation of the data in 'T' that whether all the data in those columns will suit for the destination table columns respectively (to check whether there is any format mismatch). This check should be done dynamically.
    Note:- There is no unique mapping column for these two tables
    Can any one help in this regard.

    Why dont you Just [url http://docs.oracle.com/cd/B19306_01/server.102/b14231/tables.htm#sthref2223] Insert Data With DML Error Logging 

  • Applescript to check if there are any events today

    I'm wondering if there's an easy way to use Applescript to just check if there is any event in a certain calendar for the current day.

    Actually, I managed to get it with some tinkering. I had issues at first with it not being able to find all day events (as it was getting the current time and all day events start at 12:00:00 AM) but I fixed that by putting the date in a string with a manually defined time of 12:00:00, converting it back to a date and using that. Here's the code:
    set {year:y, month:m, day:d, weekday:wd} to (current date)
    set str to (wd as string) & ", " & (d as string) & " " & (m as string) & ", " & (y as string) & " 12:00:00 AM"
    set today to date str
    set tomorrow to today + 60 * 60 * 24
    tell application "Calendar"
              tell calendar "Personal"
                        set curr to every event whose start date is greater than or equal to today ¬
                                  and start date is less than or equal to tomorrow
              end tell
    end tell

  • How to check whether there are any statistics in a schema or not?

    Hi,
    I was given a task of refreshing sa schema in CRM2 instance from CRM1.
    But I did it with statistics=none.
    ++++
    exp sa/sa@CRM1 OWNER=SA file=CRM1_SA.dmp log=CRM1_SA.log statistics=none buffer=4096000
    imp sa/sa@CRM2 FULL=Y file=CRM2 SA.dmp log=CRM2 SA_IMP.log statistics=none buffer=4096000
    ++++
    Now I want to know
    1.whether I should have done with statistics?
    2.How to compare the statistics of 2 sa schemas in the CRM1 & CRM2 instances?
    Cheers,
    Kunwar

    Now I want to know
    1.whether I should have done with statistics?Statistics gathering can be done after the import is finished and is recommended.
    2.How to compare the statistics of 2 sa schemas in the CRM1 & CRM2 instances?Not sure why you would want to do this.

  • AS for checking if there is an alert message showing

    This is probably a simple question but for part of a larger process Acrobat Pro opens crops a PDF saves and closes.  Occasionally I get an error that pops up.  Unfortunately it does not cause the process to stop and the script continues to attempt to crop other PDF's.  All I want to do is have the script check if there are any alerts/dialog boxes on the screen and then stop.
    What is the syntax in AppleScript to check for dialog boxes/alerts?

    Hi,
    Please try to do the following mapping.
            Map the source to exist function, The output of exist has to send to if conditiond and the output of if condition to the target.
      Thanks,
    Kiran.

  • How to know whether there is any change in a transaction in ic webclient

    Hi,
    There is one activity screen in the ic web(CRM 5.0). There is two button(Change, Save , Sendnotification) on that screen.
    Sendnotification: if i click this button then it will check whether there is any change done using  below logic and will send the noti..:
    DATA:lv_transaction   TYPE REF TO if_bol_transaction_context,
    lv_entity       TYPE REF TO cl_crm_bol_entity.
    lv_transaction = lv_btorder->get_transaction( ).
          IF lv_transaction->check_save_needed( ) EQ 'X'.
             then save the changes  and send notification
          ENDIF.
    Question:
    Now i clicked on the Change button and did some changes.Then saved.
    Then again i did some changes, now i clicked on the Sendnotification button.It sent an notification.
    Now i again clicked on the Sendnotification(this time i didnt do any changes), it sent the same notification again.
    So how to know that  actully changes done or not & how to write code if there is no changes?
    During debugging , i found that the method check_save_needed always returns 'X' as long as i am in the chage mode of that activity. As a result if i dont do any changes also in the activity and click the button , it sends the notification.
    please suggest how to restrict  using coding........
    Thanks
    sudhansu

    Not solved.

  • Iphoto on my used mac mini will not open my photos from my new macbook air, it says to update software but there arent any available.. please help

    iphoto on my used mac mini will not open my photos from my new macbook air,  it says something about updating the software, but i checked and there arent any updates available... please help

    Sorry for the second post..
    I currently do not have an older version of iPhoto to test this on, but you might also try coping the Originals from the iPhoto Library of iPhoto 11.
    To do that;
    1. Right (control) click on the iPhoto Library in the Picture Folder on the MacBook Air
    2. Select Show Package Content.
    3. Click on the Originals Folder
    4. Navigate to the disired Event or photos and copy those images to your Flash or External Drive, then copy those to the older version of iPhoto.
    Beware do not move, add or delete anything in the iPhoto Library, Apple has intensionally hidden it in later versions to prevent people from messing things up.

  • Photoshop files loosing clipping paths in 10.8.2

    If I create a Photoshop file in RGB and put on a clipping path.
    When I convert it to CMYK using an apple script icon on my desktop.
    the clipping path dissapears.
    This seemed to happen when I upgraded to Mountain Lion
    Can anyone shed any light on this.
    Many thanks
    Phil

    Do you really think somebody could help when you use an special Apple script with a third-party application on ML? Nobody knows whats in this script nor what Photoshop version you are using. Ask this in an Adobe forum.

  • Clipping Path info

    Hello guys,
    Again I am coming with a need for help now.
    I need a automation or plugin or script for spotting error on Photoshop paths.
    I tried photoshop scripts, searched for options in indesign and other softwares like pdf preflights. I couldn't find any idea.
    I will be working with lots of images more or less 100 images a day. I want to get the infos of clipping paths created in photoshop like path name, clipping flatness and open paths if any, all details in a log file or an log display window. Not an issue whether it works inside photoshop or outside like automation along with other softwares. But I simply need to spot the open path and clipping path name exactly.
    Need help!!!
    Thank you in advance!
    Regards,
    Purushoth...

    function clippingPathIndex(){// returns -1 if no clipping path
      var ref = new ActionReference();
      ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
      var desc = executeActionGet(ref);
      return desc.getObjectValue(stringIDToTypeID('clippingPathInfo')).getInteger(stringIDToTypeID('clippingPathIndex'));};
    function getClippingPathFlatness(){ 
      var ref = new ActionReference()
      ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
      var desc = executeActionGet(ref);
       if( desc.getObjectValue(stringIDToTypeID('clippingPathInfo')).getInteger(stringIDToTypeID('clippingPathIndex')) != -1  ){
         return (desc.getObjectValue(stringIDToTypeID('clippingPathInfo')).getInteger(stringIDToTypeID('clippingPathFlatness'))/65536);
      }else{
        return -1;
    var pathIndex = clippingPathIndex();
    if(pathIndex != -1 ){
      var pathName = app.activeDocument.pathItems[pathIndex].name;
      var flatness = getClippingPathFlatness();
      var closed = app.activeDocument.pathItems[pathIndex].subPathItems[0].closed;
      alert(pathName+': '+flatness+': '+closed);

Maybe you are looking for