タグ

osascriptに関するrin1024のブックマーク (3)

  • Mac Lion システム起動音を消す方法 - one day one life -tech-

    Macの起動音「ジャーン」を消す方法です。 スクリプト2つとログイン/ログアウトフックを使えばいけるみたいです。 スクリプト作成 # ホームディレクトリにscriptsというディレクトリを作成 ~ $mkdir scripts/ ~ $cd scripts/ ~/scripts $ # OS終了時にミュートにするスクリプトを作成 ~/scripts $cat muteon.sh #!/bin/bash osascript -e 'set volume with output muted' # OS起動時にミュートを解除するスクリプトを作成 ~/scripts $cat muteoff.sh #!/bin/bash osascript -e 'set volume without output muted' # 実行可能ファイルにするためパーミッション変更 ~/scripts $sudo c

    Mac Lion システム起動音を消す方法 - one day one life -tech-
  • コマンド/osascript - MacWiki

    概要[編集] AppleScript を実行するためのコマンドです。 場所: /usr/bin/osascript OS X のバージョン:Mac OS X 10.4 使い方[編集] osascript <file> osascript -e osascript は指定されたファイルか、コードを AppleScript として実行します。 AppleScript ファイルをコマンドラインから呼び出せる他、Shell script と組み合わせて利用することも可能です。 -- -- sleep.scpt: sleep immediately -- tell application "Finder" sleep end tell 例えば、上のようなファイルを用意して、次のコマンドを実行すると、 30 分後に Mac をスリープさせることができます。 $ sleep 1800 && osascr

  • AppleScriptでiTunesを操作する - Niku3

    実験用スクリプト property playlist_num : 1 tell application "iTunes" -- set the shuffle of library playlist 1 to true -- display dialog name of library playlist 1 as text -- display dialog shuffle of library playlist 1 as text --display dialog album of track 3 of library playlist 1 as text --next track set playlist_num to playlist_num + 1 display dialog (count track of playlist playlist_num) as text repea

  • 1