なんとなく作ってみた。10分ぐらい。The 手抜き。 http://hsp.tv/play/pforum.php?mode=all&num=53943
なんとなく作ってみた。10分ぐらい。The 手抜き。 http://hsp.tv/play/pforum.php?mode=all&num=53943
#uselib "urlmon.dll"
#func URLDownload "URLDownloadToFileA"int,str,str,int,int
axobj ie, "Shell.Explorer.2", 0, 0
ie->"Navigate" "http://www.bing.com/"
repeat
wait 1
if ie("Busy") == 0 : break
loop
pDoc = ie("Document")
repeat
wait 1
if pDoc("readyState") == "complete" : break
loop
comres pDiv
pDoc->"getElementById" "bgDiv"
if varuse(pDiv) == 0 : dialog "仕様変更?" : end
// 手抜き(無限ループする可能性あり)
*check
pStyle = pDiv("style")
url = pStyle("background-image")
if url == "" {
wait 10
goto *check
}
// ぽいっとな
delcom pStyle
delcom pDiv
delcom pDoc
delcom ie
// 手抜き文字列除去
url = strtrim(url, 0, 'u')
url = strtrim(url, 0, 'r')
url = strtrim(url, 0, 'l')
url = strtrim(url, 0, '(')
url = strtrim(url, 0, ')')
dialog url
// ダウンロードして表示してみる
exist "tmp.jpg"
if strsize != -1 : delete "tmp.jpg"
URLDownload 0, url, "tmp.jpg", 0, 0
exist "tmp.jpg"
if strsize == -1{
dialog "仕様変更?" : end
}else{
cls
picload "tmp.jpg"
}