another request of applescript

Hi, I have another problem with the script I've tried to create.

The script seems to work and the two dialogues appear and everything seems fine but I get this error at the end and the folder structure is created only in part:

«Finder was an error: can't do {"hiring", "Rosa"} to type Unicode text.»

I'll hold my hands up and say I'm winging my way through it and didn't have any real experience of scripting languages, so any help is greatly appreciated. Script is the following:

Global jobNum

the value Path to (choose folder)

jobNum value to text returned of (display dialog "Please enter the job number:" default of response {"RFxxxx"})

the value JobName to text returned of (display dialog "Please enter the name of the job:" default of response 'Working name')

the value JobNumName to jobNum & "_" & JobName

makeFolderStructure of {JobNumName, {jobNum & '_' & 'Work', {jobNum & "_" & "Resource", jobNum & "_" & "Gone_to_Print", jobNum & '_' & 'Copy', jobNum & "_" & 'Links', {'jpg', 'eps-tiff', 'I', 'psd'}, jobNum, '_' & 'PDF', {'hiring', 'Rosa'}}, jobNum & '_' & 'Models', {jobNum '_' 'Resource', jobNum & "_" & "Gone_to_Print", jobNum '_' & 'Copy', jobNum & "_" & 'Links', {'tiff-eps', 'jpg', 'psd' "IA"}, jobNum & "_" & "PDF"}} {, {"hiring", "Rosa"}}, jobNum & '_' & 'Design', {jobNum & '_' & "Concepts", {'Operation', {'jpg', 'eps-tiff', 'I', 'psd'}, 'Presentations', 'PDF', 'Resource'}, jobNum & '_' & "RAD™", {'Operation', {'jpg', 'eps-tiff', 'I', 'psd'}, 'Presentations', 'PDF', 'Resource'}, jobNum & '_' & 'Development', {'Operation', {'jpg', 'eps-tiff', 'I', 'psd'}, 'Presentations', 'PDF', 'Resource'}, jobNum & '_' & "Finalizing", {'Operation', {'jpg', 'eps-tiff', 'I', 'psd'}, 'Presentations', 'PDF', 'Resource'}, jobNum & '_' & 'Photography' {'Brief', 'Templates', 'Shoot'}} {{{, jobNum & "_" & 'Copy'}}} to path

someItem to someFolder to makeFolderStructure

the value ParentFolder to someFolder

if class of someItem is list then

Repeat with AnItem in someItem

if class of AnItem is list then - add subfolders

makeFolderStructure AnItem to someFolder

else - add a new child folder in the current parent

Journal AnItem

say application 'Finder '.

create a new folder to ParentFolder with properties {name: AnItem}

the value someFolder the result as alias for

the value ParentFolder to someFolder

the value aFile to file 'RFXXXX_Brief.pdf' of Office

duplicate {aFile} to someFolder

end say

end if

end Repeat

else - add a single folder

say application 'Finder '.

the value fileAlias to the file "RFXXXX_Brief.pdf" of ParentFolder

the value filePath to fileAlias in the text

the value Point to the text of TID to AppleScript delimiters

the value Point text delimiters to AppleScript «:»

the value fileName to the last text element of filePath

the value Point text delimiters to AppleScript '.»

the value theExtension to the last piece of text to fileName

the value fileNamePart1 to 1 of fileName text element

the value Point text delimiters in 'RFXXXX' of AppleScript

the value fileNamePart1 to 1 text element of fileNamePart1

the value fileNamePart2 to JobNumName

the value of fileName to fileNamePart1 & fileNamePart2 & "." & theExtension

the value Text of point AppleScript delimiters to TID

the value name of fileAlias to fileName

end say

say application "Finder" to create a new folder to ParentFolder with properties {name: AnItem}

the value someFolder the result as alias for

end if

say application "Finder" to create a new folder to someFolder with properties {name: AnItem}

the value ParentFolder the result as alias for

end makeFolderStructure

I'm someone to help me buy a pint!

Tags: Mac OS & System Software

Similar Questions

  • Do I have to make another request to distribute the Adobe software? *

    I create PDFs to fill, I have distributed to our members, who find them on their own computers, which can be PC or Mac with any level of the operating system and installed software. Last year I asked the permission to do, and on 20 July 2015, I received the email from Adobe permission. He said:

    HOUSING STARTS

    Thank you for the presentation of a request to distribute the Adobe® software. Your application has been approved and you can now distribute the Adobe® software listed below, subject to the terms and conditions set forth in the Adobe Reader and the Runtime Software Distribution License Agreement.
    Licensed software:
    Reader DC Adobe® Acrobat® software

    ENDS

    What is an annual license? I now need to submit another application?

    I just noticed that email from Adobe last year told me I should do another request after a year.

    My apologies for wasting people time. I was getting careless because I was irritated that I couldn't find a way to get directly in touch with Adobe, and I was getting fed up with Adobe generally because of the push towards cloud products and that the product seems to be flaky. The flat screen fillable PDF files seems to have stopped working. I have converted to fillable PDF interactive on-screen, but they are not to be impeccable. Some of our members are unable to get to work or the other.

  • Default value for the prompt based on another request

    Hello:

    I have a requirement where I need to define default values of messages based on another request.

    The guest is a quick Date.

    I have tried using the presentation variable and sql query writing, where is written "WHERE promo_id = @{variable}" "

    but it still does not.

    Please let me know a workaround for this problem.

    Thank you.

    -Vinay

    What determined your operator BETWEEN End Date? I guess it's variable. In addition, is the second report on the same page or another page of dashboard? Assuming that the two reports are on the same page, do the below. If this isn't the case, you can use the same guests on the second page of dashboard. Define the scope of "dashboard" and the selection of the user is wearing on the second page.

    The easiest way is to have 3 guests of dashboard: Promo_ID, Start_Dt and end_date. assign to these guests PVs: pvPromoID, pvStartDate and pvEndDate, respectively.

    Filter a report on pvPromoID and pvStartDate.

    The second report on the pvPromoID of the filter and use pvStartDate in the filter of the two report Date column. Assuming that the values BETWEEN are variable, so you can write the following on the column of your second report:

    "Table name". " Date ColumnName.<= '@{pvstartdate}'="" and="" table="" name"."date="" column="" name"=""><>

    And your Promo column, use the filter "Table name". "Class = ' @{pvPromoID}"

    When the user selects the Promo ID, Start Date and end Date in the guests, the first and second reports will be filtered accordingly.

  • Another request of Photos.

    If you want pictures/videos you take with your iPad to be saved to one different location other than the native photo app on the iPad like Dropbox or Google Drive How do you (if this is possible)?  Basically, I would like all the Photos and videos that I take not to be recorded on my iPad but registered in Cloud Storage.

    Thank you.

    Unfortunately there is no way to do it directly. They are automatically recorded on film (no other choice of iOS unless you use iCloud photo library). However you can then select all the in a batch by clicking Select and rubbing your finger on a lot of photos; then download them on Dropbox, Google Drive or another true cloud storage. Then delete them film. Not as effective as you want.

  • You cannot request to applescript "If file exists" "else".

    Hello everyone!

    I've been Googling for hours for this. Could not find anything.

    I thought it would have been quite simple: get applescript to do a check to see if a file exists, and do something. If it does not exist, do something else.

    My script is as follows (more or less):

    game file_yes (("~ /") & 'File.txt')

    say application 'Finder '.

    if there are file file_yes then

    the shell script "SHELL SCRIPT" with administrator privileges

    say application "Finder" for display alert "Shell Script complete!"

    Try

    the shell script "rm ~ / FILE.txt" with administrator privileges

    end try

    on the other

    say application "Finder" display message "No file!"

    end if

    end say

    You must use a Mac OS X-style path when it comes to the Finder:

    If there is the file "File.txt" of the House then

    (137423)

  • I received another request for update of Adobe Muse 2014.3. Is this a legitimate update?

    I installed the update of muse 2014.3 original adobe 20 days ago. This morning (06/03/2015), I had another notification of a Muse 2014.3 update version. Is this a legitimate update. I got it on both my home computers and work. I am reluctant to download. I know a company that did a download from Adobe that has completely messed up their system.

    Adobe help Muse | Release notes | Adobe Muse CC

    See the link above, there were a few bugs in the launch of 2014.3, this update fix.

  • Another request GREP (easy)

    I would like to use GREP to apply a style to all paragraphs that have 45 characters or fewer. Is this possible? I use GREP to do this?

    (I should probably pay you guys for the amount of time that you have saved with these GREP requests.)

    Thank you.

    AK

    I think this will work:

    Find ^. {1.45} $

    In the formatting change, choose your style of paragraph header

  • How to reach only 1 record (based on order by) has another request?

    Hello

    I have a table of orders. Each order can have multiple notes stored in another table. I want to join the last note inserted to my query that selects all orders...

    I know I have to use an outer join to ensure that orders that have NO notes are always included. But with my query below all notes are selected, I want just one record for each order with just the last inserted note (based on entry_date).

    If anyone can help? Thank you!
      ORDERS [ORDERID number, ORDERNUMBER varchar]
      NOTES  [NOTEID number, ORDERID number, NOTE varchar, ENTRY_DATE date]
    select
      O.ORDERID,
      O.ORDERNUMBER
    from
      ORDERS O
      left outer join NOTES N on O.ORDERID = N.ORDERID

    Hello
    Here's one way:

    select
      O.ORDERID,
      O.ORDERNUMBER
    from
      ORDERS O
      left outer join (
    SELECT ORDERID
       FROM (
      (SELECT ORDERID,
                  ROW_NUMBER() OVER (PARTITION BY ORDERID ORDER BY ENTRY_DATE DESC) row_num
          FROM NOTES)
         WHERE row_num = 1) N
    ON (O.ORDERID = N.ORDERID)
    
  • HP G61: Another request bios admin password

    The code is 81847902.

    Thank you.

    Try > 34725324

  • Another request infamous Muse + Business Catalyst

    Hi all, it will be possible to 'inject' liquid in Muse markup.

    If we could give some Business Catalyst goodness for a site of Muse (Muse cos allows us to make small sites)

    How about it?

    YD.

    Liquid parameters and data module with filters etc can be inserted into the page through HTML, which must render the value of data, but it would be more convenient if you use develop mode in British Colombia for the parameters to add to the html page such as this would be to write a whole doctype to add parameters or to check the JSON output.

    Thank you

    Sanjit

  • Another request to remove operator less

    Hi all

    The query below follows

    First query to find all accounts GL within the beach and the second date query find all elimination of installation of elimination of GL GL accounts.
    Using less, I will know which represents is not configured in GL elimination setup form. I need your help to find the desired output using not least?
    What are the other alternatives?
    SELECT
        /*+ ORDERED
        USE_NL(jel jeh jeb cat src)
        INDEX(jel GL_JE_LINES_N1)
        INDEX(jeh GL_JE_HEADERS_U1)
        INDEX(jeb GL_JE_BATCHES_U1)
        INDEX(cat GL_JE_CATEGORIES_TL_U1)
        INDEX(src GL_JE_SOURCES_TL_U1) */
        CC.SEGMENT1
        ||'.'
        ||CC.segment2
        ||'.'
        ||CC.segment3
        ||'.'
        ||cc.segment4
        ||'.'
        || cc.segment5
        ||'.'
        || cc.segment6 Account,
        decode(sysdate,sysdate,sysdate,jel.effective_date) trx_date 
      FROM gl_code_combinations cc,
        gl_je_lines jel,
        gl_je_headers jeh,
        gl_je_batches jeb,
        gl_je_categories cat,
        gl_je_sources src
      WHERE cc.CHART_OF_ACCOUNTS_ID = 50308
      AND cc.segment2              IN ('111710','201910')
      AND jel.code_combination_id   = cc.code_combination_id
      AND jel.status
        || ''                = 'P'
      AND (jel.accounted_cr != 0
      OR jel.accounted_dr   != 0)
      AND jeh.je_header_id   = jel.je_header_id
      AND jeh.actual_flag    = 'A'
      AND jeh.currency_code       != 'STAT'
      AND jeb.je_batch_id          = jeh.je_batch_id
      AND jeb.average_journal_flag = 'N'
      AND src.je_source_name       = jeh.je_source
      AND cat.je_category_name     = jeh.je_category
      and jel.effective_date between to_date('01-JAN-2011','DD-MON-RRRR') and to_date('31-MAY-2011','DD-MON-RRRR')
      MINUS
      SELECT (source_segment1
        ||'.'
        ||source_segment2
        ||'.'
        ||source_segment3
        ||'.'
        ||source_segment4
        ||'.'
        ||source_segment5
        ||'.'
        ||source_segment6) def_acnt,
        sysdate
      FROM GL_ELIM_ACCOUNTS_MAP

    SELECT
    / * + ORDERED
    USE_NL (jel jeh jeb cat CBC)
    INDEX (JEL GL_JE_LINES_N1)
    INDEX (jeh GL_JE_HEADERS_U1)
    INDEX (JEB GL_JE_BATCHES_U1)
    INDEX (CAT GL_JE_CATEGORIES_TL_U1)
    INDEX (CBC GL_JE_SOURCES_TL_U1) * /.
    CC. SEGMENT1
    ||'.'
    || CC.segment2
    ||'.'
    || CC.segment3
    ||'.'
    || CC.segment4
    ||'.'
    || CC.segment5
    ||'.'
    || CC.segment6 account,
    Decode(sysdate,sysdate,sysdate,JEL.effective_date) trx_date
    OF gl_code_combinations cc,.
    JEL gl_je_lines,
    gl_je_headers jeh,
    Jeb gl_je_batches,
    gl_je_categories cat,
    CBC gl_je_sources
    WHERE cc. CHART_OF_ACCOUNTS_ID = 50308
    AND cc.segment2 IN ('111710 ', ' 201910')
    AND jel.code_combination_id = cc.code_combination_id
    AND jel.status
    || '' = 'P'
    AND (jel.accounted_cr! = 0)
    GOLD jel.accounted_dr! = 0)
    AND jeh.je_header_id = jel.je_header_id
    AND jeh.actual_flag = 'A '.
    AND jeh.currency_code! = "STAT."
    AND jeb.je_batch_id = jeh.je_batch_id
    AND jeb.average_journal_flag = n
    AND src.je_source_name = jeh.je_source
    AND cat.je_category_name = jeh.je_category
    and jel.effective_date between to_date('01-JAN-2011','DD-MON-RRRR') and to_date('31-MAY-2011','DD-MON-RRRR')
    NOT IN)
    SELECT (source_segment1
    ||'.'
    || source_segment2
    ||'.'
    || source_segment3
    ||'.'
    || source_segment4
    ||'.'
    || source_segment5
    ||'.'
    || def_acnt source_segment6),
    SYSDATE
    OF GL_ELIM_ACCOUNTS_MAP)

  • Another request weird...

    Hi guys,.

    M2.addEventListener (MouseEvent.CLICK, clickFunction6);

    function clickFunction6(evt:MouseEvent):void {}

    gotoAndPlay (1000);

    }

    This is my code for my button "m2". After she played frames 1000 to 1010, is anyway that I can get to play the MARP 1900 without using "gotoAndPlay" to 1010 framework?

    Thank you

    Joe

    In the code for your button, you have the button to assign a value to the variable.

    yourVariable = 1900;

    gotoAndPlay (1000);  to begin the transition

    then frame 1010...

    gotoAndPlay (yourVariable);

    the variable itself has to live on a layer which extends along the timeline with no images other than frame 1 key, when you declare the variable - which makes it accessible to your entire timeline...

    var yourVariable:Object;  can be a number or a string, so object is used

  • Another request of Grep

    I have a style that is all small capitals for a table of contents.  Part of the text flow to text as c1900 is.  The 'c' of the c1900 looks very foolish in small capitals, expecially with old numbers.  I want to try some styles GREP that will pick up the c and change it to a different character style.

    Right now I have:

    c\d

    who picks up (I think) the c is followed by a digit.  Problem is that it also puts the figure.

    Any help appreciated.  What I am doing wrong?

    You need to find is a "c"which is followed by a figure - an advanced search. Just to be safe, I would include the four digits:

    c(?=\d\d\d\d)
    

    Oh, and I saw the 'c', formatted in italics, in this case.

  • How to cancel the in-app purchase request

    My daughter asked an in-app purchase over a week with the Inside-Out app on his iPad Pro (small model). I never had the request ' To buy ' and his iPad now already says "awaiting approval of the purchase.  Searched my notifications and no demand has been revieved. So how to cancel or reset the application so another request to buy the request can be done?  I've logged in and out of the iCloud, iTunes, Keychain, and Game Center with no luck. I even deleted the app and reinstalled but it comes up with the same message after being reinstalled. Any recommendation?  Thank you.

    Contact Apple directly > Contact - official Apple Support

  • Request request extension co PowerVault MD3600i [CF]

    Salve,

    gradirei is possibile essere contacted by take animals extension del supporto per a sistema MD3600i + 3 x MD1220i (S/T: 74JGG5J).

    Nella fattispecie, servirebbe UN preventivo by overall extension della following a tutto he sistema ed another request by the sostituzione di un disco opening.

    Livio Salconi

    European Observatory of gravitation

    [email protected]

    050 752584

    Buongiorno, the sto contattando by mail.

