Internet Explorer/Downのサンプル
on run {}
--set URLstr to URLstr as text
set URLstr to "http://adg.bne.jp/takenote" as text
with timeout of 5 seconds
tell application "Internet Explorer"
OpenURL URLstr
repeat 5 times
delay 2
set reTXT to GetSource
if "</html>" is in reTXT then
exit repeat
end if
end repeat
end tell
end timeout
return reTXT
end run
こんな感じでページの情報をGETする。
TOPへ
Internet Explorer/OpenURL
on run {URLstr}
set URLstr to URLstr as text
tell application "Internet Explorer"
OpenURL URLstr
end tell
return "true"
end run
TOPへ
upload/download
on run {URLNAME, FILENAME}
set URLNAME to URLNAME as string
set FILENAME to FILENAME as string
try
tell application "URL Access Scripting"
download URLNAME to file FILENAME replacing yes with progress
end tell
on error
return "false"
end try
return "true"
end run
OSXからよぶと
クラシックが起動するので
System/Library/ScriptingAdditions/URL Access Scripting.app
をあらかじめ起動しておく。
AppleScriptから起動させたいがアクセス権が
ないためダメ
TOPへ
upload/upload
set theURL to "ftp://" & IDText & ":" & passWordText & "@" & URLText
tell application "URL Access Scripting"
try
upload file FileName to theURL replacing yes with progress
on error errmes number errNo
beep
display dialog (errNo as text) & ":" & errmes
--display dialog "" default answer FileName
end try
end tell
こんなんでうまくいくとおもったら
なかなかうまくいかない。。。
OSXからよぶと
クラシックが起動するので
System/Library/ScriptingAdditions/URL Access Scripting.app
をあらかじめ起動しておく。
AppleScriptから起動させたいがアクセス権が
ないためダメ
TOPへ