| PAGE-SELECT | NEXT

≫ EDIT

システム音量を一番小さくするには無音にしてからミュートキー

メールで教えていただいたTipsです。

4分の1ずつ微調整するよりさらに小さい音に設定できます。

スピーカーから再生する分には聞こえないくらい小さいのですが、ヘッドフォンなどを利用している場合調度いいかも知れません。


Tag : 音量 Tips

| Macの基本 | 23時22分 | comments:0 | trackbacks:0 | TOP↑

≫ EDIT

複数開いたQuickTime動画をモザイク状に配置しなおし、同時再生するAppleScript

macosxhints.comで掲載されていたネタです。

QuickTime動画を複数開いた状態で下記のAppleScriptを実行すると、綺麗に敷き詰めて配置しなおされ、同時に再生されます。

QuickTime動画をモザイク状に並べて再生するAppleScript

on open filelist
tell application "QuickTime Player" to open filelist
run
end open
on run
tell application "QuickTime Player"
    set ratio to 4 / 3
    
    tell application "Finder" to set display_bounds to bounds of window of desktop
    set display_width to (item 3 of display_bounds)
    set display_height to (item 4 of display_bounds) - 42 -- menu height + title bar
    set window_count to count of windows
    set max_pixels to 0
    repeat with potential_cols from 1 to window_count -- try all possibilities - hardly optimal but who cares.
     set potential_rows to round (window_count - 1) / potential_cols + 1 rounding toward zero
     set {potential_window_width, potential_window_height} to {round display_width / potential_cols rounding toward zero, round display_height / potential_rows rounding toward zero}
     if potential_window_width / potential_window_height < ratio then
        set {potential_window_width, potential_window_height} to {potential_window_width, round potential_window_width / ratio rounding toward zero}
     else
        set {potential_window_width, potential_window_height} to {potential_window_height * ratio, potential_window_height}
     end if
     set used_pixels to potential_window_width * potential_window_height * window_count
     if used_pixels > max_pixels then
        set {window_width, window_height, cols, rows} to {potential_window_width, potential_window_height, potential_cols, potential_rows}
        set max_pixels to used_pixels
     end if
    end repeat
    
    set {x, y} to {0, 0}
    set wins to (get every window)
    repeat with win in wins
     set doc to document of win
     set controller type of doc to none
     set looping of doc to true
     set {wi, hi} to natural dimensions of doc
     if wi / window_width > hi / window_height then
        set dimensions of doc to {window_width, hi / (wi / window_width)}
     else
        set dimensions of doc to {wi / (hi / window_height), window_height}
     end if
     set x to x + 1
     if x = cols then set {x, y} to {0, y + 1}
    end repeat
    
    set {x, y} to {0, 0}
    set wins to (get every window)
    repeat with win in wins
     set {wi, hi} to natural dimensions of doc
     if wi / window_width > hi / window_height then
        set bounds of win to {window_width * x, 22 + window_height * y, window_width * x + window_width, 22 + window_height * y + hi / (wi / window_width)}
     else
        set bounds of win to {window_width * x, 22 + window_height * y, window_width * x + wi / (hi / window_height), 22 + window_height * y + window_height}
     end if
     set x to x + 1
     if x = cols then set {x, y} to {0, y + 1}
    end repeat
    set wins to (get every window)
    repeat with win in wins
     play document of win
    end repeat
    activate
end tell
end run
上記のスクリプトをスクリプトエディタで開く

サイズが同じ動画ならばデスクトップいっぱいにぴっちり綺麗に並べて表示されますが、ばらばらならばこんなものでしょうか。

コントローラ部分が隠されて表示され、ループ再生になります。



| Macの基本 | 21時36分 | comments:0 | trackbacks:0 | TOP↑

≫ EDIT

指定されたフォルダ以下のファイルを、そのファイルが作成された日別にフォルダへ振り分けてくれるAppleScript

macosxhints.comに掲載されていたネタです。

大量のファイルを入れ過ぎて混沌としてきたフォルダを指定して使えば、綺麗さっぱりファイルをそのファイルの作成日別にフォルダへ振り分けてくれます。

指定フォルダ以下のファイルを作成日で振り分け

tell application "Finder"
set mifold to choose folder
set filelist to every file of mifold as list
set foldlist to every folder of mifold as list
repeat with i from 1 to number of items in filelist
set subj to item i of filelist as alias
set epoch to (do shell script "stat -f \"%B\" " & (quoted form of (POSIX path of subj)))
set caldate to do shell script ("date -r " & epoch & " \"+%Y-%m-%d\"")

if not (exists folder caldate of mifold) then
make new folder at mifold with properties {name:caldate}
end if
try
(* try ignores errors from locked files *)
move file subj to folder caldate of mifold
end try
end repeat
repeat with j from 1 to number of items in foldlist
set subj to item j of foldlist as alias
if name of subj does not start with "200" then
set epoch to (do shell script "stat -f \"%B\" " & (quoted form of (POSIX path of subj)))
set caldate to do shell script ("date -r " & epoch & " \"+%Y-%m-%d\"")
if not (exists folder caldate of mifold) then
make new folder at mifold with properties {name:caldate}
end if
try
(* try ignores errors from locked items *)
move folder subj to folder caldate of mifold
end try

end if
end repeat
end tell

このAppleScriptをスクリプトエディタで開く



| Macの基本 | 23時43分 | comments:0 | trackbacks:0 | TOP↑

≫ EDIT

ファイル保存、指定のシートダイアログでパス指定でフォルダに移動したい場合は「/」か「~」

わかばマークのMacの備忘録さんでOpen・Saveダイアログの操作についての、まとめ記事が公開されています。

そこで、こんなに簡単な方法があったのかと思ってしまったのですが、保存、指定のシートダイアログで「/」か「~」をタイプすると「フォルダへ移動」のダイアログシートが表示されるのですね。


ファイル保存、指定のシートダイアログでパス指定でフォルダに移動したい場合は「/」か「~」 from veadar on Vimeo.

シートダイアログ時に「/」か「~」で「フォルダへ移動」が表示

Command+Shift+Gの方法は知っていましたが、こちらのほうが絶対簡単でいいですよね。

Finderのサイドバーに登録してあるような、浅い階層のフォルダに保存する場合は必要ありませんが、深い階層にファイルを保存したり、指定したりする場合の時に役立ちそうです。



| Macの基本 | 22時52分 | comments:0 | trackbacks:0 | TOP↑

≫ EDIT

Safari 4のタブを今まで通りの表示に戻す方法

タブがウィンドウ上部に表示されるなんてSafariじゃない、Safariの皮を被ったGoogle Chromeだ!

と思う人はターミナルですぐさま以下の文字列をコピペしてreturnを押しましょう。
defaults write com.apple.Safari DebugSafari4TabBarIsOnTop -bool NO



| Macの基本 | 17時33分 | comments:1 | trackbacks:0 | TOP↑

| PAGE-SELECT |