Re: AppleScript – Toggle Between 2 Magnification Levels

2016-05-29 Thread Oliver Boermans
Great! Thanks Chris.

On 29 May 2016 at 07:26, Christopher Stone 
wrote:

> Hey Folks,
>
> I wrote this script for someone on the TextWrangler list, so I've
> repurposed it for BBEdit and am also posting it here.
>
> It's pretty self-explanatory.
>
> --
> Best Regards,
> Chris
>
> ---
> # Toggle front window between 2 magnification levels.
> ---
> *property* defaultMagLevel : 1.0
> *property* secondaryMagLevel : 1.2
>
> *tell* *application* "BBEdit"
>   *tell* *front* *text window*
> *if* display magnification = defaultMagLevel *then*
>   *set* display magnification *to* secondaryMagLevel
> *else*
>   *set* display magnification *to* defaultMagLevel
> *end* *if*
>   *end* *tell*
> *end* *tell*
> ---
>
> --
> This is the BBEdit Talk public discussion group. If you have a
> feature request or would like to report a problem, please email
> "supp...@barebones.com" rather than posting to the group.
> Follow @bbedit on Twitter: 
>
> ---
> 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 bbedit+unsubscr...@googlegroups.com.
> To post to this group, send email to bbedit@googlegroups.com.
>

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 

--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.


Re: AppleScript – Toggle Between 2 Magnification Levels

2016-05-29 Thread Lawrence San
Hi Chris,

Is "magnification" a property newly added to recent versions of BBEdit? I'm
still running version 9.6.3 and I suspect that's the case because I can't
find it in the program's AS Dictionary, but I'm not sure  When I paste
your script into AppleScript Editor and try to either Compile or Run, I get
an error. In the line:

*if* display magnification = defaultMagLevel *then*

...it highlights the word "magnification" and pops up a sheet that says:

   *Syntax Error*
   Expected "then", etc. but found identifier.

Is this just because I'm still walking around in ancient times, or is there
something I don't understand here?

Thanks much,
Lawrence


On Sat, May 28, 2016 at 5:56 PM, Christopher Stone <
listmeis...@suddenlink.net> wrote:

> Hey Folks,
>
> I wrote this script for someone on the TextWrangler list, so I've
> repurposed it for BBEdit and am also posting it here.
>
> It's pretty self-explanatory.
>
> --
> Best Regards,
> Chris
>
> ---
> # Toggle front window between 2 magnification levels.
> ---
> *property* defaultMagLevel : 1.0
> *property* secondaryMagLevel : 1.2
>
> *tell* *application* "BBEdit"
>   *tell* *front* *text window*
> *if* display magnification = defaultMagLevel *then*
>   *set* display magnification *to* secondaryMagLevel
> *else*
>   *set* display magnification *to* defaultMagLevel
> *end* *if*
>   *end* *tell*
> *end* *tell*
> ---
>
> --
> This is the BBEdit Talk public discussion group. If you have a
> feature request or would like to report a problem, please email
> "supp...@barebones.com" rather than posting to the group.
> Follow @bbedit on Twitter: 
>
> ---
> 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 bbedit+unsubscr...@googlegroups.com.
> To post to this group, send email to bbedit@googlegroups.com.

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 

--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.


Re: AppleScript – Toggle Between 2 Magnification Levels

2016-05-29 Thread Tom Robinson
If by ‘newly added’ you mean 10.5, then yes :]

http://www.barebones.com/support/bbedit/arch_bbedit105.html


> On 2016-05-30, at 05:59, Lawrence San  wrote:
> 
> Is "magnification" a property newly added to recent versions of BBEdit? I'm 
> still running version 9.6.3 and I suspect that's the case because I can't 
> find it in the program's AS Dictionary, but I'm not sure

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: 

--- 
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 bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.