Delimiters may be the cuprit

the text for display dialog with title 2 will not produce any text that will display. I think its due to the delimiters that break apart the file name and not be reset properly. Can anyone lend a hand thanks. This code is taken from Applescript Studio.
on clicked theObject
tell application "Finder"
set the_alphabet to {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}
set NPR_local to "Macintosh HD:Users:Shawn:Desktop" -- :DAW1:Features"
set theSelection to get selection -- the highlighted file in the Finder window "Macintosh HD:User:Shawn:Desktop:DAW:AR999 Smith, Bob EM v1.mov"
set theprodinitials to ""
set theprojectfolder to ""
set theprojectname to ""
set thebackuplocation to "Masters:Features:Archive - Features"
set file_name to ""
end tell
--thefilename AR999 Smith, Bob EM v1.mov
tell application "Finder"
--display dialog theSelection as string
--display dialog "1 " & a_file as string -- "Macintosh HD:Users:Shawn:Desktop:Featurs Folder:AR999 Smith, Bob:AR999 v2.mov"
set TempTID to AppleScript's text item delimiters -- save the current delimiter
set AppleScript's text item delimiters to ":" -- the text to replace
set thefilename to the last text item of (theSelection as string) -- "AR999 Smith, Bob EM v2.mov"
set AppleScript's text item delimiters to ""
display dialog thefilename with title "1"
end tell
--theprojectname AR999 Smith, Bob
tell application "Finder"
set TempTID to AppleScript's text item delimiters -- save the current delimiter
set AppleScript's text item delimiters to " " -- the text to replace
set theprojectname to text items 1 thru -3 of (thefilename as string) -- "AR999 Smith, John"
set AppleScript's text item delimiters to TempTID -- restore the original delimiter
display dialog theprojectname with title "2"
end tell
-- theprojectcode AR999
tell application "Finder"
set AppleScript's text item delimiters to " " -- the text to replace
set theprojectcode to text item 1 of theprojectname -- AR999
set AppleScript's text item delimiters to {""}
display dialog theprojectname with title "3"
end tell
-- Prod initials "– AR"
tell application "Finder"
repeat with a_character in theprojectcode
if a_character is in the_alphabet then
set theprodinitials to theprodinitials & a_character
end if
end repeat
set theprodinitials to "- " & theprodinitials
set AppleScript's text item delimiters to {""} -- default delimiters
display dialog theprojectname with title "4"
end tell
-- get the Abraham NPR location
tell application "Finder"
set AppleScript's text item delimiters to {" "} -- default delimiters
repeat with aproducersfolder in folder thebackuplocation -- "Reid, Amy – AR" "Masters:Features:Archive - Features"
set x to name of aproducersfolder as string
if x contains theprodinitials then -- "– AR"
display dialog x as string with title "5"
--display dialog aproducersfolder as string with title "5 prod fold on abr"
set theprojectfolder to (aproducersfolder as string) & theprojectname as string
end if
end repeat
tell application "Finder" to duplicate (every folder of folder theprojectfolder whose name contains "NPR") to folder NPR_local
end tell
end clicked

Without running the code, it's hard to be sure, but you do seem to be all over the place with your TIDs:
For example, there are two places where you:
set TempTID to AppleScript's text item delimiters -- save the current delimiter
which is great - you're saving the current setting to restore later. However, there's only one place where you restore to that previously-saved value:
set AppleScript's text item delimiters to TempTID -- restore the original delimiter
In other places you:
set AppleScript's text item delimiters to ""
set AppleScript's text item delimiters to {""} -- default delimiters
set AppleScript's text item delimiters to {" "} -- default delimiters
I don't know if that's because you're trying out different options to see what works, or whether that an error, but it would be good to be consistent - always save the current TID, set a new value, then restore the old TID - in each stage rather than the hybrid model you have right now. If nothing else it would make it easier to spot other errors.

