Re: ragtime, applescript und mac os x
[email protected] Thu, 13 Feb 2014 23:54:59 +0100
| Newsgroups | gmane.os.apple.ragtime.german |
|---|---|
| Message-ID | <[email protected]> |
Am 13.02.2014 um 22:26 schrieb jacques villars:
Moin, Jacques,
Dein Script zeichnet bei mir per Intaglio ein Rechteck.
Nun nehme ich mein RagTime 6.5.2 und den Skripteditor im Modus
Aufzeichnen. Dann öffne ich in RagTime ein neues Dokument, lösche den
mitgebrachten Rahmen und zeichne neu.
Probier es bitte mal aus. Hier das entstandene Skript. Es wiederholt
nun bei Dir, was eben aufgezeichnet wurde.
tell application "RagTime 6.5"
activate
make with properties {component types:layout} new document at end
select rectangle 1 of page 1 of layout "Layout 1" of document 1
delete selection
make new rectangle at beginning of page 1 of layout "Layout 1" of
document 1 with data {60.2361, 92.1258, 419.5268, 714.3294} with
properties {contents type:drawing}
make at beginning of drawing "Zeichnung 1" of document 1 new Bezier
curve with data {{68.0314, 177.8737}, {68.0314, 177.8737}, {63.7794,
106.299}, {145.984, 104.8817}, {228.1886, 103.4644}, {223.9366,
155.1966}, {223.9366, 177.8737}, {223.9366, 200.5508}, {204.0941,
223.9366}, {204.0941, 223.9366}, {204.0941, 223.9366}, {236.6925,
256.535}, {236.6925, 256.535}, {236.6925, 256.535}, {204.0941,
262.2043}, {204.0941, 262.2043}, {204.0941, 262.2043}, {184.9603,
243.7791}, {184.9603, 243.7791}, {184.9603, 243.7791}, {163.7005,
265.0389}, {139.606, 265.7475}, {115.5116, 266.4562}, {68.0314,
177.165}, {68.0314, 177.8737}}
make at beginning of drawing "Zeichnung 1" of document 1 new Bezier
curve with data {{105.5904, 175.039}, {105.5904, 175.039}, {116.9289,
141.732}, {145.984, 141.0234}, {175.039, 140.3147}, {184.9603,
155.9052}, {185.669, 182.1257}, {186.3776, 208.3461}, {184.9603,
207.6374}, {184.9603, 207.6374}, {184.9603, 207.6374}, {165.8265,
182.8343}, {165.8265, 182.8343}, {165.8265, 182.8343}, {128.9762,
180.7083}, {128.9762, 180.7083}, {128.9762, 180.7083}, {165.1178,
221.102}, {165.1178, 221.102}, {165.1178, 221.102}, {151.6533,
238.8185}, {142.4407, 239.5271}, {133.2281, 240.2358}, {99.9211,
214.724}, {102.7557, 194.8815}, {105.5904, 175.039}, {103.4644,
175.7477}, {105.5904, 175.039}}
select Bezier curve 2 of drawing "Zeichnung 1" of document 1
set left control of Bezier point 8 of Bezier curve 2 of drawing
"Zeichnung 1" of document 1 to {163.6851, 266.8633}
set right control of Bezier point 8 of Bezier curve 2 of drawing
"Zeichnung 1" of document 1 to {63.0708, 262.2043}
select Bezier curve 1 of drawing "Zeichnung 1" of document 1
select Bezier point 9 of Bezier curve 1 of drawing "Zeichnung 1" of
document 1
delete selection
select Bezier curve 1 of drawing "Zeichnung 1" of document 1
set left control of Bezier point 8 of Bezier curve 1 of drawing
"Zeichnung 1" of document 1 to {151.669, 239.9885}
set right control of Bezier point 8 of Bezier curve 1 of drawing
"Zeichnung 1" of document 1 to {99.9211, 237.4011}
end tell
So kompliziert ist es nur, weil an der gezeichneten Bezierkurve noch
nachträglich geändert wird.
Du kannst Dir zwischen die Zeilen jeweils ein delay 2 einfügen, dann
wird das Q langsamer gezeichnet und Du kannst es beobachten
Was ist nun Deine Frage. Du möchtest innerhalb RagTime aufzeichnen?
Immerhin läuft die Aufzeichnung im Skripteditor außen.
Viele Grüße,
Norbert