Applescript'in küçük bir bölümünü kullanan bir kabuk betiğiyle sorun yaşıyorum. Applescript editörü ile derlediğimde çalışır. Bir kabuk betiği içinde değil. (Işleri)osascript/syntax hatası: Beklenen satır sonu ancak komut adı bulundu. (-2741)
osascript -e 'tell application "System Events" -e 'activate'
osascript -e 'tell process "Application 10.5" -e 'set frontmost to true' -e 'end tell'
osascript -e 'delay 1' -e 'keystroke return' -e 'delay 1' -e 'keystroke return'
end tell
AppleScript: ait
tell application "System Events"
activate
tell process "Application 10.5"
set frontmost to true
end tell
delay 1
keystroke return
delay 1
keystroke return
end tell
[güncellenmiş]/[çözüldü]
Bu sürmüştür bakım İşte
kabuk kodudur Ben de içinde çalışmak için applescript değiştirmeye çalışıyorum her türlü sorun cehennem komut dosyası:44:49: syntax error: Expected end of line but found command name. (-2741) 23:28: syntax error: Expected end of line but found “after”. (-2741)
## shell script code
echo "shell script code"
echo "shell script code"
## applescript code
osascript <<EOF
tell application "Scriptable Text Editor"
make new window
activate
set contents of window 1 to "Hello World!" & return
end tell
EOF
## resume shell script...
Size bir kabuk içine doğrudan saf AppleScript'i koymak mümkün olduğunu çok serin. ;-)
Açıklama için teşekkürler. Aslında çalışmayı değiştirmek için yapılan tüm çalışmalardan geçmek zorunda kalmadan, el yazmasını doğrudan kabuk betiğine koymanın mükemmel bir yolunu buldum. (yukarıyı görmek) - –