Similar Messages

  • I have photos I want to group together in one album, but can't do this because some may have the same number. How can I combine them all into one album?

    I have photos I want to group together in one album, but can't do this because some may have the same number. How can I combine them all into one album? I was trying to move several albums onto a USB drive and it stated all other files exist at this location.  They are pictures taken at different times and have the same number I guess.

    In iPhoto albums may contain photos with the same file name - iPhoto handles that just fine
    If you are exporting them to move somewhere else use the sequential file name feature of export to give each file a unique name
    LN

  • Toshiba Power saver may be the problem

    My Satellite A665-S6050 has had all of the symptoms you read about in these forums;
    crash, freeze, hung, locked, BSOD, Windows crash errors, etc.
      I bought the laptop new a couple years ago and both love it and hate it when it exhibits
    its freezing behavior. This is the intel I-3, 4 GB ram, Windows 7(64 bit) version. Really nice
    when it's running normally.
      I have watched and read through hundreds of posts throughout these forums since my purchase.
    I have never sent the laptop back to Toshiba. Primarily because I've been able to force power off
    then on, go to safe mode, schedule a disk scan on the next power up, reboots normally and I'm good
    for who knows how long.
      Following suggestions you can read in these forums, I have upgraded the Intel HD graphics display driver.
    I install Windows updates every time they come available(auto update is enabled). I've updated the
    Toshiba bios. I've updated Firefox every time it is available(my favorite browser). Updated java and
    flash(again automatic updates). Some user settings that I've changed; I've disabled sleep mode(set it
    to 'never' under 'advanced power settings) in every power scheme I have. I only use 'High Performance'
    power scheme(plan). I have the setting for turning off the hard drive set to 'never'. My rational for doing
    this is there is just too much going on under Windows 7, all the time. You never know what's running in the
    background. Many times as the laptop freezes and or Windows tries it's best to recover, I get a strong feeling
    that the hard drive has shut off! Especially, when Windows is trying to save a dump but can't because it can't
    access hd0(hard drive)(I have to force power cycle off/on to recover).
      This brings me to my current state of this troubleshooting saga. The last time the laptop froze, I was watching
    streaming video in one Firefox window and had a slide show playing in another Firefox window(2 windows, not
    2 tabs). Then in the lower right corner I get the Toshiba power saver notification that it is shutting down the
    optical drive. It goes away on it's own in about 10 seconds. But immediately everything gets real slow until every
    freezes. Windows tries to save a dump but can't. Windows tries to reboot itself but can't. Shows me a screen to
    modify the boot list because the hd0 is not available. So, as so many times before I have to hold the power
    button down for force power off. Wait a few, then power on, do my thing with safe mode, check disk, etc.
    Power up and boots normally. Runs great for who knows how long. Right now as I type this, I have a audio CD
    in my optical drive with Windows Media player set to 'replay' continuously. This I hope will prevent the 'Toshiba
    power saver' from getting triggered because the optical drive is not idle and therefore won't shut off the hard
    drive too! I have no idea how I can prove that 'Toshiba Power saver' is causing these freezes, crashes, lock ups,
    etc. But at least if I can keep the optical drive in use and therefore prevent the 'power saver' from kicking in
    maybe I can eliminate that as a possible cause of the freezes.
      I am really disappointed to read so many Toshiba owners sending their computers to Toshiba service
    hoping and praying for resolution but getting no satisfaction in the end. I love my Toshiba and I'll keep it.
    I am a recreational user. Don't need to save power. When I use my computer, I want it to function as
    powerful as possible until I intentionally perform a normal Windows shutdown.
      My employer supplies me with a laptop (different brand). It has Intel I-5 chip, 3 GB ram Win XP Pro..
    I run that computer full speed 9 -10 hours a day and I may have to reboot maybe once every other week.
    Not bad considering the abuse I put it through. I would hate to have to rely on this Toshiba for work. I
    don't think it could stay fully operational for that period of time.
      Please Toshiba, tell me how I can help with the troubleshooting of this seriously pervasive problem on
    so many of your computers. Is there an event log I can provide? Windows dump files(when they do get
    saved)?  Help me help you resolve this problem and satisfy hundreds of your customers.
    Thank you in advance for your time.
    Doug

    Jerry,
      It happened again this afternoon. This is the first time my system froze since the last time
    I reported here in the forum. And just like I reported earlier, Toshiba Power Saver turned off
    the optical drive power, I saw the pop-up in the lower right corner to notify me of the event.
    I had Toshiba 'PC Health Monitor' running and minimized. I clicked on the icon to restore it
    to the desktop. It displayed as expected. The hard drive graphic looked normal and spinning
    as usual. I clicked on the graphic of the spinning hard drive and expected 'Power Options' to
    display. Instead my desktop went away(all icons, system tray, system notification area, launch
    pad, etc), everything gone. The graphic of the spinning hard drive stopped spinning. I tried a
    CTL+ALT+DEL and got a new pop-up from Windows that it couldn't respond and I had 2 options;
    press ESC or hold the power button down to force power and a shutdown. Which is what I eventually
    did.
      Powered up, went to safe mode, scheduled disk check on the next restart. Disk check runs and
    finds no problem. System runs normally again.
      As far as finding these events in the Windows logs using 'Event viewer', is not going to help.
    I know exactly what time this all took place. I just can't find any event log showing that it took
    place. There's a small gap in the time stamps just before the event until a few minutes after the
    event. Then I see a mixture of 'errors' and 'information' events after the power on and restart
    but nothing specifically addressing the hard drive before the restart.
    I see an event log; "Previous shutdown was not expected". I'm sure that's not what your asking
    to see.  I don't know if it would be possible to trace the 'Toshiba Power Saver' but that may be
    the only way I could prove my point that it is shutting off power to both the optical drive and
    the hard drive at the same time.
    Is there a way to disable or remove Toshiba Power Saver without causing a more serious problem?
    Thank you in advance for your time and expertise.
    Doug.

  • I had itunes installed on my pc. I received notice to update. I started update but gpt the following message - this application failed to start because MSVCR80.dll was not found. Reinstalling may fix the problem. I uninstalled and have tried to reinstall

    I already had itunes installed on my pc. I received an update and tried to install it. I got a message
    This application failed to start because MSVCR80.dll was not found. Reinstalling may fix the problem.
    I uninstalled itunes and tried to reinstall. itunes says it has installed but when I try to open itunes I get the same message.
    How do I repair/sort out this error/fault
    Thanks
    David

    Try the following user tip:
    Troubleshooting issues with iTunes for Windows updates

  • If I'm in Lightroom 5, and try to Edit in Photoshop CS6, I always get the following message: "This version of Lightroom may require the Photoshop Camera Raw plug-in version 8.6 for full compatibility." But I have updated to 8.6 and have no remaining updat

    If I'm in LIghtroom 5, and try to Edit in Photoshop CS6, I always get the following message: "This version of Lightroom may require the Photoshop Camera Raw plug-in version 8.6 for full compatibility." But I have updated to 8.6 and have no remaining updates. How can I fix this?
    If I click "Open Anyway" or "Render using Lightroom", I get the following message:
    "Adobe Photoshop CS6 cannot be opened because of a problem.
    Check with the developer to make sure Adobe Photoshop CS6 works with this version of OS X. You may need to reinstall the application. Be sure to install any available updates for the application and OS X."
    Please tell me what to do so I can edit from Lightroom to Photoshop.

    In Photoshop, if you choose Help - About Plug-in... - Camera Raw, does it say 8.6?
    Seems to me there was some hiccup they found in the update process, which prompted this:
    Camera Raw updates cannot be applied
    I honestly don't know if the problem could apply to 8.6 as well, which is why I asked you to check to make very sure you really got it.
    -Noel

  • How do I retain my apps after I change my apple ID? Right now I'm unable to update any of the apps with the old apple ID. I get an error message about an invalid id or password. If I delete my apps and start over, I may lose the apps that I purchased...

    How do I retain my apps after I change my apple ID? Right now I'm unable to update any of the apps with the old apple ID. I get an error message about an invalid id or Password. If I delete my appos and start over, I may lose the apps that I purchased (like the ones for $5 +....

    Apps are always tied to the ID that was used to purchase them originally. Did you try entering your old password and see if that works?
    If you need to sign out of your old account go to Settings>Store>Tap on your ID and sign out. Sign in with the new one.
    you can also access your ID in the featured tab of the App Store. Swipe to the bottom of the screen and you will find it there as well.

  • HT5569 Tried this but still not working and unable to load Itunes iOS: Wi-Fi settings grayed out or dim Symptoms  In rare instances, the setting to turn on Wi-Fi on your iPhone, iPad, or iPod touch may appear grayed out or dim. You may see the following w

    Tried the below and still no good - any suggestions
    iOS: Wi-Fi settings grayed out or dim
    Symptoms
    In rare instances, the setting to turn on Wi-Fi on your iPhone, iPad, or iPod touch may appear grayed out or dim. You may see the following when you tap Settings > Wi-Fi.
    If this occurs, you can't turn Wi-Fi on, and when you try to turn Wi-Fi on, your device won't respond. If you're using iOS 7, Wi-Fi may appear to turn on and off in Control Center, but Wi-Fi won't respond.
    Resolution
    Follow these steps to resolve the issue:
    Restart your iOS device.
    Make sure that airplane mode is off by tapping Settings > Airplane Mode.
    Reset the network settings by tapping Settings > General > Reset > Reset Network Settings.
    This will reset all network settings, including Bluetooth pairing records, Wi-Fi passwords, VPN, and APN settings.
    Make sure that your device is using the latest software. To do so, connect your device to your computer and check for updates in iTunes.
    If you still can't turn Wi-Fi on, please contact Apple for support and service options. If you can turn Wi-Fi on but are experiencing other issues with Wi-Fi, please see these steps.
    Last Modified: Dec 9, 2013

    Your device has a hardware failure and only replacement or repair will fix it.  Take it to an Apple Store or an Apple authorized service provider.

  • My hp failed to start it says, A recent hardware or software change may be the problem.

    my hp failed to start it says A recent hardware or software change may be the problem.  It gives the option of Launch start up repair or Start windows normally, it freezes after clicking any option. What can i do?
    My pc is a Compaq Presario CQ62-216DX Notebook. It also says on the screen, Description: fix problems that are preventing windows from starting.

    Hi,
    Shut down the notebook.  Tap away at f10 as you start the notebook to enter the bios menu.  Under the Advanced or Diagnostic tab you should find the facility to run tests on both the Hard Drive and Memory.  Post back with the details of any error messages.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • I'm having trouble making calls with my Iphone 4. When I try to, the person on the other side can't hear me, and all I can hear are noises. But when I use apps like Viber or Facetime, I can make calls just fine! What may be the problem?

    When I try to, the person on the other side can't hear me, and all I can hear are noises. But when I use apps like Viber or Facetime, I can make calls just fine! What may be the problem?

    Did you fix the problem? I have the same problem and it has been pain in the neck.

  • What may be the reasons for my iphone switching off all of a sudden and how do i prevent it?

    what may be the reasons for my iphone switching off all of a sudden and how do i prevent it?

    With the home page on display, in the menus select View, then Zoom and then Reset
    For details on the zoom features see [[page zoom]] and [[text zoom]]

  • ITunes would not start... I got error: "applcation failed to start because MSVCR80.dll was not found. Re-installing the appliacation may fix the problem." When I tried reinstalling it failed.

    I recently connected my iPhone to my computer, iTunes would not start... I got error: "applcation failed to start because MSVCR80.dll was not found. Re-installing the appliacation may fix the problem." When I tried reinstalling it failed - it said insufficient permission.  I have administrative rights... please, any help and/or ideas will be appreciated.

    Solving the iTunes Installation Problems in Windows
    1. Apple has posted their solution here: iTunes 11.1.4 for Windows- Unable to install or open - MSVCR80 issue.
    2. If the Apple article does not fully resolve the problem for you, then try Troubleshooting issues with iTunes for Windows updates - MSVCR80.

  • What may be the cause of this error java.sql.SQLException: invalid sql type passed to callable statement in iplanet ussing JNDI

     

    Hi,
    The possibilities can be of various reasons, with the sql statements,
    xml descriptors, data sources, improper drivers anything. To crack down
    the solution, kindly let me know the error messages and what exactly are
    you trying to accomplish.
    Thanks & Regards
    Raj
    manimaran t wrote:
    what may be the cause of this error java.sql.SQLException: invalid sql
    type passed to callable statement in iplanet ussing JNDI
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • HT1339 I got a question. A screen comes up on my ipod,.this game cannot be launche.This may be the result of a full ipod. Any ideas?

    I got a question. A screen comes up on my ipod,.this game cannot be launche.This may be the result of a full ipod. Any ideas?

    Try a hard reset.  To do this, toggle the hold switch on and then off, then press and hold both the Select (Center) and Menu buttons together long enough for the Apple logo to appear.  This may or may not work the first time around, so don't be afraid to try it more than once.
    B-rock

  • Error on boot: "STOP c0000135 unable to locate component csrsrv.dll not found reinstalling the application may fix the problem"

    I am running Windows Server 2003 R2 (I know it's old, I'm in the process of upgrading it now to 2012) on an old HP ProLiant server. It's worked for ages, but yesterday morning it booted up with the blue screen of death, saying:
    STOP c0000135 unable to locate component csrsrv.dll not found. Reinstalling the application may fix the problem.
    I have tried coping the file from C:\WINDOWS\ServicePackFiles\i386\csrsrv.dll to C:\WINDOWS\system32\ using a WS2003R2 recovery disk, but it still doesn't work. I'm not sure what to do now...
    I do have backups, but I'd prefer just to get this server back up and running so that I can continue to migration so that I can decommission it permanently and put it out to pasture...
    Any help and guidance is greatly appreciated.
    Thanks in advance!

    If copying the DLL does not help then I would recommend doing a system state restore from a backup.
    This posting is provided AS IS with no warranties or guarantees , and confers no rights.
    Ahmed MALEK
    My Website Link
    My Linkedin Profile
    My MVP Profile

  • Suddenly all of my Office-programs have stopped working and will not launch on my MacBook. Could anyone give an amateur from Norway a hint of what may cause the problem? And I can not find the installation-disc for Office...Super! :)

    Suddenly all of my Office-programs have stopped working and will not launch on my MacBook. They were all already installed when I bought the computer. Could anyone give an amateur from Norway a hint of what may cause the problem? (And I can not find the installation-disc for the Office Programs...Super!)

    Have you contacted Microsoft support - http://www.microsoft.com/mac/support ? 

Maybe you are looking for

  • Using PSE 11, editor doesn't open up at all. However, the organizer opens up properly. please help

    Hello, I have installed PSE 11. I am using a 64 bit Windows 7 ultimate. The installation went flawless. When i tried to run PSE 11 editor from welcome screen, it crashed and gave me the following error You can find the details of error message below:

  • Retrieve BLOB image in J-developer 10

    Hello, Well I were surfing the web about this question. Actually I need to retrieve a images that are stored in BLOB's from a database, for example, in database I have a customer, which have 5 images attached in BLOBs, I found some info, which tells,

  • Can''t see inbox.mbox file in user library

    For some reason, I can't see a .mbox file for my inbox when I look in my user library Mail folder. I can see a junk.mbox; I can see a deleted messages.mbox, but no inbox.mbox (or sent.mbox, for that matter). Can someone tell me where those messages l

  • Campus Area network

    hello exports, i ve a 1 6513 as a core switch and 4510 as a redundant swich connected by using 10GE. other switches are 3750 and 500G .i want to configure Vlan and active redundancy. can i create same SVI on both the 6513 and 4510 switch. i want 6513

  • How do i delete extensions? Using OS X 10.9.2

    Using OS X 10.9.2