Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > AppleScript on DOS formatted drives - problem

AppleScript on DOS formatted drives - problem
Thread Tools
Fresh-Faced Recruit
Join Date: Jan 2001
Location: Sydney, NSW, AU
Status: Offline
Reply With Quote
May 9, 2001, 06:47 PM
 
have an AS dropplet that recursively unlocks files
contained in a selected folder hierarchy. it works
without a problem on HFS+ formatted drives.

the same script fails randomly, however, when i attempt to unlock
files on an attached DOS formatted drive (a maxtor 80 gig
IDE firewire external). the errors indicate
a failure to find a particular "Folder". the event
log (when running from ASEditor) shows that the folder(s)
are selected properly :

list folder "maxtus:Audio:B:Babyface:for the cool in you:" without invisibles
--> Finder got an error: File for the cool in you wasn't found.

this is the suspect statement :

set these_items to list folder this_folder without invisibles

again, it works fine on a HFS+ FS. i copy over the suspect
folder to the system drive and poof, done. doing this to
work around the problem is not an option (file name constraints, etc).

any insight is appreciated ? ? ?!! ?!! ?! ?!
     
Junior Member
Join Date: Apr 2001
Status: Offline
Reply With Quote
May 9, 2001, 11:01 PM
 
perhaps no real insights, just a couple of guesses:
first, i noticed it's a DOS disk you're having trouble with... this may have nothing to do with it, but i remember there being an eight character limit to filenames in DOS, and although the DOS system may still recognize the full name of the file, i think the mac os would only see the truncated form (such as "the_coo~1" in your example), and it seems like the script is having trouble locating this file/folder when it chokes (otherwise it would go ahead & fetch the list). on the other hand, the script should see the files as the DOS disk is displaying them, unless it's looking for a specific name of an item... which brings me to the second wild guess:
although it looks like that script is assigning variables instead of working with direct file/folder names, if properties, or variables, are set up in a script at the top level (no run handler (on run...)) or in the main run handler, the first time the script is run, the results of the variables will be stored/cached in the script (a long standing applescript faeture/bug), such that in your example, the second time the script is run, it will be searching for a specific folder, and if not found, it will generate an event error & quit. however, if it seems to work fine in mac os scanning folders always with different names, then this probably isn't the problem. if you're not sure if this is the case, you could force the variables to be local (not retained by the script) rather than global by including a line for each of the form:
local these_items
local this_folder
at the top level of the script (not within a "handler") or within the run handler.
hope this helps-
cheers, acur
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 11:11 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2