Jeff How does one get multi-file search results back from AppleScript?
Jul 21, 2009; 00:22
Jeff
How does one get multi-file search results back from AppleScript?
I'm trying to script a multi-file search and get back a list of files found. I currently have:
tell application "TextWrangler" activate set fndResults to (find "foo" searching in {alias "MyHD:files:"} options {search mode:literal, case sensitive:false, match words:false, extend selection:false}) as list repeat with subFolder in fndResults log subFolder end repeat
--set theResults to (item 2 of fndResults) as search results browser set theResults to search results browser 1 end tell
OK, first issue, when I run with: set theResults to (item 2 of fndResults) as search results browser --set theResults to search results browser 1 ....I get the error: Can't make «class SRsl» 1 of application "TextWrangler" into type «class SRsl».
I've tried to resolve this but I'm still a bit new to AppleScript. What's going on here? What's the correct syntax?
OK, when I change the code to: --set theResults to (item 2 of fndResults) as search results browser set theResults to search results browser 1 .... everything runs, but when I look at theResults, I don't see anything pertaining to a list of files. Any suggestions on how to get a list of files the search returned?
Thanks,
Jeff
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a specific feature request or would like to report a suspected (or confirmed) problem with the software, please email to "support@barebones.com" rather than posting to the group. -~----------~----~----~----~------~----~------~--~-
Jul 21
Jeff Re: How does one get multi-file search results back from AppleScript?
Jul 21, 2009; 12:14
Jeff
Re: How does one get multi-file search results back from AppleScript?
Jul 25
Jeff Re: How does one get multi-file search results back from AppleScript?
Jul 25, 2009; 16:08
Jeff
Re: How does one get multi-file search results back from AppleScript?
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!