Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

String works, variable that's a string does not.



Howcum?

This borks. Remove all the fancy UI, replace text_returned with "MSIE" in the set creator line and it's fine...

display dialog "What would you like to set the selected files creator to?" default answer "DmWr" buttons {"OK", "Cancel"} default button 1
copy the result as list to {text_returned, button_pressed}

tell application "Finder"
if button_pressed is "OK" then
set these_items to the selection

repeat with i from 1 to the count of these_items
set this_item to (item i of these_items) as alias
set this_info to info for this_item
--set myPath to (this_item as string)
--set targetFile to myPath
set (creator type of file this_item) to text_returned
end repeat
end if
end tell


--
I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone.
-Bjarne Stroustrup, computer science professor, designer of C++ programming language (1950- )
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.