Defining paths in scripts..... in need of a guru

Here's a problem that Bridge scripts are having...
If you have a volume named Users, the image processor, 1-2-3, AOM scripts won't run because as the paths are defined they will look in the volume "User" not the folder "Users" for files etc.... it's described better here:
http://forums.adobe.com/message/3477465#3477465
the problem also exists if you try to use the merge HDR pro script, if you have a volume named "Applications" on your desktop.
here's the KB for this similar problem:
http://kb2.adobe.com/cps/852/cpsid_85275.html
you can replicate these problems by simply naming any external drive "Users" for the output script errors, or "Applications" for the HDR script errors. After renaming simply try any of the above scripts.
Adobe is currently looking into fixing the scripts, but I know there are some scripting gurus around here that might have already encountered these types of problems and might have a speedy fix to the problem.... any thoughts?
many thanks.
j
-- I should also mention this is a Mac only problem.

As long as there is mankind, and technology there are going to be problems!
There's nowt wrong with my N95-1 and I'll be sticking with it for some time.
You can get a bad phone - just like you can get a bad car, washing machine, stereo etc, etc.
As long as the phone works OK there are often ways of improving limitations. Battery life is poor on my N95 'computer' but I have a rechargeable li-polymer external battery pack I bought for use with a PDA, it's very pocketable, reasonably light weight and would give me about 3 x recharges of my N-95.
Frankly though I would avoid the N95 8GB - I don't like the idea of fixed memory and no memory card slot. If that fixed memory goes pear shaped, what then? At least with removable flash memory you can whip it out and put another one in. Micro SD-HC cards are expected to go up to at least 32GB in size, they are very small, very light and as is usually the case, they will eventually fall in price.
Horses for courses! Good luck with whatever model you decide to get.Message Edited by keenas on 27-Oct-200709:19 AM

Similar Messages

  • Ihave created a script, i need to email in pdf format.

    Hi Experts,
    There are 2 criterias...
    1. criteria
    I have created a script, i need to mail it. Please give me a step by step guide to perform it .. . Please give the comments in all the functional module to be used.
    Do we have to write a separate program to send email or in the same program. i'll post my program along with this mail. I'm using this program to display report after delivery on that particular date.
    REPORT  ZREPORTTOEMAIL LINE-SIZE 400.
    data : count, i  type i.
    TABLES :  VBFA,         "Sales Document Flow
              VBAK,
              KNA1,
              VBKD,
              VBAP,
              LIPS,
              LIKP,
              KONP,
              KOMK,
              KOMP,
              zkna1,
              konv.
    data : l_vbeln like vbfa-vbeln,
           l_posnr like vbfa-posnn,
           l_KNUMV like vbak-KNUMV,
           L_BILL_ITEM LIKE vbfa-posnn ,
           l_netwr like vbrp-netwr,
           l_MWSBP like vbrp-mwsbp.
    DATA: BEGIN OF TKOMV OCCURS 50.
            INCLUDE STRUCTURE KOMV.
    DATA: END OF TKOMV.
    DATA: BEGIN OF TKOMVD OCCURS 50.
            INCLUDE STRUCTURE KOMVD.
    DATA: END OF TKOMVD.
    TYPE-POOLS: SLIS.
    DATA: FIELDTAB TYPE SLIS_T_FIELDCAT_ALV,
          HEADING  TYPE SLIS_T_LISTHEADER,
          LAYOUT   TYPE SLIS_LAYOUT_ALV,
          EVENTS   TYPE SLIS_T_EVENT,
          REPNAME  LIKE SY-REPID,
          F2CODE   LIKE SY-UCOMM VALUE  '&ETA',
          G_SAVE(1) TYPE C,
          G_EXIT(1) TYPE C,
          G_VARIANT LIKE DISVARIANT,
          GX_VARIANT LIKE DISVARIANT.
    DATA: GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
    CONSTANTS: FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE'.
    DATA: BEGIN OF itab occurs 0,
            kunnr like likp-kunnr,      "ship to party
            NAME2   LIKE  KNA1-NAME1,   "text
            ORT01   LIKE  KNA1-ORT01,   "City
            BSTNK   LIKE  VBAK-BSTNK,   "customer P O
            BSTDK   LIKE  VBAK-BSTDK,   "date
            vbeln like likp-vbeln,      "delivery
            ernam like likp-ernam,      "person
            vstel like likp-vstel,      "shipping point
            vkorg like likp-vkorg,      "sales org
            lfdat like likp-lfdat,      "delivery date
            kunag like likp-kunag,      "sold to party
            NAME1   LIKE  KNA1-NAME1,   "text
            bil_to like VBAK-KUNNR,
            name3 like kna1-name1,
            traid like likp-traid,      "transport/vehicle no
            BOLNR LIKE LIKP-BOLNR,
            wadat_ist like likp-wadat_ist, "good mov. date
            posnr like lips-posnr,      "item
            matnr like lips-matnr,      "material
            arktx like lips-arktx,      "item text
            matkl like lips-matkl,      "mat group
            werks like lips-werks,      "plant
            lgort like lips-lgort,      "stoage location
            lfimg like lips-lfimg,      "del qty
            MEINS LIKE LIPS-MEINS,
            vrkme like lips-vrkme,      "sales unit
            UMVKZ LIKE LIPS-UMVKZ,
            UMVKN LIKE LIPS-UMVKN,
            charg like lips-charg,      "batch
            vgbel like lips-vgbel,      "reference doc
            mtart like lips-mtart,      "mat type
            vkbur like lips-vkbur,      "sales office
            vkgrp like lips-vkgrp,      "sales group
            vtweg like lips-vtweg,      "Distribution Channel
            spart like lips-spart,      "division
            billno like vbak-vbeln,
            basic like komvd-kwert,
            budat like bkpf-budat,
            fin_amt like vbrp-NETWR,
    END OF itab.
    data : begin of jtab occurs 0,
    kunnr like likp-kunnr,
    name2 like kna1-name2,
    vbeln like likp-vbeln,
    zkunnr like zkna1-zkunnr,
    zname like zkna1-zname,
    end of jtab.
    SELECTION-SCREEN SKIP 1 .
    SELECTION-SCREEN BEGIN OF BLOCK BLOCK1 WITH FRAME TITLE TEXT-003.
    SELECT-OPTIONS   : ABC FOR LIKP-WADAT_IST DEFAULT SY-DATUM
                                  NO INTERVALS   .
    SELECT-OPTIONS   : S_MATNR FOR  LIPS-MATNR NO INTERVALS   .
    SELECT-OPTIONS   : S_VKORG FOR  LIKP-VKORG NO INTERVALS.
    SELECT-OPTIONS   : S_VSTEL FOR  LIKP-VSTEL NO INTERVALS.
    SELECT-OPTIONS   : S_VKBUR FOR  LIKP-VKBUR NO INTERVALS.
    SELECT-OPTIONS   : S_VKGRP FOR  LIPS-VKGRP.
    SELECT-OPTIONS   : S_SPART FOR  LIPS-SPART.
    SELECT-OPTIONS   : S_VBELN3 FOR  LIKP-VBELN.
    SELECT-OPTIONS   : S_MATKL FOR  LIPS-MATKL NO INTERVALS,
                       S_KUNAG FOR LIKP-KUNAG.
    SELECTION-SCREEN  END OF BLOCK BLOCK1.
    select * from likp into corresponding fields of itab
                  WHERE  WADAT_IST IN ABC
                  AND    VBELN IN S_VBELN3
                  AND    VKORG IN S_VKORG
                  and VSTEL in S_VSTEL
                  AND VKBUR IN S_VKBUR
                  and lfart like 'Z%'
                  AND    VBTYP = 'J'
                  AND KUNAG IN S_KUNAG.
    select * from lips into corresponding fields of itab
                    WHERE VBELN =  ITAB-VBELN
                    AND   MATNR IN S_MATNR
                    AND   MATKL IN S_MATKL
                    AND VKBUR IN S_VKBUR
                    AND VKGRP IN S_VKGRP
                    AND SPART IN S_SPART.
    IF ITAB-VRKME = 'RM' AND ITAB-MEINS = 'KG'.
    ITAB-LFIMG = ITAB-LFIMG * ( ITAB-UMVKZ / ITAB-UMVKN ).
    ITAB-VRKME = 'KG'.
    ENDIF.
    SELECT SINGLE BSTNK BSTDK INTO (ITAB-BSTNK,ITAB-BSTDK) FROM VBAK
                     WHERE VBELN = ITAB-VGBEL.
    SELECT SINGLE NAME1 ORT01 FROM KNA1 INTO (ITAB-NAME2,ITAB-ORT01)
                                 WHERE KUNNR = ITAB-KUNNR.
    SELECT SINGLE NAME1 FROM KNA1 INTO ITAB-NAME1
                                 WHERE KUNNR = ITAB-KUNAG.
    *select single vbeln POSNN into (itab-billno,L_BILL_ITEM)  from vbfa where VBELV = itab-vbeln
    *and POSNV = itab-posnr and VBTYP_N in ('M','U').
    select vbeln POSNN from vbfa up to 1 rows into (itab-billno,L_BILL_ITEM)   where VBELV = itab-vbeln
    and POSNV = itab-posnr and VBTYP_N in ('M','U') order by vbeln DESCENDING .
    endselect.
    select single * from vbfa where vbelv = itab-billno and posnv = l_bill_item and
    vbtyp_n = 'N'.
    if sy-subrc = 0.
    clear : itab-billno, l_bill_item.
    endif.
    select single budat from bkpf into itab-budat where xblnr = itab-billno and
    blart = 'RV'.
    select single NETWR MWSBP into (l_netwr, l_MWSBP) from vbrp where vbeln = itab-billno
    and posnr = l_bill_item.
    itab-fin_amt = l_netwr + l_MWSBP.
    clear : l_netwr, l_MWSBP.
    select single kunnr from vbpa into itab-bil_to where
    vbeln = itab-BILLNO and PARVW = 'RE'.
    select single name1 into itab-name3 from kna1
    where kunnr = itab-bil_to.
    *select single VBELV POSNV from vbfa into (l_vbeln,l_posnr)
    *where VBELN = itab-vbeln and
    *POSNN = itab-posnr and VBTYP_N = 'J'.
    *select single VBELN POSNN from vbfa into (l_vbeln,l_posnr)
    *where VBELV = itab-vbeln and
    *POSNV = itab-posnr and VBTYP_N = 'M'.
    select VBELN POSNN from vbfa up to 1 rows into (l_vbeln,l_posnr)
    where VBELV = itab-vbeln and
    POSNV = itab-posnr and VBTYP_N = 'M' order by vbeln DESCENDING.
    endselect.
    select single * from vbfa where vbelv = l_vbeln and posnv = l_posnr and
    vbtyp_n = 'N'.
    if sy-subrc = 0.
    clear : l_vbeln, l_posnr.
    endif.
    if sy-subrc = 0.
    *select single KNUMv into l_KNUMv from vbak where vbeln = l_vbeln
    select single KNUMv into l_KNUMv from vbRk where vbeln = l_vbeln
    select * from konv where knumv = l_knumv and kposn = l_posnr and
    kschl in ('ZR00','ZR01','ZR02','ZOBC').
    itab-basic = itab-basic + KONV-KBETR.
    ENDSELECT.
    else.
    *select single KNUMv into l_KNUMv from ekko where ebeln = itab-vgbel.
    *select single KBETR from konv into itab-basic where knumv = l_knumv
    *and kposn = itab-posnr and kschl = 'P101'.
    select single KNUMv into l_KNUMv from VBRK where VBELN = itab-BILLNO.
    select * from konv where knumv = l_knumv and kposn = l_BILL_ITEM AND
    kschl in ('ZR00','ZR01','ZR02','ZOBC').
    itab-basic = itab-basic + KONV-KBETR.
    ENDSELECT.
    *zkna1-zkunnr = itab-kunnr.
    *insert zkna1.
    endif.
         clear : l_vbeln, L_BILL_ITEM, L_POSNR.
    APPEND ITAB.
    clear : itab-basic, itab-lfimg.
         ENDSELECT.
              clear : itab.
    ENDSELECT.
    <b>perform zscript.</b>
    *&      Form  zscript
          text
    -->  p1        text
    <--  p2        text
    FORM zscript .
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
      APPLICATION                       = 'TX'
      ARCHIVE_INDEX                     =
      ARCHIVE_PARAMS                    =
      DEVICE                            = 'PRINTER'
      DIALOG                            = 'X'
       FORM                              = 'ZREPORT2EMAIL'
       LANGUAGE                          = SY-LANGU
      OPTIONS                           =
      MAIL_SENDER                       =
      MAIL_RECIPIENT                    =
      MAIL_APPL_OBJECT                  =
      RAW_DATA_INTERFACE                = '*'
      SPONUMIV                          =
    IMPORTING
      LANGUAGE                          =
      NEW_ARCHIVE_PARAMS                =
      RESULT                            =
    EXCEPTIONS
      CANCELED                          = 1
      DEVICE                            = 2
      FORM                              = 3
      OPTIONS                           = 4
      UNCLOSED                          = 5
      MAIL_OPTIONS                      = 6
      ARCHIVE_ERROR                     = 7
      INVALID_FAX_NUMBER                = 8
      MORE_PARAMS_NEEDED_IN_BATCH       = 9
      SPOOL_ERROR                       = 10
      CODEPAGE                          = 11
      OTHERS                            = 12
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT ITAB.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'MANU'
       FUNCTION                       = 'SET'
       TYPE                           = 'BODY'
       WINDOW                         = 'MAIN'
    IMPORTING
      PENDING_LINES                  =
    EXCEPTIONS
      ELEMENT                        = 1
      FUNCTION                       = 2
      TYPE                           = 3
      UNOPENED                       = 4
      UNSTARTED                      = 5
      WINDOW                         = 6
      BAD_PAGEFORMAT_FOR_PRINT       = 7
      SPOOL_ERROR                    = 8
      CODEPAGE                       = 9
      OTHERS                         = 10
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDLOOP.
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
      RESULT                         =
      RDI_RESULT                     =
    TABLES
      OTFDATA                        =
    EXCEPTIONS
      UNOPENED                       = 1
      BAD_PAGEFORMAT_FOR_PRINT       = 2
      SEND_ERROR                     = 3
      SPOOL_ERROR                    = 4
      CODEPAGE                       = 5
      OTHERS                         = 6
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.                    " zscript
    The above one is first criteria just to understand how to send mail to the customers.
    <b>Second criteria</b> is i have to send the mail to the particular customer with only their details, the process should continue until it sends to all the customers with their details for that particular date.
    Please help me out.
    I have seen so many posts in the sdn but not able to understand the functional modules, how they declare that and how does it works...
    Please provide me a good material to understand the functional module and to declare them.
    Please solve this query i'll reward them with very good points.
    Thanks in advance.
    A.Rafique.

    Hi babar haroon,
    Thanks for the link.....
    I went through that link, i created smart form but i was not able to get the results because the pgm gets terminated after executing. I'll show u the code, the code is active. Please check out and tell me if  i have missed anything in the code...
    *& Report  ZZZ_TEST3
    REPORT  ZZZ_TEST3.
    *internal table declarations
    data: i_otf type itcoo occurs 0 with header line,
          i_tline type table of tline with header line,
          i_receivers type table of somlreci1 with header line,
          i_record like solisti1 occurs 0 with header line,
    *Objects to send mail.
          i_objpack like sopcklsti1 occurs 0 with header line,
          i_objtxt like solisti1 occurs 0 with header line,
          i_objbin like solisti1 occurs 0 with header line,
          i_reclist like somlreci1 occurs 0 with header line,
    *workarea declaration.
          w_objhead TYPE soli_tab,
          w_ctrlop TYPE ssfctrlop,
          w_compop TYPE ssfcompop,
          w_return TYPE ssfcrescl,
          w_doc_chng typE sodocchgi1,
          w_data TYPE sodocchgi1,
          w_buffer TYPE string,"To convert from 132 to 255
    Variables declarations
          v_form_name TYPE rs38l_fnam,
          v_len_in LIKE sood-objlen,
          v_len_out LIKE sood-objlen,
          v_len_outn TYPE i,
          v_lines_txt TYPE i,
          v_lines_bin TYPE i.
    call function 'SSF_FUNCTION_MODULE_NAME'
    *call function '/1BCDWB/SF00000105'
          exporting
          formname = 'ZZZ_TEST2'
          importing
          fm_name = v_form_name
          exceptions
          no_form = 1
          no_function_module = 2
          others = 3.
          IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
          w_ctrlop-getotf = 'X'.
          w_ctrlop-no_dialog = 'X'.
          w_compop-tdnoprev = 'X'.
         CALL FUNCTION '/1BCDWB/SF00000105'
          EXPORTING
            ARCHIVE_INDEX              =
            ARCHIVE_INDEX_TAB          = itab1
            ARCHIVE_PARAMETERS         =
            CONTROL_PARAMETERS         =
            MAIL_APPL_OBJ              =
            MAIL_RECIPIENT             =
            MAIL_SENDER                =
            OUTPUT_OPTIONS             =
            USER_SETTINGS              = 'X'
          IMPORTING
            DOCUMENT_OUTPUT_INFO       =
            JOB_OUTPUT_INFO            = wa
            JOB_OUTPUT_OPTIONS         =
          EXCEPTIONS
            FORMATTING_ERROR           = 1
            INTERNAL_ERROR             = 2
            SEND_ERROR                 = 3
            USER_CANCELED              = 4
            OTHERS                     = 5
         IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
    CALL FUNCTION v_form_name
          EXPORTING
          control_parameters = w_ctrlop
          output_options = w_compop
          user_settings = 'X'
          IMPORTING
          job_output_info = w_return
          EXCEPTIONS
          formatting_error = 1
          internal_error = 2
          send_error = 3
          user_canceled = 4
          OTHERS = 5.
          IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
          i_otf[] = w_return-otfdata[].
          CALL FUNCTION 'CONVERT_OTF'
          EXPORTING
          format = 'PDF'
          max_linewidth = 132
          IMPORTING
          bin_filesize = v_len_in
          TABLES
          otf = i_otf
          lines = i_tline
          EXCEPTIONS
          err_max_linewidth = 1
          err_format = 2
          err_conv_not_possible = 3
          OTHERS = 4.
          IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
          Convert PDF from 132 to 255.
          LOOP AT i_tline.
          Replacing space by ~
          TRANSLATE i_tline USING '~'.
          CONCATENATE w_buffer i_tline INTO w_buffer.
          ENDLOOP.
    Replacing ~ by space
          TRANSLATE w_buffer USING '~'.
          DO.
          i_record = w_buffer.
          Appending 255 characters as a record
          APPEND i_record.
          SHIFT w_buffer LEFT BY 255 PLACES.
          IF w_buffer IS INITIAL.
          EXIT.
          ENDIF.
          ENDDO.
          Refresh: i_reclist,
          i_objtxt,
          i_objbin,
          i_objpack.
          clear w_objhead.
          Object with PDF.
          i_objbin[] = i_record[].
         DESCRIBE TABLE i_objbin LINES v_lines_bin.
          Object with main text of the mail.
          i_objtxt = 'Find attached the output of the smart form.'.
          APPEND i_objtxt.
         DESCRIBE TABLE i_objbin LINES v_lines_txt.
          i_objtxt = 'Regards,'.
          APPEND i_objtxt.
          i_objtxt = 'J.Jayanthi'.
          APPEND i_objtxt.
          DESCRIBE TABLE i_objtxt LINES v_lines_txt.
          Document information.
          w_doc_chng-obj_name = 'Smartform'.
          w_doc_chng-expiry_dat = sy-datum + 10.
          w_doc_chng-obj_descr = 'Smart form output'.
          w_doc_chng-sensitivty = 'F'. "Functional object
          w_doc_chng-doc_size = v_lines_txt * 255.
          Pack to main body as RAW.
          Obj. to be transported not in binary form
          CLEAR i_objpack-transf_bin.
          Start line of object header in transport packet
          i_objpack-head_start = 1.
          Number of lines of an object header in object packet
          i_objpack-head_num = 0.
          Start line of object contents in an object packet
          i_objpack-body_start = 1.
          Number of lines of the object contents in an object packet
          i_objpack-body_num = v_lines_txt.
          Code for document class
          i_objpack-doc_type = 'RAW'.
          APPEND i_objpack.
          Packing as PDF.
          i_objpack-transf_bin = 'X'.
          i_objpack-head_start = 1.
         i_objpack-head_num = 1.
          i_objpack-head_num = 0.
          i_objpack-body_start = 1.
          i_objpack-body_num = v_lines_bin.
          i_objpack-doc_type = 'PDF'.
          i_objpack-obj_name = 'Smartform'.
          CONCATENATE 'Smartform_output' '.pdf'
          INTO i_objpack-obj_descr.
          i_objpack-doc_size = v_lines_bin * 255.
          APPEND i_objpack.
          Document information.
          CLEAR i_reclist.
          e-mail receivers.
         i_reclist-receiver = '[email protected]'.
          i_reclist-receiver = '[email protected]'.
          i_reclist-express = 'X'.
          i_reclist-rec_type = 'U'. "Internet address
          APPEND i_reclist.
          Sending mail.
          CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
          document_data = w_doc_chng
          put_in_outbox = 'X'
          TABLES
          packing_list = i_objpack
          object_header = w_objhead
          contents_hex = i_objbin
          contents_txt = i_objtxt
          receivers = i_reclist
          EXCEPTIONS
          too_many_receivers = 1
          document_not_sent = 2
          document_type_not_exist = 3
          operation_no_authorization = 4
          parameter_error = 5
          x_error = 6
          enqueue_error = 7
          OTHERS = 8.
          IF sy-subrc <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    Please reply me back, it is very urgent..
    Thanks and regards.
    A.Rafique

  • DEFINE statement in Scripts

    Hi all,
    I am using the command DEFINE in my script.
    Syntax /: DEFINE &TEXT& = 'XXX'.
    The variable TEXT has been assigned a default length of 80 characters.
    Can anyone let me know how can I change this length to user defined value say 150.
    Regards,
    Senthil G.

    you can not change the length..if you want to display 50 char lentgth then use like
    /: PERFORM NAME IN PROGRAM NAME
    /: USING &URTEXT&
    /: CHANGING &GETTEXT&
    /;ENDPERFORM.
    Create a program in se38 then declare a variable in se38 length should be 50 char,
    then pass that 50char lenth to changin parameters..
    Reward Points if it is helpful
    Thanks
    Seshu

  • Attach User define tables and view table need add to database into my add-o

    Hi there,
    I want to deploy an addon, there are User define tables and view table need add to database.
    I need some advice on some issues..
    1. Can I attach User define tables and view table need add to database into my addon.
    2. I wonder which chance is properly to add them, if add these user define objects in time of install and I can't get the enough information that connect to SQL server
    Thanks for any help.

    Hi Weerachai,
    Here's an example of how to create a user-defined table in code. My suggestion would be to check if it exists when your add-on starts up and then if not, create the tables, fields and objects.
    'User Table
        Private Sub CreateTable(ByVal sTable As String, ByVal sDescription As String, ByVal oObjectType As SAPbobsCOM.BoUTBTableType)
            Dim oUserTablesMD As SAPbobsCOM.UserTablesMD
            Dim iResult As Long
            Dim sMsg As String
            oUserTablesMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
            If Not oUserTablesMD.GetByKey(sTable) Then
                oUserTablesMD.TableName = sTable
                oUserTablesMD.TableDescription = sDescription
                oUserTablesMD.TableType = oObjectType
                iResult = oUserTablesMD.Add()
                If iResult <> 0 Then
                    oCompany.GetLastError(iResult, sMsg)
                    MessageBox.Show("Error Creating Table: " & sTable & " Error: " & sMsg)
                End If
            End If
            System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserTablesMD)
        End Sub
    'User Field
        Private Sub CreateField(ByVal sTable As String, ByVal sName As String, ByVal sDescription As String, _
                                ByVal iSize As Integer, ByVal aFieldType As SAPbobsCOM.BoFieldTypes, _
                                ByVal aSubType As SAPbobsCOM.BoFldSubTypes, ByVal sLink As String, _
                                ByVal bMandatory As SAPbobsCOM.BoYesNoEnum)
            Dim oUserFieldsMD As SAPbobsCOM.UserFieldsMD
            Dim oTable As SAPbobsCOM.UserTable
            Dim iResult As Long
            Dim sMsg As String
            Dim i As Integer
            Dim x As Integer
            Dim bFound As Boolean = False
            Dim oField As SAPbobsCOM.Field
            oTable = oCompany.UserTables.Item(sTable)
            For i = 0 To oTable.UserFields.Fields.Count - 1
                oField = oTable.UserFields.Fields.Item(i)
                'MessageBox.Show(oField.Name)
                If oField.Name = "U_" & sName Then
                    bFound = True
                End If
            Next
            System.Runtime.InteropServices.Marshal.ReleaseComObject(oTable)
            If Not bFound Then
                oUserFieldsMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
                oUserFieldsMD.TableName = "@" & sTable
                oUserFieldsMD.Name = sName
                oUserFieldsMD.Description = sDescription
                oUserFieldsMD.Type = aFieldType
                If aFieldType = SAPbobsCOM.BoFieldTypes.db_Alpha Or aFieldType = SAPbobsCOM.BoFieldTypes.db_Numeric Then
                    oUserFieldsMD.EditSize = iSize
                Else
                    oUserFieldsMD.SubType = aSubType
                    oUserFieldsMD.Mandatory = bMandatory
                End If
                oUserFieldsMD.LinkedTable = sLink
                iResult = oUserFieldsMD.Add()
                If iResult <> 0 Then
                    oCompany.GetLastError(iResult, sMsg)
                    MessageBox.Show("Error Creating Field: " & sTable & "." & sName & " Error: " & sMsg)
                End If
                System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserFieldsMD)
            End If
        End Sub
    If you want to create a View I think you would have to use the RecordSet object. This will ensure that you don't have to log in to the database again
    Hope it helps,
    Adele

  • Is possible to separate path using script....?

    Hi Everyone,
    I have one overall path and two outer edge path.
    use overall path to separate each like pant and tops.
    Is possible to separate path using script. I have also tried script but is not working on second separation.
    can any rectify that script is possible...?
    -yajiv
    #target Photoshop
    app.bringToFront;
    var docRef = app.activeDocument;
    var myDocname=app.activeDocument.name
    var e=0
    try {
        var ecp=docRef.colorProfileName;
         var n=docRef.pathItems.length;
                        if(n>0){
                if(docRef.pathItems[0].name=="Path 1"){
                  var pathRef = docRef.pathItems[0].duplicate(); 
                  var path1=docRef.pathItems.getByName("1");   
                  //path1.duplicate();         
                  path1.select();
                  Path_copy();
                  var pathitem=docRef.pathItems.getByName("Path 1 copy");
                   pathitem.select();
                   Path_Paste();
                   pathitem.operation = ShapeOperation.SHAPEINTERSECT;
                   Path_Combine();
                   var path1=docRef.pathItems.getByName("1");  
                   var pathRef1 = path1.duplicate();
                   path1.select();
                   path1.remove();
                    var pathitem=docRef.pathItems.getByName("Path 1 copy");
                    pathitem.select();
                    pathitem.name="1";
                    var pathitem=docRef.pathItems.getByName("Box");
                    pathitem.select();
                    Path_copy();
                   var path1=docRef.pathItems.getByName("1 copy");  
                    path1.select();
                    path1.name="OL"
                    Path_Paste();
                    path1.operation = ShapeOperation.SHAPEXOR;
                    Path_Combine();
                   var pathRef = docRef.pathItems[0].duplicate(); 
                   var pathitem=docRef.pathItems.getByName("Path 1 copy");
                   pathitem.select();
                   Path_copy();
                   var path2=docRef.pathItems.getByName("OL");  
                   path2.select();
                   Path_Paste();
                   path2.operation = ShapeOperation.SHAPEINTERSECT;
                   alert(path2.operation);
                   Path_Combine();
    catch (e) {
       alert(e);
    //alert ("PSR_LWC_PLUS_V2_PT - Color Profile not Embedded...\n Check it out...!!!")
    function Path_copy(){
        var id200 = charIDToTypeID( "copy" );
        executeAction( id200, undefined, DialogModes.NO );
    function Path_Paste(){
        var id204 = charIDToTypeID( "past" );
        executeAction( id204, undefined, DialogModes.NO );
    function Path_Combine(){
                var idcombine = stringIDToTypeID( "combine" );
                    var desc26 = new ActionDescriptor();
                    var idnull = charIDToTypeID( "null" );
                        var ref25 = new ActionReference();
                        var idPath = charIDToTypeID( "Path" );
                        var idOrdn = charIDToTypeID( "Ordn" );
                        var idTrgt = charIDToTypeID( "Trgt" );
                        ref25.putEnumerated( idPath, idOrdn, idTrgt );
                    desc26.putReference( idnull, ref25 );
                executeAction( idcombine, desc26, DialogModes.NO );

    Hi c.pfaffenbichler,
    Finally with your guidance I rectify the script error.
    Thank you for your time and knowledge, I really do appreciate it.
    Once again Thanks for your continue support.
    "Wish you Happy successful New Year - 2012...!!!"
    Regards
    -yajiv....
    Here is the Code.....!
    // create path intersections;
    // 2011; use it at your own risk;
    #target photoshop
    if (app.documents.length > 0) {
    var myDocument = app.activeDocument;
    // set to pixels;
    var originalRulerUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.POINTS;
    var theArray = new Array;
    var theNumber = myDocument.pathItems.length;
    // »simplify« paths and collect components;
    for (var m = 0; m < theNumber; m++) {
              myDocument.pathItems[m].select();
              combinePath();
              theArray.push(collectPathComponents(myDocument, myDocument.pathItems[m]));
          var OV_Path=myDocument.pathItems[0]
        // create intersections;
        for (var n = 1; n < theNumber; n++) {
            //alert(OV_Path);
              var theFirst = collectPathComponents(myDocument,OV_Path );
              var theSecond = theArray[n];
              for (var a = 0; a < theSecond.length; a++) {
                        theFirst.push(theSecond[a]);
              var thePath = createPathFromPathComponentActionDesc(theFirst, "intersect",0);
              makePath(myDocument.pathItems[0].name+" intersected with "+myDocument.pathItems[n].name);
              combinePath();
    // create subtraction;
        var theFirst = collectPathComponents(myDocument, myDocument.pathItems[0]);
        for (var o = 1; o < theNumber; o++) {
                  var theSecond = theArray[o];
                  for (var a = 0; a < theSecond.length; a++) {
                            theFirst.push(theSecond[a])
        var thePath = createPathFromPathComponentActionDesc(theFirst, "subtract",1); // Modify the parameter, add flag for function
        //subtract
        makePath("all others subtracted from "+myDocument.pathItems[0].name);
        combinePath();
    // reset;
    app.preferences.rulerUnits = originalRulerUnits;
        function combinePath () {
        // =======================================================
        var idcombine = stringIDToTypeID( "combine" );
            var desc4 = new ActionDescriptor();
            var idnull = charIDToTypeID( "null" );
                var ref3 = new ActionReference();
                var idPath = charIDToTypeID( "Path" );
                var idOrdn = charIDToTypeID( "Ordn" );
                var idTrgt = charIDToTypeID( "Trgt" );
                ref3.putEnumerated( idPath, idOrdn, idTrgt );
            desc4.putReference( idnull, ref3 );
        executeAction( idcombine, desc4, DialogModes.NO );
        //components correspond to subPathItems,  subpathList contains the actual paths than can make up one subPathItem ;
        ////// collect path infor from actiondescriptor //////
        function collectPathComponents (myDocument, thePath) {
            //var myDocument = app.activeDocument;
            var originalRulerUnits = app.preferences.rulerUnits;
            app.preferences.rulerUnits = Units.POINTS;
            // based of functions from xbytor’s stdlib;
            var ref = new ActionReference();
            for (var l = 0; l < myDocument.pathItems.length; l++) {
                      var thisPath = myDocument.pathItems[l];
                      if (thisPath == thePath && thisPath.name == "Work Path") {
                                ref.putProperty(cTID("Path"), cTID("WrPt"));
                      if (thisPath == thePath && thisPath.name != "Work Path" && thisPath.kind != PathKind.VECTORMASK) {
                                ref.putIndex(cTID("Path"), l + 1);
                      if (thisPath == thePath && thisPath.kind == PathKind.VECTORMASK) {
                   // var idPath = charIDToTypeID( "Path" );
                    var idPath = charIDToTypeID( "Path" );
                    var idvectorMask = stringIDToTypeID( "vectorMask" );
                    ref.putEnumerated( idPath, idPath, idvectorMask );
             var desc = app.executeActionGet(ref);
            var pname = desc.getString(cTID('PthN'));
            // create new array;
            var theArray = new Array;
            var pathContents = desc.getObjectValue(cTID("PthC"));
            var pathComponents = pathContents.getList(sTID('pathComponents'));
            for (var m = 0; m < pathComponents.count; m++) {
            var comp = pathComponents.getObjectValue(m);
            var subPathList = comp.getList(sTID("subpathListKey"));
            var shapeOp = comp.getEnumerationType(sTID("shapeOperation"));
            //alert("shapeOp - "+shapeOp);    q
            theArray.push([comp, subPathList, shapeOp]);
            // by xbytor, thanks to him;
            function cTID (s) { return cTID[s] || cTID[s] = app.charIDToTypeID(s); };
            function sTID (s) { return sTID[s] || sTID[s] = app.stringIDToTypeID(s); };
            // reset;
            app.preferences.rulerUnits = originalRulerUnits;
            return theArray;
        ////// create a path from an array of pathcomponents //////
        function createPathFromPathComponentActionDesc (theArray, shapeOperation,flag) {
        cTID = function(s) { return app.charIDToTypeID(s); };
        sTID = function(s) { return app.stringIDToTypeID(s); };
        var desc1 = new ActionDescriptor();
        var ref1 = new ActionReference();
        ref1.putProperty(cTID('Path'), cTID('WrPt'));
        desc1.putReference(sTID('null'), ref1);
        var list1 = new ActionList();
        for (var m = 0; m < theArray.length; m++) {
                  var desc37 = new ActionDescriptor();
                  if (m == 0 && flag=0) {
                            desc37.putEnumerated(sTID('shapeOperation'), sTID('shapeOperation'), cTID('Intr'));
                  else  if (m == 0 && flag=1) {//Modify mode to exclude.....!
                             desc37.putEnumerated(sTID('shapeOperation'), sTID('shapeOperation'), theArray[m][2]);
                  else {
                            switch (shapeOperation) {
                                      case "intersect":
                                      desc37.putEnumerated(sTID('shapeOperation'), sTID('shapeOperation'), cTID('Intr'));
                                      break;
                                      case "subtract":
                                      desc37.putEnumerated(sTID('shapeOperation'), sTID('shapeOperation'), cTID('Sbtr'));
                                      break;
                                      case "exclude":
                                      desc37.putEnumerated(sTID('shapeOperation'), sTID('shapeOperation'), 696);
                                      default:
                                      desc37.putEnumerated(sTID('shapeOperation'), sTID('shapeOperation'), theArray[m][2]);
                                      break;
                  var list5 = new ActionList();
                  desc37.putList(cTID('SbpL'), theArray[m][1]);
                  list1.putObject(cTID('PaCm'), desc37);
        desc1.putList(cTID('T   '), list1);
        executeAction(cTID('setd'), desc1, DialogModes.NO);
        ////// make work path regular path //////
        function makePath (aName) {
        // =======================================================
        var idMk = charIDToTypeID( "Mk  " );
            var desc4 = new ActionDescriptor();
            var idnull = charIDToTypeID( "null" );
                var ref2 = new ActionReference();
                var idPath = charIDToTypeID( "Path" );
                ref2.putClass( idPath );
            desc4.putReference( idnull, ref2 );
            var idFrom = charIDToTypeID( "From" );
                var ref3 = new ActionReference();
                var idPath = charIDToTypeID( "Path" );
                var idWrPt = charIDToTypeID( "WrPt" );
                ref3.putProperty( idPath, idWrPt );
            desc4.putReference( idFrom, ref3 );
            var idNm = charIDToTypeID( "Nm  " );
            desc4.putString( idNm, aName );
        executeAction( idMk, desc4, DialogModes.NO );

  • Default path for scripts within SQL Developer version 3.2.20.09.87

    I have SQL Developer version 3.2.20.09.87 and needed to know if the 'Set default path to look for scripts' be a UNC path?
    Thanks

    I hadn't tried it but now I did and it worked.
    I also tried setting the Utilities Export default file location to a UNC path and I was able to set it but when I try to go to it via the 'browse' button, it doesnt go to it. It does, however, use it when I export.
    Also when I do File > Open, I'm not able to navigate to UNC paths via the 'Home' or 'Desktop' buttons on the left hand side of the window and am not able to navigate to a network location from the 'Locations' box.
    Any ideas? I am on Windows 7.
    Thanks

  • Can we define path for a bean out side work space?

    <bean id="HSBCMarketsReports"
                   class="HSBCMarketsReportsConfiguration">
                   <property name="reports">
                        <map>
                        <entry key="PinnacleReportsConfig" value="PinnacleReportsConfig.xml"/>
                        <entry key="PinnacleReportsData" value="PinnacleDummyData.xml"/>
                        </map>
                   </property>
         </bean>it works well but when make the same as
    <bean id="HSBCMarketsReports"
                   class="HSBCMarketsReportsConfiguration">
                   <property name="reports">
                        <map>
                        <entry key="PinnacleReportsConfig" value="PinnacleReportsConfig.xml"/>
                        <entry key="PinnacleReportsData" value="C:\PinnacleDummyData.xml"/>
                        </map>
                   </property>
         </bean>
    it says C:\PinnacleDummyData.xml not found i work space , how to make it look for the file out side work space (particularly given location)

    LoveOpensource wrote:
    <bean id="HSBCMarketsReports"
                   class="HSBCMarketsReportsConfiguration">
                   <property name="reports">
                        <map>
                        <entry key="PinnacleReportsConfig" value="PinnacleReportsConfig.xml"/>
                        <entry key="PinnacleReportsData" value="PinnacleDummyData.xml"/>
                        </map>
                   </property>
         </bean>it works well but when make the same as
    <bean id="HSBCMarketsReports"
                   class="HSBCMarketsReportsConfiguration">
                   <property name="reports">
                        <map>
                        <entry key="PinnacleReportsConfig" value="PinnacleReportsConfig.xml"/>
                        <entry key="PinnacleReportsData" value="C:\PinnacleDummyData.xml"/>
                        </map>
                   </property>
         </bean>
    it says C:\PinnacleDummyData.xml not found i work space , how to make it look for the file out side work space (particularly given location)Why dont you include the xml file in your workspace/web application?
    All these are custom tags, right? So somewhere in the code for the custom tags, it would load the xml file for parsing.
    There are different ways to load a file. The first is to use the absolute path (not recommended) and anyways I dont think your application does it that way because then your file would have been loaded even if it's outside the web application folder.
    The better approach is to load the file as a resource stream.
    The ServletContext object has a method getResourceAsStream() to load files from the web application path. But then the xml file has to be inside the web application and if this is indeed how your tags have been coded, you have no other option but to include the xml file in your web application.
    There is another way - to use the ClassLoader's getResourceAsStream() method. The ClassLoader looks up the classpath variable to search for files. In this case, you need to add your xml file location (c:/dir or whatever) to the application server's classpath. Look up in the startup scripts for your application.
    As I said, it all depends upon the tag code that looks up the xml file and whether you can tweak it.
    cheers,
    ram.

  • How to excute a power shell script to remote machine using power shell script folder path and script name

    Hi,
    Let say, I have 3 parameters.
    1. Script FolderPath (Remote path for e.g \\RD101\ScriptSharedFolder     Here RD101 is one server)
    2. Script Name(StopAllService.ps1)
    3. Server Name (RD45)
    I want to execute a powershell scritp in my local machine(Test1)  and in that script I want to pass the above three parameters.Now I want to excute the StopAllService.ps1 script into RD45 server. But the script is available in RD101 machine.
    So What I want to here How can we do this ? I have script name and script folder path and target execution server name.
    Pls giude me or give me the script.
    By
    A Path Finder..
    JoSwa 
    If a post answers your question, please click &quot;Mark As Answer&quot; on that post and &quot;Mark as Helpful&quot;
    Best Online Journal

    Hi,
    You got 2 solutions for your problem:
    1- If you have permission to run scripts in the remote computer without specifying your credential,
    then, the first reply solve your problem.
    2- If you have permission to run scripts in the remote computer
    having to specify your credential, l then,
    my solution solves your problem.
    If the remote computer requires signed scripts only, you need signed script. Period. Or are you trying to break remote computer security?
    If you need signed script, there's no psdrive that'll circumvent such requirement.
    The problem is that the execution policy is set to "RemoteSigned". Using the URL explicitly tags that script as being from a remote source, and the policy blocks it.  The PSDrive provides a local reference for the script.  It does not
    sign the script but the local drive reference may prevent it from being blocked for being from a remote source. I'll test that later.
    Script signing is not and should never be considered a security measure. It is easily circumvented by running the script using powershell.exe, and using the -ExecutionPolicy parameter to override whatever the local execution policy setting is. 
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • Repost: User-Defined Access Keys Script (PHP)

    Hey guys -
    I'm in need of a *PHP 5* script that will allow users to set
    their own
    access keys for predefined pages. I found this script and
    neither like the
    fact that it's in PHP 4 and the way the output looks (e.g.,
    needing to check
    the checkbox) -
    http://juicystudio.com/article/user-defined-accesskeys.php
    I've also run across this one which has the output format
    that I want;
    however, his only directions, which are only comments in his
    script, are
    extremely vague and unclear - for a _learner_ in PHP. Here is
    his link -
    http://cms.elfden.co.uk/2005/12/20/access-keys-revisted/#more-72
    If someone has a solution for new learners and would be
    willing to share it,
    that would be wonderful. I'm hoping you can point me in a
    good direction
    with directions that are clear to understand. And just incase
    you're
    wondering, I did run across this one too - yet still, lacking
    in directions
    it's quite hard to follow and understand if you don't really
    know a plethora
    of PHP code -
    http://www.blether.com/archives/2006/02/userdefined_acc.php
    Again - if someone can take the time and find me a good
    indepth tutorial
    explanation or something along those lines (perhaps you may
    even have a
    script you wish to share), I'd be very grateful.
    Thanks to everyone who has been helping me along the way with
    my PHP.
    Shane H
    [email protected]
    http://www.avenuedesigners.com

    I'm not too keen on creating my own PHP script, but perhaps
    in the
    near-future you should write up a PHP5 solution...
    Thanks though, Thierry.
    Shane H
    [email protected]
    http://www.avenuedesigners.com
    ===============================
    Proud GAWDS Member
    http://www.gawds.org
    ===============================
    "Thierry | www.TJKDesign.com" <[email protected]>
    wrote in message
    news:e52o7i$3bc$[email protected]..
    > "Shane H" <[email protected]> wrote
    in message
    > news:e52gqc$nvh$[email protected]..
    >> Hey guys -
    >>
    >> I'm in need of a *PHP 5* script that will allow
    users to set their own
    >> access keys for predefined pages. I found this
    script and neither like
    >> the
    >> fact that it's in PHP 4 and the way the output looks
    (e.g., needing to
    > check
    >> the checkbox) -
    >>
    >>
    http://juicystudio.com/article/user-defined-accesskeys.php
    >
    > I wrote an ASP solution using a different logic:
    >
    http://www.tjkdesign.com/articles/user_defined_accesskeys.asp
    > It may help you create a PHP version...
    >
    > --
    > Thierry
    > Articles and Tutorials:
    http://www.TJKDesign.com/go/?0
    > The perfect FAQ page:
    http://www.TJKDesign.com/go/?9
    > CSS-P Templates:
    http://www.TJKDesign.com/go/?1
    > CSS Tab Menu:
    http://www.TJKDesign.com/go/?3
    >
    >
    >

  • Wanted: User-Defined Access Keys Script (PHP)

    Hey guys -
    I'm in need of a *PHP 5* script that will allow users to set
    their own
    access keys for predefined pages. I found this script and
    neither like the
    fact that it's in PHP 4 and the way the output looks (e.g.,
    needing to check
    the checkbox) -
    http://juicystudio.com/article/user-defined-accesskeys.php
    I've also run across this one which has the output format
    that I want;
    however, his only directions, which are only comments in his
    script, are
    extremely vague and unclear - for a _learner_ in PHP. Here is
    his link -
    http://cms.elfden.co.uk/2005/12/20/access-keys-revisted/#more-72
    If someone has a solution for new learners and would be
    willing to share it,
    that would be wonderful. I'm hoping you can point me in a
    good direction
    with directions that are clear to understand. And just incase
    you're
    wondering, I did run across this one too - yet still, lacking
    in directions
    it's quite hard to follow and understand if you don't really
    know a plethora
    of PHP code -
    http://www.blether.com/archives/2006/02/userdefined_acc.php
    Again - if someone can take the time and find me a good
    indepth tutorial
    explanation or something along those lines (perhaps you may
    even have a
    script you wish to share), I'd be very grateful.
    Thanks to everyone who has been helping me along the way with
    my PHP.
    Shane H
    [email protected]
    http://www.avenuedesigners.com

    I'm not too keen on creating my own PHP script, but perhaps
    in the
    near-future you should write up a PHP5 solution...
    Thanks though, Thierry.
    Shane H
    [email protected]
    http://www.avenuedesigners.com
    ===============================
    Proud GAWDS Member
    http://www.gawds.org
    ===============================
    "Thierry | www.TJKDesign.com" <[email protected]>
    wrote in message
    news:e52o7i$3bc$[email protected]..
    > "Shane H" <[email protected]> wrote
    in message
    > news:e52gqc$nvh$[email protected]..
    >> Hey guys -
    >>
    >> I'm in need of a *PHP 5* script that will allow
    users to set their own
    >> access keys for predefined pages. I found this
    script and neither like
    >> the
    >> fact that it's in PHP 4 and the way the output looks
    (e.g., needing to
    > check
    >> the checkbox) -
    >>
    >>
    http://juicystudio.com/article/user-defined-accesskeys.php
    >
    > I wrote an ASP solution using a different logic:
    >
    http://www.tjkdesign.com/articles/user_defined_accesskeys.asp
    > It may help you create a PHP version...
    >
    > --
    > Thierry
    > Articles and Tutorials:
    http://www.TJKDesign.com/go/?0
    > The perfect FAQ page:
    http://www.TJKDesign.com/go/?9
    > CSS-P Templates:
    http://www.TJKDesign.com/go/?1
    > CSS Tab Menu:
    http://www.TJKDesign.com/go/?3
    >
    >
    >

  • Error Log Contains Path To PSD, I need to open each one listed and SAVE AS with Maximum Compatibility

    Hi,
    I am looking to create a script that pulls the path of the listed PSD from the attached Error Log file.
    The files could not be read. Please re-open the files in Photoshop and save them with the ‘Maximize Compatibility’ preference enabled. (20)
        \\WDMYCLOUDEX4\imageArchive\Brandon Barre\Bradon\Sheraton Cypress\PSDs\Sheraton Cypress Court Restaurant.psd
        \\WDMYCLOUDEX4\imageArchive\Brandon Barre\Bradon\Sheraton Cypress\PSDs\Sheraton Cypress Rock Garden.psd
        \\WDMYCLOUDEX4\imageArchive\Brandon Barre\Bradon\Sheraton Cypress\PSDs\Sheraton Link.psd
        \\WDMYCLOUDEX4\imageArchive\Brandon Barre\Bradon\Sheraton Cypress\PSDs\Sheraton Cypress Court Area.psd
        \\WDMYCLOUDEX4\imageArchive\Brandon Barre\Bradon\Sheraton Cypress\PSDs\SheratonCypress_Guestroom.psd
        \\WDMYCLOUDEX4\imageArchive\Brandon Barre\Bradon\PSDS\Ballroom.psd
        \\WDMYCLOUDEX4\imageArchive\Brandon Barre\Bradon\PSDS\DiningArea.psd
        \\WDMYCLOUDEX4\imageArchive\Brandon Barre\Bradon\PSDS\Lobby.psd
        \\WDMYCLOUDEX4\imageArchive\Brandon Barre\Bradon\PSDS\Pool.psd
        \\WDMYCLOUDEX4\imageArchive\Brandon Barre\Bradon\PSDS\Meeting Space.psd
        \\WDMYCLOUDEX4\imageArchive\Brandon Barre\Bradon\PSDS\Fitness.psd
        \\WDMYCLOUDEX4\imageArchive\Brandon Barre\Bradon\Four Points London\PSD\Four Points London_Guestbathroom.psd
        \\WDMYCLOUDEX4\imageArchive\Brandon Barre\Bradon\Four Points London\PSD\Four Points London_GuestSuite.psd
        \\WDMYCLOUDEX4\imageArchive\Brandon Barre\Bradon\Four Points London\PSD\FP_London_BusinessCenter.psd
        \\WDMYCLOUDEX4\imageArchive\Brandon Barre\Bradon\Four Points London\PSD\Four Points London_GuestroomBathroomTwo.psd
        \\WDMYCLOUDEX4\imageArchive\Brandon Barre\Bradon\Four Points London\PSD\Four Points London_GuestroomBathroom.psd
        \\WDMYCLOUDEX4\imageArchive\Brandon Barre\Bradon\Four Points London\PSD\Four Points London_GuestSuite_Desk.psd
        \\WDMYCLOUDEX4\imageArchive\Brandon Barre\Bradon\Four Points London\PSD\Four Points London_Guestroom.psd
        \\WDMYCLOUDEX4\imageArchive\Brandon Barre\Bradon\Four Points London\PSD\Four Points London_Guestroom_Double.psd
        \\WDMYCLOUDEX4\imageArchive\Brandon Barre\Bradon\Four Points London\PSD\Untitled1.psd
    The text above was created when the PSD was saved with Maximum Compatibilyt turned off and Lightroom will not Import them.
    I am looking for guidance or someone to create it as I am willing to pay for it that references the text file, each line opening the file in Photoshop and Saving As in same place with Maximize Compatibility and done sequentially.
    Thank you kindly,
    Thomas

    Something to get you started:
    var inputFolderPath = "/path/to/folder",
        outputFolderPath = "/path/to/other/folder",
        templatePath = "/path/to/template.indd",
        inputFolder = new Folder(folderPath),
        outputFolder = new Folder(outputFolderPath),
        template = new File(tempatePath),
        files = inputFolder.getFiles(),
        file, fileString, doc, idName, i, l;
    outputFolder.create();
    for (i = 0, l = files.length; i < l; i++) {
        file = file.open('r');
        idName = file.displayName.replace(/\.[^\/.]+$/, '') + ".indd";
        fileString = file.read();
        file.close();
        doc = app.open(template);
        doYourStuff(doc, fileString);
        doc.save(outputFolder + "/" + idName);
        doc.close();
    This would name the versioned InDesign files the same as the input text file but with the ".indd" extension. You might need to consider filtering the files in the getFiles() call, if you have filetypes in your input folder you don't want to process. It's clearer to just re- open the template file on disk, rather than reverting, and amounts to the same thing.
    Jeff

  • Serious, Pro level Illustrator Scripting help needed

    I need a pretty robust script and I am willing to pay for it. I am sorry if soliciting like that is a against forum rules, I will find out if my post gets, deleted/locked. I am just serious about this need for a script.
    I am not sure if this is possible in Illustrator, but I really hope so. I need a script that will read the information from the x,y position and width x height in the Transform Palette of any selected object (or objects would be even better), including all the the different reference point values, and then write discrete user selected info; based on a easy to use panel of check marks, radio buttons or whatever, to a text field a set number of pixel offset from the upper left corner of the object bounds.
    I would be happy to explain further if this is the correct place for this type of discussion.
    If this is not the right place, my humblest apologies but perhaps someone could turn me on to a better place?
    Thanks in advance for any help!

    This does not sound like a big task.
    Here is a script I use every day.
    displays the Width and Height below each selected Item or group.
    have a go and let me know if this is kinda what you are thinking.
    from there we can work out how you want everything displayed
    var doc = app.activeDocument;
    var sel = doc.selection;
    var TOmm = 2.83466796875;
    Dim(sel);
    function Dim(objs) {
        for (var i=objs.length-1;i>=0;i--) { // loop through your collection of objects
            var bounds = objs[i].visibleBounds; // Get visibal bounds, which are only visable bounds in some cases...
            var b1 = bounds[0] /TOmm;
            var b2 = bounds[1] /TOmm;
            var b3 = bounds[2] /TOmm;
            var b4 = bounds[3] /TOmm;
            var W = Math.abs(b3-b1).toFixed(1);
            var H = Math.abs(b4-b2).toFixed(1);
            var txt = doc.textFrames.add(); // Create the text frame
            txt.contents = "Size:  "+ H + " x " +W + " mm W";  // Adds contents to frame
            txt.position = [objs[i].left,objs[i].top - objs[i].height - 20]; // Positions the frame
    This example ignores clipping paths and measures everything, including what is clipped.

  • Custom Calculation Script Help Needed

    I need to make a script that Sums a column of fields based on whether or not information found in another column of fields is the same or specific text. Please see below screenshot of what I would like it to do.
    I would like a Sum of all Amounts that have the Code A...

    You can use this script as the custom calculation script of "SumOfA":
    var total = 0;
    for (var i=0; i<=2; i++) {
        if (this.getField("p1TC."+i).value=="Code A")
            total+=Number(this.getField("p1RecIn."+i).value);
    event.value = total;
    You can easily adjust it for the other field as well.

  • Scripting Guys need your help

    Hello All,
    I have a script which is working absolutely fine in workgroup(Windows logs backup) - windows server 2012 but if i run in domain environment found error and not able to pull security logs. only pulling application and system with error.
    Script is here,
    Function Server-Eventlogs {            
     Param(
      $Computername ="$ENV:COMPUTERNAME.$ENV:USERDNSDOMAIN",
      [array]$EventLogs = @("application","security","system"),
      $BackupFolder = "C:\Eventvwr\"
     Foreach ( $i in $EventLogs ) {
     If(!( Test-Path $BackupFolder )) { New-Item $BackupFolder -Type Directory }
    $eventlog="C:\Eventvwr\$Computername" +"_"+$i+"_"+(Get-Date -Format "yyyyMMdd")+ ".evt"
      ##$eventlog="D:\Eventvwr\$i" + (Get-Date).tostring("yyyyMMdd") + "$Computername" + ".evt"
     (Get-wmiobject win32_nteventlogfile -ComputerName $Computername| 
      Where {$_.logfilename -eq "$i"}).backupeventlog($eventlog)            
     ##Clear-EventLog -LogName $i            
     }# end Foreach            
    }#end function  
    Server-Eventlogs
    Error is here 
    You cannot call a method on a null-valued expression.
    At C:\Users\Administrator\Desktop\backupscriptfinal.ps1:18 char:2
    +  (Get-wmiobject win32_nteventlogfile -ComputerName $Computername|
    +  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : InvokeMethodOnNull
    Will appreciate for your help.....
    Cheers!

    Here is a sample of what you will have to do.  It still will fail under many different scenarios.  Designing the error handling for complext tasks is not trivial.
    Function Backup-Eventlogs {
    Param(
    $Computername=$ENV:COMPUTERNAME,
    $EventLogs=@('application','security','system'),
    $BackupFolder='c:\ELBackups'
    Begin{
    $datestring=Get-Date -Format 'yyyyMMdd'
    Process{
    foreach($computer in $Computername){
    $remotefolder='\\{0}\{1}' -f $computer, $BackupFolder.Replace(':','$')
    If(!(Test-Path $remoteFolder)){
    New-Item $remoteFolder -Type Directory
    foreach($logname in $EventLogs){
    Try{
    $EventLog=Get-wmiobject win32_nteventlogfile -ComputerName $computer -Filter "LogFileName='$logname'" -ea Stop
                        $filename='{0}\{1}_{2}_{3}.evt' -f $BackupFolder,$computer,$logname,$datestring
    Write-Host "Backing up $logname to $filename on $computer" -ForegroundColor green
    $EventLog.BackupEventlog($filename)
    Catch{
    Write-Host "$computer $logname $_" -ForegroundColor red
    Backup-Eventlogs
    ¯\_(ツ)_/¯

  • User defined path, assigned file name

    I would like enable the user to define the directory where the file created will be saved but keep the naming convention I implemented the same.  I set up a small, and yes crude, program to test out the functionality of the code and its just not working out.  Any suggestions?  I'm, using Lab View 6.1.
    LabVIEW 2012 - Windows 7
    CLAD
    Attachments:
    FileSave.vi ‏55 KB

    Try replacing the File Dialog function with a Build Pth function.
    It looks like you want to append two parts of path together to build a
    complete path. The File dialog does not do this, it just lets the user
    select a path. You can then use that path to build the complete path
    with your filename using the Build Path function.
    Ed
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.

Maybe you are looking for