■ このスレッドは過去ログ倉庫に格納されています
AppleScript アップルスクリプト 質問、発表 6
- 1 :名称未設定:2013/12/21(土) 21:50:45.07 ID:1PJJFexL0.net
- 質問、発表どっちでもスレ。
■注意
安直なスクリプト作成依頼、丸投げ、「こういうの作ってください!」はお断り。
わからない点、エラーが解決できない点についてはスクリプト片を添えて質問すること。
OSバージョンも忘れずに。
■参考
AppleScript Language Guide
https://developer.apple.com/library/mac/documentation/AppleScript/Conceptual/AppleScriptLangGuide/
TN2065: do shell script
https://developer.apple.com/library/mac/technotes/tn2065/
AppleScript: The Language of Automation
http://www.macosxautomation.com/applescript/
MacWiki - AppleScript
http://macwiki.sourceforge.jp/wiki/index.php/AppleScript
鳶嶋工房 / AppleScript
http://tonbi.jp/AppleScript/
AS Hole(AppleScriptの穴)
http://piyocast.com/as/
■過去スレ
1 http://pc11.2ch.net/test/read.cgi/mac/1174045850/
2 http://pc11.2ch.net/test/read.cgi/mac/1197443062/
3 http://pc11.2ch.net/test/read.cgi/mac/1223026902/
4 http://anago.2ch.net/test/read.cgi/mac/1256127156/
5 http://anago.2ch.net/test/read.cgi/mac/1330350325/
- 681 :名称未設定:2016/01/25(月) 23:56:31.78 ID:NpvROCdu0.net
- do shell script で afplay
- 682 :名称未設定:2016/01/26(火) 00:07:09.92 ID:OaX1S4kQ0.net
- 通知ありでも良ければ
display notification with title "終了しました" sound name ""
ユーザのライブラリ/Soundsに音源ファイル入れておけばOK
sound nameに拡張子無しのファイル名で音が出る。
名前が違えば通常の通知音が鳴る。
- 683 :名称未設定:2016/01/26(火) 03:37:54.07 ID:UV5S+svp0.net
- >>681 >>682
役に立つ回答有り難うございます。
できました。
do shell script "afplay /System/Library/Sounds/Ping.aiff"
- 684 :名称未設定:2016/01/29(金) 21:32:54.40 ID:uUQj78VG0.net
- >>683
afplay -v 0.1 とかでボリューム調整な
うちもそうやって通知音出してるわ
- 685 :名称未設定:2016/01/30(土) 23:18:50.99 ID:IOL1PbEa0.net
- 起動してウインドウ位置とウインドウサイズを固定するAutomatorのアプリをApple Scriptで作りたいのですが、一部のアプリで
tell application "アプリ名"
activate
tell front window
set bounds to {0, 0, 0, 0}
end tell
end tell
でエラーウインドウが出るだけでアプリの起動もできません。
他の方法として
tell application "System Events"
を使えばいいようですが、どんな風にかけて思った動作がするにか想像もできません…
どなたか助けていただけませんか。
- 686 :名称未設定:2016/01/30(土) 23:46:59.63 ID:LtqeZOXR0.net
- 「一部のアプリ」でなんだかよくわからない「エラーウインドウ」ね……
エスパー募集かな?
- 687 :名称未設定:2016/01/30(土) 23:59:59.45 ID:IOL1PbEa0.net
- https://i.imgur.com/4aXhmWl.png
こんなウインドウしか出てこないのでどうすればいいのか全くわかりません。
アプリはTweetbotなどです。
特にエスパーは必要ではありません。
- 688 :名称未設定:2016/01/31(日) 00:15:34.51 ID:sppaYWuL0.net
- >>687
https://goo.gl/TQPgXu
- 689 :名称未設定:2016/01/31(日) 00:43:24.43 ID:Lb5Fe+7B0.net
- 参考までに。
tell application "System Events"
set app_name to name of first item of (every application process that (frontmost is true))
tell process app_name
set a_win to (1st item of (every window that subrole is "AXStandardWindow"))
set position of a_win to {20, 60}
set size of a_win to {1600, 1200}
end tell
end tell
- 690 :名称未設定:2016/01/31(日) 00:50:08.78 ID:H6u9ib8G0.net
- tell application "System Events"
tell process "アプリ名"
tell front window
set position to {x, y}
set size to {w, h}
end tell
end tell
end tell
で行けんじゃないの
総レス数 1008
389 KB
新着レスの表示
掲示板に戻る
全部
前100
次100
最新50
read.cgi ver 2014.07.20.01.SC 2014/07/20 D ★