Vorheriges Thema anzeigen :: Nächstes Thema anzeigen |
Autor |
Nachricht |
wiso •-->

Anmeldedatum: 05.09.2006 Beiträge: 25
|
Verfasst am: 10.12.2008 - 15:36 Titel: textedit - ans ende des dokuments |
|
|
hi und guten tag,
ich möchte mehrere textedit-dokumente mit einem droplet öffnen und dann den cursor ans ende des dokuments setzen.
mit dem aufmachen der dokumente hats ja schon gut geklappt, aber wie komme ich an den schluss.
irgendsowas wie "go to last pargraph of document" klappt nicht?!
jetzt hab ichs mit gui probiert:
"keystroke 125 using command down"
funktioniert aber auch nicht.
bis jetzt hab ich:
on open dateiliste
repeat with Datei in dateiliste
set Datei to Datei as string
delay 1
tell application "TextEdit"
activate
open Datei
tell application "TextEdit"
tell application "System Events"
tell process "TextEdit"
set frontmost to true
keystroke 125 using command down
end tell
end tell
end tell
end tell
end repeat
end open
schätze es geht irgendwie ganz einfacher, nur ich sehs nicht?
danke für hilfe,
mfg,
wiso |
|
Nach oben |
|
 |
wiso •-->

Anmeldedatum: 05.09.2006 Beiträge: 25
|
Verfasst am: 13.12.2008 - 16:27 Titel: |
|
|
etwas einfacher formuliert:
ich möchte ein textedit dokument öffnen und den cursor ganz ans ende des textes setzen
wie realisiert man das?
danke,
mfg,
w. |
|
Nach oben |
|
 |
hubionmac •--->


Anmeldedatum: 26.02.2004 Beiträge: 245 Wohnort: Münster
|
Verfasst am: 14.12.2008 - 22:03 Titel: |
|
|
Mit dem Code (als Programm) kannst Du entweder die Datei auf das Skript ziehen oder einfach im Finder auswählen und dann das Programm aus dem Dock starten
on open these
repeat with this in these
do shell script "open -a /Applications/TextEdit.app " & ¬
quoted form of (POSIX path of (this as alias))
tell application "TextEdit"
activate
tell application "System Events"
key code 125 using command down
end tell
end tell
end repeat
end open
on run
tell application "Finder" to set these to selection
repeat with this in these
do shell script "open -a /Applications/TextEdit.app " & ¬
quoted form of (POSIX path of (this as alias))
tell application "TextEdit"
activate
tell application "System Events"
key code 125 using command down
end tell
end tell
end repeat
end run |
|
Nach oben |
|
 |
wiso •-->

Anmeldedatum: 05.09.2006 Beiträge: 25
|
Verfasst am: 17.12.2008 - 03:08 Titel: danke |
|
|
so weit weg war ich gar nicht: nur das der keystroke 125 eigentlich ein key code 125 ist.
vielen dank für die fertige lösung - klappt ausgezeichnet!
mfg,
wiso |
|
Nach oben |
|
 |
|