Apple Script から ライブラリをインポートした pyファイルを実行したら、「そんなライブラリはありません」とエラーが出た。 パスが通ってないからだろうなと思い、 ターミナルから、 export -p と打つと
カテゴリー: Shell
【AppleScript】Python を使って「trim」する
AppleScript → Shell → Python で、trimする。 log my trim({text_:" test "}) on trim(args) set {text_:aText}
【Shell】sort コマンド
フォルダ一覧を取得する際に、 sort を付けなかったら、並びがバラバラだったので、 並び替えのコマンドを追加。 set file_path to "【フォルダパス】" set list_str to
【Python】Shell、Apple Script に引数を渡して戻り値を取得する方法
Python から Shell 経由で Apple Script のコードを使う。 Pythonファイル(test.py) import subprocess if __name__ == '__main__&
【Shell】Python に引数を渡して戻り値を取得する方法
Python に引数を渡して戻り値を取得する Shell コマンド test1=$(python test.py 123) echo $test1 test.py import sys arg1 = "&quo
【Shell】Macの画面に通知ダイアログを出す方法
AppleScript 経由で Shellからでも通知ダイアログを出せる。 #!/bin/sh /usr/bin/osascript -e 'display notification "hogehog