On Dec 7, 2009, at 11:18 PM, Bill Hernandez wrote:
> --
> +---------+---------+---------+---------+---------+---------+---------+---------+
> -- script_name : a_minus_b.scpt
> --
> +---------+---------+---------+---------+---------+---------+---------+---------+
> on run
> set a_path to (do shell script ("echo " & "~/Desktop/bb_test/a.txt"))
> set b_path to (do shell script ("echo " & "~/Desktop/bb_test/b.txt"))
>
> tell application "BBEdit"
> open (POSIX file a_path) as alias
> set a_props to get properties of text window 1
> set a_id to ID of a_props
>
> open (POSIX file b_path) as alias
> set b_props to get properties of text window 1
> set b_id to ID of b_props
-- the first line below is not needed, I just wanted to make
sure everything was working
> select text window id a_id
> select text window id b_id
-- it should have been commented out...
-- select text window id a_id
select text window id b_id
> set myOptions to {search mode:grep, starting at top:true, wrap
> around:false, backwards:false, case sensitive:false, match words:true, extend
> selection:false}
>
> set n to count lines of text of text window 1
> repeat with counter from 1 to n
> select line counter of text of text window 1
> set search_str to contents of selection
> select text window id a_id
> replace search_str using "" searching in text 1 of text
> window 1 options myOptions
> select text window id b_id
> end repeat
>
> end tell
> end run
> --
> +---------+---------+---------+---------+---------+---------+---------+---------+
--
You received this message because you are subscribed to the
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a feature request or would like to report a problem,
please email "[email protected]" rather than posting to the group.