Created
October 20, 2011 19:00
-
-
Save benspaulding/1301982 to your computer and use it in GitHub Desktop.
A wishful script for changing BBEdit’s page guide position, were it supported.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
File: | |
Change Page Guide Position.applescript | |
Abstract: | |
This script would change the position of the page guide for the active | |
document in BBEdit. If scripting the page guide position was possible. :( | |
Version: | |
n/a | |
Author: | |
Ben Spaulding <http://benspaulding.us/> | |
Details: | |
This is currently only a wish. Changing the page guide position can be | |
neither scripted nor recorded. If I had my wish, the ``text window`` class | |
would have a gettable and settable ``page guide position`` property. | |
*) | |
tell application "BBEdit" | |
activate | |
set textWindow to text window 1 | |
set oldPosition to guide position of textWindow | |
set changeDialog to display dialog ¬ | |
"Change page guide position:" ¬ | |
default answer (oldPosition) ¬ | |
buttons {"Cancel", "Change"} ¬ | |
default button 2 ¬ | |
with icon note | |
if button returned of changeDialog is "Change" then | |
set newPosition to text returned of changeDialog | |
set guide position of textWindow to newPosition | |
end if | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment