osascript - How to indent applescript when running in bash script? -
osascript -e "set x 3" osascript -e "if x 5 then" osascript -e " tell application \"system events\" keystroke return" osascript -e "end if"
the output get
14:14: syntax error: expected end of line found end of script. (-2741) 0:6: syntax error: “if” can’t go after “end”. (-2740)
can't see whats wrong script. might issue indentation. used osascript inside bash files ?
put applescript lines together. way:
osascript -e "set x 3 if x 5 tell application \"system events\" keystroke return end if"
additionally, can create file following applescript code:
#!/usr/bin/osascript set x 3 if x 5 tell application "system events" keystroke return end if
Comments
Post a Comment