• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
String works, variable that's a string does not.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Subject: String works, variable that's a string does not.
  • From: Lorin Rivers <email@hidden>
  • Date: Wed, 28 Apr 2004 15:38:06 -0500

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.


  • Follow-Ups:
    • Re: String works, variable that's a string does not.
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Re: AS to emulate "next message" command in Mail
  • Next by Date: Applescript from Excel button
  • Previous by thread: Re: AS to emulate "next message" command in Mail
  • Next by thread: Re: String works, variable that's a string does not.
  • Index(es):
    • Date
    • Thread