[システム設定]CDとDVDパネルを開く AS
【スクリプトエディタで開く】 |
CDとDVDパネルを開くAS.scpt.scpt | ソース |
|---|
| 001 | #!/usr/bin/env osascript |
| 002 | #coding: utf-8 |
| 003 | ----+----1----+----2----+----3----+----4----+----5----+----6----+----7-- |
| 004 | (* |
| 005 |
|
| 006 | CDとDVDシステム設定パネルを開く |
| 007 |
|
| 008 | CDとDVDのシステム設定のパネルは旧仕様 |
| 009 | かつ |
| 010 | CDプレイヤーデバイスが接続されないと表示されない設定 |
| 011 |
|
| 012 |
|
| 013 |
|
| 014 | com.cocolog-nifty.quicktimer.icefloe *) |
| 015 | ----+----1----+----2----+----3----+----4----+----5----+----6----+----7-- |
| 016 | use AppleScript version "2.8" |
| 017 | use scripting additions |
| 018 |
|
| 019 | set strFilePath to ("/System/Library/PreferencePanes/DigiHubDiscs.prefPane") as text |
| 020 | set aliasFilePath to (POSIX file strFilePath) as alias |
| 021 |
|
| 022 |
|
| 023 | tell application id "com.apple.systempreferences" |
| 024 | activate |
| 025 | set miniaturized of the settings window to false |
| 026 | end tell |
| 027 | repeat 10 times |
| 028 | tell application id "com.apple.systempreferences" |
| 029 | set boolFrontMost to frontmost as boolean |
| 030 | end tell |
| 031 | if boolFrontMost is true then |
| 032 | delay 1 |
| 033 | exit repeat |
| 034 | else |
| 035 | tell application id "com.apple.systempreferences" to activate |
| 036 | delay 0.5 |
| 037 | end if |
| 038 | end repeat |
| 039 |
|
| 040 | tell application "Finder" |
| 041 | open location aliasFilePath |
| 042 | end tell |
| 043 | delay 2 |
| 044 |
|
| 045 | tell application "Finder" |
| 046 | open location aliasFilePath |
| 047 | end tell |
| AppleScriptで生成しました |
|---|