deviprasad Posted March 30, 2015 Share Posted March 30, 2015 Hi All, i have a table object and there few rows and columns, i would like to click on a table row. please let me know how i can do that here is te html stucture and the highlighted one is the row.Please refer the attachment. Link to comment Share on other sites More sharing options...
deviprasad Posted March 30, 2015 Author Share Posted March 30, 2015 pleasre refer the attchment Link to comment Share on other sites More sharing options...
water Posted March 30, 2015 Share Posted March 30, 2015 Haven't tried it myself but if you use Microsofts Internet Explorer I think it should be possible using the IE UDF that comes with AutoIt. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
deviprasad Posted March 30, 2015 Author Share Posted March 30, 2015 ok , may i know the respective functions to make it work?yes this is Microsofts explorer. Link to comment Share on other sites More sharing options...
MikahS Posted March 30, 2015 Share Posted March 30, 2015 (edited) This should help you out: _IETableGetCollection() Click on the function and it will take you to the help file with 2 examples. Edited March 30, 2015 by MikahS Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
water Posted March 30, 2015 Share Posted March 30, 2015 Depends on what you want to do with the table. But I would have a look at _IETableGetCollection and _IETableWriteToArray. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
deviprasad Posted March 30, 2015 Author Share Posted March 30, 2015 i triusing below but did not work , following code xzz x10q is the class name of the table but ddi not work it does not have name attribute. it has only below in html <table class="xzz x10q" style="width: 848px; position: relative; table-layout: fixed;" cellSpacing="0" _startRow="0" _rowCount="3" _selState="{}" _totalWidth="630"> Local $TB1 = _IETableGetObjByName($oIE, "xzz x10q") Local $oTable = _IETableGetCollection($TB1, 0) Local $aTableData = _IETableWriteToArray($oTable) _ArrayDisplay($aTableData) Link to comment Share on other sites More sharing options...
Gianni Posted March 30, 2015 Share Posted March 30, 2015 ...you could point to the target table by a number instead of by a name #include <IE.au3> #include <Array.au3> ; open the page Local $oIE = _IECreate("http://yoursite.com") ; target site here ; ; specify by a number which table you want to connect (zero based) Local $oTable = _IETableGetCollection($oIE, 0) ; get the table as specified in second parameter ; ; get data from required table Local $aTableData = _IETableWriteToArray($oTable, 1) ; put the data from web table to array ; _ArrayDisplay($aTableData) Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
deviprasad Posted March 31, 2015 Author Share Posted March 31, 2015 Local $oTable = _IETableGetCollection($oIE, 0) i beive the the second parameter is the index number of the table but how i can find out the index number? i dnot see below a attrivute call ed index <table id="pt1:pt_region1:1:pt1:csf1:sflist_pc1:frmsLstPU::1427705397169" style="position: relative;" cellSpacing="0" cellPadding="0"> Link to comment Share on other sites More sharing options...
jdelaney Posted March 31, 2015 Share Posted March 31, 2015 Use my signature...it will make life so much easier for finding complex DOM objects. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. 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