を組んでおりまして、netfileinfoの速度が遅いので取得する度に画面が固まって困ってます。
wininet.dllのInternetOpenUrl関数でサイズを取得するプログラムを組んでみましたが
それよりもnetfileinfoの方が早かったので、これ以上早くならないのかな?とも感じてたり
します。
>↑のInternetOpenUrlでサイズを取得するプログラムは
> http://hsptv.sakura.ne.jp/play/pforum.php?mode=pastwch&num=88998
> こちらを使わせていただきました、、、が速度出ず。
そこで、サンプルスクリプトを作って見ました。
下記のコードはhttps://www.onionsoft.net/hsp/v36/doclib/hsp3ttl.jpgのファイルサイズを
10回取得します。それをまた10回取得し、平均の処理速度を出してます。
これ以上早い方法があれば教えてほしいです。
よろしくお願いします。
#include "hspinet.as" #uselib "Wininet" #func DeleteUrlCacheEntryA "DeleteUrlCacheEntryA" str #func DeleteUrlCacheEntryW "DeleteUrlCacheEntryW" wstr #define DeleteUrlCacheEntry DeleteUrlCacheEntryA #uselib "winmm.dll" #cfunc global timeGetTime "timeGetTime" Goukei = 0 repeat 10,1 開始時間=timegettime() repeat 10 await 10 DeleteUrlCacheEntry "https://www.onionsoft.net/hsp/v36/doclib/hsp3ttl.jpg" netterm netinit neturl "https://www.onionsoft.net/hsp/v36/doclib/" netfileinfo net_file_info, "hsp3ttl.jpg" if stat ! 0 : mes "取得失敗" : stop if instr(net_file_info,,"404") ! -1 : mes "取得失敗" : stop if instr(net_file_info,,"403") ! -1 : mes "取得失敗" : stop net_file_info = getpath( net_file_info, 16 ) index = instr( net_file_info, 0, "last-modified: " ) if ( index != -1 ) { sdim writedate, 800 getstr writedate, net_file_info, index + strlen( "last-modified:" ) } //mes writedate loop Goukei = Goukei+(timegettime()-開始時間) mes ""+cnt+"回目 : "+(timegettime()-開始時間)+"ms" loop mes "平均取得時間 : " + Goukei/10+"ms"