joeg
#1
I have a script that searches for a specific
in a web page (in BBEdit) using ‘find’ and having found it and selected it, I want to delete it.
I have tried
delete selection
set selection to “”
They have worked at some time but won’t now.
Does ‘the selection’ not refer to the selected text?
What am I missing
TIA
kel1
#2
Is BBEdit similar to TextWrangler’s ‘selection’.
kel1
#3
BTW, I just got the selected text in TextWrangler.
joeg
#4
Apparently, I should have addressed it as
set the text of selection to “”
kel1
#5
Hi joeg,
You cannot delete text from web pages. Not sure what you’re trying to do.
Edited: wait, I think I know what you’re trying to do.
gl,
kel
kel1
#6
Hi joeg,
This worked for me and I’ll try to run it a few more times:
tell application "TextWrangler"
activate
delay 3
delete selection
end tell
Intermittent problems are the hardest to solve.
Edited: btw, if that works all the time, then try going down to ‘delay .2’.
gl,
kel