Oh man, I was really overthinking it trying to turn it into an executable. 
Got it working and this is very cool. Appreciate you spelling it out so 
well and getting me on track! Couple more quick things: would it be hard to 
do one that only extracts text that is within quotation marks? I tried one 
off a github cheatsheet and in the past hours couldn't modify it easy, but 
am making progress. Also, if you or anyone on here can suggest a book on 
getting better at expressions and BBedit? Maybe just piecing it together 
off stackoverflow and google etc is best though? Thanks again

On Thursday, January 3, 2019 at 8:31:53 AM UTC-8, Christopher Stone wrote:
>
> On 01/01/2019, at 13:47, Dj <[email protected] <javascript:>> wrote:
>
> From what I see with your results, I think this is getting me to the place 
> of "good enough" for this problem.
>
> ------------------------------
>
> Hey Dj,
>
> Very good.
>
> So the embarrasing part, I've tried to take your text and make a shell 
> script to place in the script folder. I followed directions from a tutorial 
> that had me run a command from terminal to make the text into a script: 
>
>
> I believe I gave you instructions on how to use a BBEdit Text Filter.
>
> You do *not* need to make the script executable.
>
> I then tried it in the apple script editor, plugged your text below into 
> there and then saved it as a .scpt.
>
>
> This can never work, because the Applescript Editor is for AppleScript.
>
> The Perl script is a shell script.
>
> I'm sure the daunting initial hurdles will start to make more sense.
>
>
> Yes.  Everyone who starts this journey feels lost at sea for a while.
>
> This whole text was the correct format to make a script from without Perl 
> right?
>
>
> Right.
>
> ------------------------------
>
> #!/usr/bin/env perl -0777 -sw
> use v5.12;
> use utf8;
>
> my $text = <>;
> my @array = $text =~ /(\b\w[^.!]+?\?)/gms;
> $, = "\n";
> say @array;
>
> ------------------------------
>
> Paste the above into a BBEdit text document.
>
> Save it in this directory:
>
> ~/Library/Application Support/BBEdit/Text Filters/
>
> (If the directory doesn't exist then create it.)
>
> Give the script a descriptive name like:
>
> MyPerlScript.pl
>
> Run it on the front document (or selection in the front document) from the:
>
> Text > Apply Text Filter > YourScriptName
>
> Menu.
>
> ------------------------------
>
> AppleScript is very useful, but it's a whole different animal.
>
> Paste this into the Applescript Editor:
>
> *tell* *application* "BBEdit"
>     *activate*
>     *make* new *text document* with properties {*text*:"My First 
> AppleScript!"}
> *end* *tell*
>
> And click the run button or type Cmd-R.
>
> --
> Best Regards,
> Chris
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or need technical support, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <https://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to