I'd like a hotkey that brings up the find window with specified options (the find options are sticky but when I hit this key I want them to be reset to my specs). I've got the following applescript, but it doesn't populate the search field or fill-out the options.
(I don't know much about applescript)
tell application "BBEdit"
try
open find window
find "hello" searching in text of front text window options {search mode:grep, starting at top:false, wrap around:true, backwards:false, case sensitive:false, match words:false, extend selection:false} with selecting match
end try
end tell
Also, when I hit "return" the window goes away, but when I hit the hotkey for "previous" (shift-command-G) the window stays open, is there a way to "find previous" and dismiss the window with one keystroke?
--Display Dialog and Get Input
display dialog "Grep Search for..." default answer ""
--Get Answer & Return Comment
set theSearch to (text returned of result)
tell application "BBEdit"
try
find theSearch searching in text of front text window options {search mode:grep, starting at top:false, wrap around:false, backwards:false, case sensitive:false, match words:false, extend selection:false} with selecting match
end try
end tell