adz89 Posted May 27, 2009 Share Posted May 27, 2009 (edited) Hey guys, I've got a table here:http://www.twstats.com/en25/index.php?page...ilter=abandonedNow my script is way to big to post here, however I get to this page, no problems, but now I want the script to look at the page, then write all the values from the table somewhere, i.e. an ini file or excel spreadsheetAfter I get the data I want script to find the ten highest points (Far right column), and the coordinates of the village (Its Barbarian Village (x|y))Now I'm really struggling with the first part, and the second I have no idea what to do!!At the moment I've got this, (for reading the table):$oIE2 = _IECreate($targetingaddress,0,1) $otargetstable=_IETableGetCollection($oIE2) $atargetsdata=_IETableWriteToArray($otargetstable) IniWriteSection(@ProgramFilesDir & "\ARSoft\TribalwarsAI\targeting.ini","Target Array",$atargetsdata)With the $targetaddress being the link I posted at the top of this question!Please help someone?AdamEDIT: Typo EDIT2: Another Typo :S Edited May 27, 2009 by adz89 Self confessed noob... Link to comment Share on other sites More sharing options...
eignxing Posted May 29, 2009 Share Posted May 29, 2009 Here's a start...it's messy #Include <IE.au3> #Include <Array.au3> $oIE2 = _IECreate("http://www.twstats.com/en25/index.php?page=village_locator&stage=4&source=player&village_coords=500|500&searchstring=adz1989&tribe_id=0&filter=abandoned",0,0) $oTable = _IETableGetCollection ($oIE2, 10) $aTableData = _IETableWriteToArray ($oTable) _IEQuit($oIE2) $inifile = FileOpen(@WorkingDir&"/inifile.ini", 2) $x = 1 Do FileWriteLine($inifile, $aTableData[1][$x]&","&$aTableData[2][$x]&","&$aTableData[3][$x]&","&$aTableData[4][$x]&","&$aTableData[5][$x]&","&$aTableData[6][$x]&","&$aTableData[7][$x]&","&$aTableData[8][$x]) $x = $x + 1 Until $x = UBound($aTableData, 2) Dim $TP_array[UBound($aTableData, 2)] $x = 1 Do $TP_array[$x] = $aTableData[8][$x] $x = $x + 1 Until $x = UBound($aTableData, 2) _ArraySort($TP_array, 1) _ArrayDisplay($TP_array) FileClose($inifile) Link to comment Share on other sites More sharing options...
adz89 Posted June 10, 2009 Author Share Posted June 10, 2009 I tried that but I'm not sure what number it's taken and put in the array, I need to columns one with a x value and one with a y value, Its an awkward one this, thanks for your help so far, its given me a base to start experimenting Self confessed noob... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now