Maybe you are looking for

  • Canon 5 d Plugin for Final Cut Pro

    Do I still need to get the Plugin gun works HD of Films made with my Canon 5DII for work / download media in Final Cut Pro? If Yes, where can I safely download the plugin? THX

  • Qosmio X 770-135 - problem playing Battlefield 3

    Hello After buying a new computer laptop x 770-135 and use a few hours he came to a conclusion: the PC is too heavy (full of programs and functions) that is slow and the other is that you can't play Battlefield3. I've been looking through this forum

  • HP-5d017tu: hard disk failure

    I have 15 HP d017tu, had hard drive 5400 RPM 500 GB Hitachi. But he fail, now, I want to replace it with 1 TB 7200 RPM hard drive. It create any problem in the coming days, and move the hard drive to another company made it create any problem. Give m

  • Whenever I try to open a folder, windows Explorer stops and restarts. How can I open my files?

    When I double click on a folder to open it or try to open it in the start menu, an alert tells me that windows Explorer has to close, and then restart. I can't open the windows. I can open the fine when I'm in safe mode but not in normal startup. I t

  • Not enough disk space on the Partition was ' Drive

    Hello! My PC has unique of the (160 MB) hard disk with two partitions 'C' (149 MB) and ' (6.27 GB). The partition on this disk, which would have ' a 901MB of free space on total 6.27 GB. The PC recovery system and partition restore points system - wo