Go Back   The macosxhints Forums > OS X Help Requests > AppleScript

Thread Tools Rate Thread Display Modes
Old 02-27-2012, 07:03 PM   #1
Going Postal
Join Date: Feb 2006
Posts: 14
Help with text search


Im a newbie at applescript so bear with me. Im trying to create a script that will:

1. search multiple text files in an network folder for a 6 digit number
2. show the results of the search
3. copy the results to the clipboard

the text files are job files that our company uses. Each job has a 6 digit number then data after it. for example:


I want to be able to do a search for 600001 and it will show the results plus copy the text after the job number but stop at the next 6 digit job number. Is this possible? Ive written a really basic script that only does the search through textwrangler but nothing else.

This is it:

tell application "TextWrangler"

set jobNumber to text returned of (display dialog "Please enter the job number:" default answer "")
find jobNumber searching in {alias "Tin:Text from PICK:"} options {search mode:grep, case sensitive:false, match words:false, extend selection:false, showing results:true}

end tell

Any ideas? Thanks.

Mac OSX, 10.6.8
Going Postal is offline   Reply With Quote

cop, copy, paste, search, text

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting 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

Forum Jump

All times are GMT -5. The time now is 06:06 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.