BikeのAppleScript対応
version1.0 preview 44にて対応
2022/5/4
code:text.txt
Standard Suite Common classes and commands for all applications.
open v : Open a document.
open file or list of file : The file(s) to be opened.
→ document or list of document : The opened document(s).
save options enum
yes : Save the file.
no : Do not save the file.
ask : Ask the user whether or not to save the file.
close v : Close a document.
close specifier : the document(s) or window(s) to close.
save v : Save a document.
save specifier : The document(s) or window(s) to save.
in file : The file in which to save the document. printing error handling enum
standard : Standard PostScript error handling
detailed : print a detailed report of PostScript errors
print settings n
properties
copies (integer) : the number of copies of a document to be printed
collating (boolean) : Should printed copies be collated?
starting page (integer) : the first page of the document to be printed
ending page (integer) : the last page of the document to be printed
pages across (integer) : number of logical pages laid across a physical page
pages down (integer) : number of logical pages laid out down a physical page
requested print time (date) : the time at which the desktop printer should print the document
error handling (standard/detailed) : how errors are handled
fax number (text) : for fax number
target printer (text) : for target printer
print v : Print a document.
print list of file or specifier : The file(s), document(s), or window(s) to be printed.
quit v : Quit the application.
quit
count v : Return the number of elements of a particular class within an object.
count specifier : The objects to be counted.
→ integer : The count.
delete v : Delete an object.
delete specifier : The object(s) to delete.
duplicate v : Copy an object.
duplicate specifier : The object(s) to copy.
exists v : Verify that an object exists.
exists any : The object(s) to check.
→ boolean : Did the object(s) exist?
make v : Create a new object.
make
new type : The class of the new object.
→ specifier : The new object.
move v : Move an object to a new location.
move specifier : The object(s) to move.
to location specifier : The new location for the object(s).
elements
contains documents, windows.
properties
name (text, r/o) : The name of the application.
frontmost (boolean, r/o) : Is this the active application?
version (text, r/o) : The version number of the application.
responds to
open, print, quit.
elements
contained by application.
properties
name (text, r/o) : Its name.
modified (boolean, r/o) : Has it been modified since the last save?
file (file, r/o) : Its location on disk, if it has one.
responds to
close, print, save.
window n : A window.
elements
contained by application.
properties
name (text, r/o) : The title of the window.
id (integer, r/o) : The unique identifier of the window.
index (integer) : The index of the window, ordered front to back.
bounds (rectangle) : The bounding rectangle of the window.
closeable (boolean, r/o) : Does the window have a close button?
miniaturizable (boolean, r/o) : Does the window have a minimize button?
miniaturized (boolean) : Is the window minimized right now?
resizable (boolean, r/o) : Can the window be resized?
visible (boolean) : Is the window visible right now?
zoomable (boolean, r/o) : Does the window have a zoom button?
zoomed (boolean) : Is the window zoomed right now?
document (document, r/o) : The document whose contents are displayed in the window.
responds to
close, print, save.
Bike Suite
saveable file format enum
Bike Format : Bike file format
OPML Format : OPML file format
Plain Text Format : Plain text file format
row n : A row in your outline.
elements
contains rows, child rows; contained by rows, documents.
properties
id (text, r/o) : The unique and persistent identifier of this row.
link (text, r/o) : URL link to this row combining document id with item id.
level (integer, r/o) : The indentation level of this row in the outline.
name (text) : Plain text content of this row. (not unique)
container (row or document, r/o) : Container of this row.
parent row (row, r/o) : Parent of this row, will be missing value for root row.
responds to
move, duplicate, delete.
child row n inh. row : Same as row, only needed so that AppleScript can distinguish between the rows and child rows collections. elements
contained by documents.
elements
contains rows, child rows.
properties
id (text, r/o) : The unique and persistent identifier of this document.
root row (row, r/o) : Root row of this document, never visible in outline editor.
hoisted row (row) : Hoisted row in this window.
focused row (row) : Focused row in this window.
selected text (text, r/o) : Selected text in document.
selection row (row, r/o) : Row intersecting the selection head.
selection rows (list of row, r/o) : Rows intersecting the selectioin.
responds to
move, duplicate, delete, collapse, expand, select, import, export.
properties
font size (number) : Bike font size preference.
background color (color) : Bike background color preference.
foreground color (color) : Bike foreground color preference.
collapse v : Collapse rows.
collapse document
at list of row : The rows to collapse.
expand v : Expand rows.
expand document
at list of row : The rows to collapse.
select v : Set selection.
select document
at row : The row to select.
import v : Import rows into your document.
import document
from text : The text to import.
→ list of row : The imported row(s).
export v : Export rows from your document.
export document
→ text : The formatted text of the exported rows.
サンプル
code:sample.scpt
tell application "Bike"
set a to selection rows of document 1
set b to document 1
collapse b at a
end tell
カーソル行を閉じる。
https://gyazo.com/960176f75acc9d5b0874c16747199e70