Sunday, March 27, 2011

apple script to delete selected line numbers from text editor

I was having a huge sql script, From which I need to extract a small portion..... Cut / Paste seems to be a tough task this time... then I tried to write a small but powerful script & YES! this worked and made this task very easy & quick.... :)

tell application "TextWrangler"
tell window 1
set a to 1
set b to 4330
select (lines a through b)
delete the selection
end tell
end tell

No comments:

Post a Comment