Basically i made a script for scraping the api that http://www.guildwarstrade.com/ has made public, but it does so at such a low rate for the moment. Do anyone see a way to speed up this script?
[ autoit ]
#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ;GWT data retreiver --> % profit #include #include #include ;Temp[1] = Sell ;Temp[2] = Update ;$temp[3] = Buy ;Startup $oExcel = _ExcelBookNew() _ExcelWriteCell($oExcel,"Av Nikolas", 1,1) _ExcelWriteCell($oExcel,"Bruker data mellom 68 og 31165 som id",2,1) $url_Stub = "http://www.guildwarstrade.com/api/public/item?id=" $row_offset = 4-68 global $temp[10] main() func main() ;31165 for $i = 68 to 31165 step 1 retriver($i) next EndFunc func retriver($id) $string = InetRead($url_Stub & $id) $string = BinaryToString($string) if $string = "{}" Then $row_offset = $row_offset - 1 Return EndIf $string = StringTrimRight($string,1) $string = StringTrimLeft($string,1) $temp = StringSplit($string,",") $temp[1] = StringTrimLeft($temp[1],8) $temp[3] = StringTrimLeft($temp[3],7) Write($id,$temp) EndFunc func Write($id, $array) _ExcelWriteCell($oExcel,$id,1,4) _ExcelWriteCell($oExcel,$id,$row_offset + $id,1) _ExcelWriteCell($oExcel,$temp[1],$row_offset + $id,2) ;_ExcelWriteCell($oExcel,$temp[2],$row_offset + $id,3) _ExcelWriteCell($oExcel,$temp[3],$row_offset + $id,3) $profit = $temp[1]*0.85-$temp[3] _ExcelWriteCell($oExcel,$profit,$row_offset + $id,6) if $temp[3] = 0 Then _ExcelWriteCell($oExcel,0,$row_offset + $id,7) Return EndIf $up_p = $temp[1]*0.85-$temp[3] $dn_p = $temp[1] $profitpercent = round((Round($up_p)/($dn_p)*100),1) _ExcelWriteCell($oExcel,$profitpercent,$row_offset + $id,7) EndFunc