Enterキーで選択中の作品ページを開きます。
マイナスの文字が化けているかも。33行目のマイナス、78行目の "<!–段落始まり–>" はHTMLコメントです。
gistにもあります https://gist.github.com/skymonsters-Ks/695bf2fb35bd7074413651e96fcf49bd
Enterキーで選択中の作品ページを開きます。
マイナスの文字が化けているかも。33行目のマイナス、78行目の "<!–段落始まり–>" はHTMLコメントです。
gistにもあります https://gist.github.com/skymonsters-Ks/695bf2fb35bd7074413651e96fcf49bd
#include "hspinet.as"#define URL_BASE "http://dev.onionsoft.net/seed/info.ax?id="netinitif stat : dialog "connection error" : end; 年度year = "2017" ; 2012年より前は非対応; 部門category = "n", "s", "d"cate_name = "一般", "HSPTV", "Dish"sdim listBuf, 32000neturl "http://hsp.tv/contest" + year + "/"num_str = "("num_total = 0foreach category : cate_id = cntnum_cate(cate_id) = 0repeat , 1fn = "list_" + category(cate_id) + cnt + ".html"request fnif stat : breaktitle "downloading " + fngosub *downloadLoopgosub *getWorkloopnum_str += strf("%s:%d, ", cate_name(cate_id), num_cate(cate_id))looppoke num_str, strlen(num_str) – 2title strf("作品数:%d %s)", num_total, num_str)objsize 640, 480listbox listid, 0, listBufnotesel listBufonkey gosub *inKeystop*inKeyif lparam >> 30 : returnif wparam == 13 { ; Enternoteget ts, listidgetstr id, ts, 1, ':'exec URL_BASE + int(id), 16}return#deffunc request str _fnnetfileinfo info, _fnif stat {dialog "info error"end}getstr ts, infoif instr(ts, 0, "404") >= 0 {return 1}netrequest_get _fnreturn 0*downloadLoopnetexec resif res < 0 {neterror estrdialog "download error: " + estrend}if res > 0 {netgetv bufreturn}await 50goto *downloadLoop*getWorkpt = instr(buf, 0, "<!–段落始まり–>")repeatt = instr(buf, pt, "<a name=")if (t < 0) : breakpt += tgetstr id, buf, pt + 9, 34 ; "url = URL_BASE + idpt += instr(buf, pt, url)getstr name, buf, pt + strlen(url) + 2, 60 ; <listBuf += strf("#%05d: %s\n", id, name)num_total++num_cate(cate_id)++loopreturn