View Single Post
  #17  
Old March 22nd, 2009, 01:06 PM
ejang ejang is offline
Registered User
 
Join Date: Feb 2009
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
ejang is on a distinguished road
Thanks for the replication code!

Yesterday I tried to alter an example script that replaces the text in names on my desktop. I want to be able to set it so that the script automatically sets the search parameter as both file names and folders instead of a button prompt, but I am not sure how to notate this. Basically, I am trying to strip the script of its excess error messages and user choice.

Here is the code that I am trying to modify...

try
tell application "Finder" to set the source_folder to path to desktop folder as alias
end try
display dialog "Search and replace in:" buttons {"File Names", "Folder Names", "Both"} default button 3
set the search_parameter to the button returned of the result
Reply With Quote