[表示 : 全て 最新50 1-99 101- 201- 301- 401- 501- 601- 701- 801- 901- 2chのread.cgiへ]
Update time : 12/30 13:21 / Filesize : 344 KB / Number-of Response : 942
[このスレッドの書き込みを削除する]
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧] [類似スレッド一覧]


↑キャッシュ検索、類似スレ動作を修正しました、ご迷惑をお掛けしました

AppleScript アップルスクリプト 質問、発表 3



293 名前:名称未設定 mailto:sage [2009/01/13(火) 22:47:12 ID:v0LdsXek0]
phpで書いてみたというか他のソースのコピペだけどバックスラッシュ地獄になってしまった
10.5で特にphpをいじった記憶は無いのでOS標準状態で行ける気がするが詳細は不明。
自分で撮った対応画像が無いのであってるかよくわかりませんがネットで拾った画像ではそれっぽかった。
set theFile to "/Users/hoge/Desktop/Download/geotag1.jpg"
-- www.google.com/codesearch/p?hl=ja#jDlm4b6TORk/map/mapItemEdit.inc&q=GPSLongitude%20exif_read_data
set theGPSData to do shell script "php -r '
@$exif = exif_read_data($argv[1], 0,true);
if (!empty($exif)){
foreach ($exif as $key => $section) {
if ($key ==\"GPS\") {
$deg = explode(\"/\",$section[\"GPSLatitude\"][0]);
$min = explode(\"/\",$section[\"GPSLatitude\"][1]);
$sec = explode(\"/\",$section[\"GPSLatitude\"][2]);
$Glatitude = $deg[0]/$deg[1] + ($min[0]/$min[1])/60 + ($sec[0]/$sec[1])/3600;
$Glatitude = ($section[\"GPSLatitudeRef\"]==\"N\") ? $Glatitude:-$Glatitude;
$deg = explode(\"/\",$section[\"GPSLongitude\"][0]);
$min = explode(\"/\",$section[\"GPSLongitude\"][1]);
$sec = explode(\"/\",$section[\"GPSLongitude\"][2]);
$Glongitude = $deg[0]/$deg[1] + ($min[0]/$min[1])/60 + ($sec[0]/$sec[1])/3600;
$Glongitude = ($section[\"GPSLongitudeRef\"]==\"E\") ? $Glongitude:-$Glongitude;
echo \"$Glatitude,$Glongitude\";
}
}
}
' " & quoted form of theFile

if theGPSData is not "" then
set gpsUrl to "maps.google.com/?q=" & theGPSData & "&spn=0.05,0.05&t=h&om=1&hl=jp"
open location gpsUrl
else
beep
end if






[ 続きを読む ] / [ 携帯版 ]

全部読む 前100 次100 最新50 [ このスレをブックマーク! 携帯に送る ] 2chのread.cgiへ
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧](;´∀`)<344KB

read.cgi ver5.27 [feat.BBS2 +1.6] / e.0.2 (02/09/03) / eucaly.net products.
担当:undef