Good evening,

On 18/2/08 at 11:15 AM +0100, Richard Taubo <[EMAIL PROTECTED]> wrote:

On 11/02/2008, at 18:41, Richard Taubo wrote:

After finding a value using Applescript in BBedit like this . . . :
set MyFind to find "^.*Mystuff\\:(.*)" options {starting at top:true, search mode:grep} with selecting match

. . . I would like to pick up the content of (.*) (i.e: \1) and set it to a variable. How is that done i Applescript?

Does anyone have info on this? Would be great!

Have you looked in the BBEdit manual and AppleScript dictionary. I don't think I could describe any better than what's already documented.

Also, have you tried 'recording' your find actions. I find that the best way to get an example of a working script, and then I edit the script from there.

And finally, here is an example from one of my scripts:

set s_options to ¬
{search mode:grep, starting at top:true, wrap around:false, backwards:false, case sensitive:true, match words:false, extend selection:false, returning results:false, showing results:false}
set r_text to "\\1"
set s_text to "\\#\\# host=(.*)$"
if found of (find s_text searching in front window options s_options without selecting match) then
    set HostName to grep substitution of r_text
else
display dialog "Could not find config for 'host'." buttons {"OK"} default button 1 with icon 2
    return
end if



Charlie

--
   Charlie Garrison  <[EMAIL PROTECTED]>
   PO Box 141, Windsor, NSW 2756, Australia

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
http://www.ietf.org/rfc/rfc1855.txt

--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to