64行目で「配列の要素が無効です」というエラーが出たり出なかったりして原因が分からず困っております。
実行するたびにランダム(?)にエラーが出るか出ないか決まるようなのですがこんなことってあるんでしょうか・・・
waitが短いほどエラーが起きる確率が上がる気がします。
ちなみにChromeの拡張機能をあれこれするツールの作りかけです。(今は情報の表示のみ)
buffer 1,128,128 screen 0,800,600 *go1 local_dir=dirinfo($1001C):buf="":extlist="":in_dir="":out_dir="":tmp_dir="":index_=-1:index3_=-1 chdir local_dir:dirlist folders,"*.*",5 notesel folders repeat notemax noteget get,cnt if get="Google"|get="Chromium"|get="Kinza"{ if get="Google"{ tmp_dir+local_dir+"\\"+get+"\\Chrome\\User Data\\Default\\Extensions\n" } else{ tmp_dir+local_dir+"\\"+get+"\\User Data\\Default\\Extensions\n" } } loop if tmp_dir="":index_=0:index3_=0:else: *go2 notesel tmp_dir:notedel notemax repeat notemax noteget get,cnt dirlist x,get,5:if stat=0:notedel cnt loop *go3 objsize 800,24:objmode 2:font"MS Gothic",13 pos 0,65:listbox index,40,tmp_dir pos 0,195:listbox index3,140,extlist font"meiryo",17,1 pos 5,10:mes"拡張機能の保存フォルダ" font"meiryo",13 pos 5,40:mes ""+notemax+"個のExtensionsフォルダが見つかりました。" font"meiryo",17,1 pos 5,140:mes"拡張機能" *main if index!index_{ index3_=-1:index3=0:extlist="" noteget in_dir,index chdir in_dir:dirlist folders,"*.*",5:notesel folders:extmax=notemax font"meiryo",12 color 255,255,255:boxf 0,170,800,195:color:pos 5,170:mes ""+extmax+"個の拡張機能が見つかりました。" repeat extmax notesel folders:noteget get,cnt:id(cnt)=get:chdir in_dir+"\\"+get dirlist folders2,"*.*",5:notesel folders2:noteget get,0:id2(cnt)=get:chdir in_dir+"\\"+id(cnt)+"\\"+get exist"manifest.json":if strsize!-1:notesel buf:noteload "manifest.json" index2=instr(buf,0,"\"name\": "):if index2!-1:get=strmid(buf,index2+9,100):index2=instr(get,0,"\""):get2=strmid(get,index2,200):strrep get,get2,"":strrep get,"\n","":name(cnt)=get:else:name(cnt)="不明" index2=instr(buf,0,"\"128\": \"") if index2!-1{ get=strmid(buf,index2+8,200):index2=instr(get,0,"\""):get2=strmid(get,index2,200):strrep get,get2,"":icon(cnt)=get } else{ index2=instr(buf,0,"\"default_icon\": \""):if index2!-1:get=strmid(buf,index2+17,200):index2=instr(get,0,"\""):get2=strmid(get,index2,200):strrep get,get2,"":icon(cnt)=get:else:icon(cnt)="" } extlist+"フォルダ "+id(cnt)+" 名前 "+name(cnt)+"\n" await 0 loop objprm 1,extlist } if index3!index3_{ dir=in_dir+"\\"+id(index3)+"\\"+id2(index3) dirlist x,dir,5 if stat=1:chdir dir exist"manifest.json":if strsize!-1:notesel buf:noteload "manifest.json" exist icon(index3):if strsize!-1:gsel 1:picload icon(index3):size=ginfo_sx:gsel 0:pos 5,400:gcopy 1,0,0,size,size } index_=index:index3_=index3 wait 20 goto*main
Chrome使ってる人しか使えないです。いろいろ中途半端で雑で申し訳ないです。