re:  taking a stab at Applescript

Greetings,

I am trying to write a script that will comment and uncomment a block of code
i.e.

if (x<y) 
{
...
} 
after running the script:
/*
if (x<y) 
{
...
} 
*/
-- and be able to uncomment a block as well!

-- script --

tell application "BBEdit"
    activate
    add prefix selection of text window 1 prefix "/* "
    
    find "\\Z" searching in selection options {search mode:grep} with selecting 
match
    
    insert text  "*/" & return  -- this line does not work
end tell

I have not touched AppleScript in a long time, and am stuck, I would appreciate 
if
someone could show me the correct syntax (for BBE 8.2.6), or suggest a better 
away 
of doing this.  That would be great!

Thanks,
Dave Gilden
Ft. Worthless, Tx

================================================
        Cora Connection: Your West African Music Source
          Resources, Recordings, Instruments & More!
              <http://www.coraconnection.com/> 
================================================


--
------------------------------------------------------------------
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