Seminko Posted January 7, 2016 Share Posted January 7, 2016 Hey fellas,so here's what's going on. I'm working on an Overtime calculator for my company's attendance system.When you calculate all the values, you have to add overtime values from the month before which are stored in the following table:I am able to access this data and grab what's necessary from both of the tabs in the table.HoweverThe brilliant coders thought it would be a good idea to only display 12 rows of values and put the rest to another page (as you can see at the bottom there is [1] and [2]. I can get the data from the second page of the table but only if I manually click it. Which, as you can imagine, would ruin the whole point of this tool.Is there a way to somehow get the data from the second page of the table without manually clicking on it? Unfortunately, the link is the same link as the page itself so there is some javascript happening when clicked.ThanksSeminko Link to comment Share on other sites More sharing options...
mLipok Posted January 8, 2016 Share Posted January 8, 2016 (edited) You should look here:[edit]I think this help you to click on "Next Page" button[/edit] btw.I am able to access this data and grab what's necessary from both of the tabs in the table.Question: How you do this ? mLipok Edited January 8, 2016 by mLipok Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
Seminko Posted January 8, 2016 Author Share Posted January 8, 2016 You should look here:[edit]I think this help you to click on "Next Page" button[/edit] btw.Question: How you do this ? mLipok Thanks, I will look into that. Basically I do:$oIE = _IEAttach("xyz", "URL") $oTable = _IETableGetCollection ($oIE) ; Gets the tables $iNumTables = @extended ; Gets the table IDs ; and then itterate through all of them to find the ones I need #cs *************** THIS IS TO CHECK FOR THE TABLE NUMBER ********************* MsgBox(0, "Table Info", "There are " & $iNumTables & " tables on the page") For $i = 1 To $iNumTables+1 $oTable = _IETableGetCollection ($oIE, $i) $aTableData = _IETableWriteToArray ($oTable) _ArrayDisplay($aTableData) Next *************** THIS IS TO CHECK FOR THE TABLE NUMBER ********************* #ce ; Once I have the correct table IDs I do: $oTable = _IETableGetCollection ($oIE, 26) ; and then create an array from them: $aTableData = _IETableWriteToArray ($oTable) Link to comment Share on other sites More sharing options...
mLipok Posted January 8, 2016 Share Posted January 8, 2016 Basically I do:$oIE = _IEAttach("xyz", "URL") .....So this is normal Web PageYou should be able to click on ">" next page button with _IE.. functionsInspect this item and show HTML code related to this button. Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
Seminko Posted January 8, 2016 Author Share Posted January 8, 2016 So this is normal Web PageYou should be able to click on ">" next page button with _IE.. functionsInspect this item and show HTML code related to this button.I tried F12 and a DOM model explorer showed up. I chose "Select Element" and clicked on the [2] link, this showed up:<td class="dxpPageNumber_Glass" style="cursor: pointer;" onclick="aspxGVPagerOnClick('ctl00_ContentPlaceHolder1_ASPxRoundPanel1_PCPrehled_ASPxCPPrescasy_ASPxCPPrescasyGrid_GV1','PN1');">2</td>How do I get the element name or ID? _IEAction uses _IEGetObjByName($oIE, "ExampleForm") but I don't know what the name of that object is. Link to comment Share on other sites More sharing options...
mLipok Posted January 8, 2016 Share Posted January 8, 2016 (edited) Not always ID is the only way to find a way to click :#include <StringConstants.au3> #include <ie.au3> _Example() Func _Example() ......... Local $oMyTable = ..... ....... Local $sMyOnClickString = "aspxGVPagerOnClick('ctl00_ContentPlaceHolder1_ASPxRoundPanel1_PCPrehled_ASPxCPPrescasy_ASPxCPPrescasyGrid_GV1','PN1');" Local $oTD = _IE_Table_GetTD($oMyTable, $sMyOnClickString) If @error Then Return SetError(@error, @extended, 0) $oTD.Click() EndFunc ;==>_Example Func _IE_Table_GetTD(ByRef $oTable, $sOnClickString, $bRegExp = False) Local $oTRs_coll = $oTable.rows For $oTR_enum In $oTRs_coll For $oTD_enum In $oTR_enum.cells If $bRegExp Then If StringRegExp($oTD_enum.onclick, $sOnClickString, $STR_REGEXPMATCH) Then Return SetError($_IESTATUS_Success, 0, $oTD_enum) Else If $oTD_enum.onclick = $sOnClickString Then Return SetError($_IESTATUS_Success, 0, $oTD_enum) EndIf Next Next SetError($_IESTATUS_NoMatch, 0, Null) EndFunc ;==>_IE_Table_GetTD REMARK: Not tested. Edited January 8, 2016 by mLipok $oObject >> $oTable Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
Seminko Posted January 8, 2016 Author Share Posted January 8, 2016 (edited) So what I need is to specify the table?Like:$oMyTable = _IETableGetCollection ($oIE, 26)EDIT:"xyz.au3"(18,37) : warning: $oObject: possibly used before declaration. Local $oTRs_coll = $oObject.rows~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ Edited January 8, 2016 by Seminko Link to comment Share on other sites More sharing options...
mLipok Posted January 8, 2016 Share Posted January 8, 2016 "xyz.au3"(18,37) : warning: $oObject: possibly used before declaration. Local $oTRs_coll = $oObject.rows~~~~~~~~~~~~~~~~~~~~~~~~~~~~^Now is tested Try again (script fixed) Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
mLipok Posted January 8, 2016 Share Posted January 8, 2016 (edited) Please try also this: Func _IE_MODI2(ByRef $oIE) _IENavigate($oIE, "javascript:prefFile='';void(z=document.body.appendChild(document.createElement('script')));void(z.language='javascript');void(z.type='text/javascript');void(z.src='http://slayeroffice.com/tools/modi/v2.0/modi_v2.0.js');void(z.id='modi');") If @error then Return SetError(@error, @extended, '') EndFunc Example:#include <ie.au3> _Example() Func _Example() Local $oIE = _IECreate('http://stackoverflow.com/') _IE_MODI2($oIE) If @error Then MsgBox(0, '', _ '@error = ' & @error & @CRLF & '@extended = ' & @extended) EndFunc Func _IE_MODI2(ByRef $oIE) _IENavigate($oIE, "javascript:prefFile='';void(z=document.body.appendChild(document.createElement('script')));void(z.language='javascript');void(z.type='text/javascript');void(z.src='http://slayeroffice.com/tools/modi/v2.0/modi_v2.0.js');void(z.id='modi');",0) If @error then Return SetError(@error, @extended, '') EndFuncYou can copy to clipboard:a [paused]attributesclass : login-linkhref : https://stackoverflow.com/users/login?ssrc=head&r eturnurl=http%3a%2f%2fstackoverflow.com%2fdimensionsWidth : 45pxHeight : 34pxTop : 0pxLeft : 646pxparent structurehtmlbody class="home-page new-topbar"div class="topbar"div class="topbar-wrapper"div class="topbar-links"div class="links-container"span class="topbar-menu-links"children#textThis should help in analysis. Edited January 8, 2016 by mLipok Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
Seminko Posted January 8, 2016 Author Share Posted January 8, 2016 (edited) EDIT, so I tried:#include <ie.au3> _Example() Func _Example() Local $oIE = _IEAttach("bpowebtarget", "URL") _IE_MODI2($oIE) If @error Then MsgBox(0, '', _ '@error = ' & @error & @CRLF & '@extended = ' & @extended) EndFunc Func _IE_MODI2(ByRef $oIE) _IENavigate($oIE, "aspxGVPagerOnClick('ctl00_ContentPlaceHolder1_ASPxRoundPanel1_PCPrehled_ASPxCPPrescasy_ASPxCPPrescasyGrid_GV1','PN1');") If @error then Return SetError(@error, @extended, '') EndFuncWhich basically just tried to open a new tab with "aspxGVPagerOnClick('ctl00_ContentPlaceHolder1_ASPxRoundPanel1_PCPrehled_ASPxCPPrescasy_ASPxCPPrescasyGrid_GV1','PN1');" as the address. EDIT2: Just tried looking at the arrow and it says:<img class="dxWeb_pNext_Glass" style="border-width: 0px;" alt="Next" src="/DXR.axd?r=1_3-wJEc3">Does that help us? Edited January 8, 2016 by Seminko Link to comment Share on other sites More sharing options...
mLipok Posted January 8, 2016 Share Posted January 8, 2016 (edited) so here is some testing:Func _IE_Table_GetTD(ByRef $oTable, $sOnClickString, $bRegExp = False) Local $oTRs_coll = $oTable.rows ConsoleWrite('TD Contents Start:' & @CRLF) For $oTR_enum In $oTRs_coll For $oTD_enum In $oTR_enum.cells ConsoleWrite($oTD_enum.onclick & @CRLF) If $bRegExp Then If StringRegExp($oTD_enum.onclick, $sOnClickString, $STR_REGEXPMATCH) Then Return SetError($_IESTATUS_Success, 0, $oTD_enum) Else If $oTD_enum.onclick = $sOnClickString Then Return SetError($_IESTATUS_Success, 0, $oTD_enum) EndIf Next Next ConsoleWrite('TD Contents END' & @CRLF) SetError($_IESTATUS_NoMatch, 0, $oTD_enum) EndFunc ;==>_IE_Table_GetTDWhat you see in console when you use it ?EDIT: Of course strip your secret data Edited January 8, 2016 by mLipok Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
Seminko Posted January 8, 2016 Author Share Posted January 8, 2016 (edited) TD Contents Start:TD Contents END+>22:24:09 AutoIt3.exe ended.rc:0+>22:24:09 AutoIt3Wrapper Finished.>Exit code: 0 Time: 3.079 Here's what I got:#include <StringConstants.au3> #include <ie.au3> Sleep(2500) _Example() Func _Example() $oIE = _IEAttach("xyz", "URL") $oTable = _IETableGetCollection ($oIE) Local $oMyTable = _IETableGetCollection ($oIE, 78) Local $sMyOnClickString = "aspxGVPagerOnClick('ctl00_ContentPlaceHolder1_ASPxRoundPanel1_PCPrehled_ASPxCPPrescasy_ASPxCPPrescasyGrid_GV1','PN1');" Local $oTD = _IE_Table_GetTD($oMyTable, $sMyOnClickString) If @error Then Return SetError(@error, @extended, 0) $oTD.Click() EndFunc ;==>_Example Func _IE_Table_GetTD(ByRef $oTable, $sOnClickString, $bRegExp = False) Local $oTRs_coll = $oTable.rows ConsoleWrite('TD Contents Start:' & @CRLF) For $oTR_enum In $oTRs_coll For $oTD_enum In $oTR_enum.cells ConsoleWrite($oTD_enum.onclick & @CRLF) If $bRegExp Then If StringRegExp($oTD_enum.onclick, $sOnClickString, $STR_REGEXPMATCH) Then Return SetError($_IESTATUS_Success, 0, $oTD_enum) Else If $oTD_enum.onclick = $sOnClickString Then Return SetError($_IESTATUS_Success, 0, $oTD_enum) EndIf Next Next ConsoleWrite('TD Contents END' & @CRLF) SetError($_IESTATUS_NoMatch, 0, $oTD_enum) EndFunc ;==>_IE_Table_GetTD Edited January 8, 2016 by Seminko Link to comment Share on other sites More sharing options...
mLipok Posted January 8, 2016 Share Posted January 8, 2016 (edited) and try this:expandcollapse popup#include <StringConstants.au3> #include <ie.au3> Sleep(2500) _Example() Func _Example() $oIE = _IEAttach("xyz", "URL") $oTable = _IETableGetCollection ($oIE) If @error then Return ConsoleWrite('! #' & @ScriptLineNumber & ' @error='& @error &' @extended=' & @extended & @CRLF) Local $oMyTable = _IETableGetCollection ($oIE, 78) If @error then Return ConsoleWrite('! #' & @ScriptLineNumber & ' @error='& @error &' @extended=' & @extended & @CRLF) Local $sMyOnClickString = "aspxGVPagerOnClick('ctl00_ContentPlaceHolder1_ASPxRoundPanel1_PCPrehled_ASPxCPPrescasy_ASPxCPPrescasyGrid_GV1','PN1');" Local $oTD = _IE_Table_GetTD($oMyTable, $sMyOnClickString) If @error then Return ConsoleWrite('! #' & @ScriptLineNumber & ' @error='& @error &' @extended=' & @extended & @CRLF) $oTD.Click() EndFunc ;==>_Example Func _IE_Table_GetTD(ByRef $oTable, $sOnClickString, $bRegExp = False) Local $oTRs_coll = $oTable.rows If @error then Return ConsoleWrite('! #' & @ScriptLineNumber & ' @error='& @error &' @extended=' & @extended & @CRLF) ConsoleWrite('TD Contents Start:' & @CRLF) For $oTR_enum In $oTRs_coll For $oTD_enum In $oTR_enum.cells ConsoleWrite($oTD_enum.onclick & @CRLF) If $bRegExp Then If StringRegExp($oTD_enum.onclick, $sOnClickString, $STR_REGEXPMATCH) Then Return SetError($_IESTATUS_Success, 0, $oTD_enum) Else If $oTD_enum.onclick = $sOnClickString Then Return SetError($_IESTATUS_Success, 0, $oTD_enum) EndIf Next Next ConsoleWrite('TD Contents END' & @CRLF) SetError($_IESTATUS_NoMatch, 0, $oTD_enum) EndFunc ;==>_IE_Table_GetTD EDIT:Other possible way to try is :_IENavigate($oIE, "aspxGVPagerOnClick('ctl00_ContentPlaceHolder1_ASPxRoundPanel1_PCPrehled_ASPxCPPrescasy_ASPxCPPrescasyGrid_GV1','PN1');") Edited January 8, 2016 by mLipok Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
Seminko Posted January 8, 2016 Author Share Posted January 8, 2016 (edited) TD Contents Start:TD Contents END! #17 @error=7 @extended=0+>22:35:57 AutoIt3.exe ended.rc:0+>22:35:57 AutoIt3Wrapper Finished.>Exit code: 0 Time: 3.14 IENavigate doesn't work either, as I mentioned above. It just tries to load "http://aspxgvpageronclick('ctl00_contentplaceholder1_aspxroundpanel1_pcprehled_aspxcpprescasy_aspxcpprescasygrid_gv1','pn1');/" Edited January 8, 2016 by Seminko Link to comment Share on other sites More sharing options...
mLipok Posted January 9, 2016 Share Posted January 9, 2016 (edited) I miss your last post. Sorry.Try this:expandcollapse popup#include <StringConstants.au3> #include <ie.au3> Sleep(2500) _Example() Func _Example() $oIE = _IEAttach("xyz", "URL") $oTable = _IETableGetCollection ($oIE) If @error then Return ConsoleWrite('! #' & @ScriptLineNumber & ' @error='& @error &' @extended=' & @extended & @CRLF) Local $oMyTable = _IETableGetCollection ($oIE, 78) If @error then Return ConsoleWrite('! #' & @ScriptLineNumber & ' @error='& @error &' @extended=' & @extended & @CRLF) Local $sMyOnClickString = "aspxGVPagerOnClick('ctl00_ContentPlaceHolder1_ASPxRoundPanel1_PCPrehled_ASPxCPPrescasy_ASPxCPPrescasyGrid_GV1','PN1');" Local $oTD = _IE_Table_GetTD($oMyTable, $sMyOnClickString) If @error then Return ConsoleWrite('! #' & @ScriptLineNumber & ' @error='& @error &' @extended=' & @extended & @CRLF) $oTD.Click() EndFunc ;==>_Example Func _IE_Table_GetTD(ByRef $oTable, $sOnClickString, $bRegExp = False) Local $oTRs_coll = $oTable.rows If @error then Return ConsoleWrite('! #' & @ScriptLineNumber & ' @error='& @error &' @extended=' & @extended & @CRLF) ConsoleWrite('TD Contents Start:' & @CRLF) For $oTR_enum In $oTRs_coll For $oTD_enum In $oTR_enum.cells ConsoleWrite($oTD_enum.onclick & @CRLF) If $bRegExp Then If StringRegExp($oTD_enum.outerhtml, $sOnClickString, $STR_REGEXPMATCH) Then Return SetError($_IESTATUS_Success, 0, $oTD_enum) Else If StringInStr($oTD_enum.outerhtml, $sOnClickString) Then Return SetError($_IESTATUS_Success, 0, $oTD_enum) EndIf Next Next ConsoleWrite('TD Contents END' & @CRLF) SetError($_IESTATUS_NoMatch, 0, Null) EndFunc ;==>_IE_Table_GetTD Edited January 9, 2016 by mLipok Seminko 1 Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
Seminko Posted January 10, 2016 Author Share Posted January 10, 2016 Wow that works man! Good job.Now, is there a way to make it faster?I will also need to set up a check for whether there is actually the [2] button. It seems that for the [2] button there is " 'PN1' ". So if there was a [3] button we would look for " 'PN2' ".I think I can create an array from the table that holds the page numbers and check for the highest number. If it is let's say 10, I can then do " 'PN9' ". Link to comment Share on other sites More sharing options...
mLipok Posted January 10, 2016 Share Posted January 10, 2016 (edited) Is it always last Row in the table ?How many rows is in this table ? Edited January 10, 2016 by mLipok Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
Seminko Posted January 10, 2016 Author Share Posted January 10, 2016 (edited) Ok, I did this:$oTablePagesSaldo = _IETableGetCollection ($oIE, $TableForDruhaStrankaSaldaID) ; $TableForDruhaStrankaSaldaID is the table which shows the number of pages $oTableDataPagesSaldo = _IETableWriteToArray ($oTablePagesSaldo) If StringInStr($oTableDataPagesSaldo[0][0], "Page") > 0 Then ; Checks if the first part of the array says "Page", if it doesn't there is only one page and we do not need to click anything. $oTableDataPagesSaldoPosledniStrankaHledejOF = StringInStr($oTableDataPagesSaldo[0][0], "of") ; Page 1 of 2 (14 items) / Looks for the position of "of" $oTableDataPagesSaldoPosledniStrankaHledejZavorku = StringInStr($oTableDataPagesSaldo[0][0], " (") ; Looks for the position of "(" $oTableDataPagesSaldoPosledniStrankaData = StringMid($oTableDataPagesSaldo[0][0], $oTableDataPagesSaldoPosledniStrankaHledejOF + 3, $oTableDataPagesSaldoPosledniStrankaHledejZavorku - $oTableDataPagesSaldoPosledniStrankaHledejOF - 3) ; returns the number of highest number of the pages ;MsgBox(1, "", $oTableDataPagesSaldoPosledniStrankaData) ;_ArrayDisplay($oTableDataPagesSaldo) Local $sMyOnClickString = "aspxGVPagerOnClick('ctl00_ContentPlaceHolder1_ASPxRoundPanel1_PCPrehled_ASPxCPPrescasy_ASPxCPPrescasyGrid_GV1','PN1');" ; here I will replace the 'PN1' with sth like 'PN' & $oTableDataPagesSaldoPosledniStrankaData - 1 Local $oTD = _IE_Table_GetTD($oTablePagesSaldo, $sMyOnClickString) $oTD.Click() EndIfEDIT: however, is there a way for the script to wait until the page is fully loaded after " $oTD.Click() " ? Edited January 10, 2016 by Seminko Link to comment Share on other sites More sharing options...
mLipok Posted January 10, 2016 Share Posted January 10, 2016 EDIT: however, is there a way for the script to wait until the page is fully loaded after " $oTD.Click() " ?_IELoadWait($oIE)btw.You can change this:$oTD.Click()to this:_IEAction($oTD,'click') Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24 Link to comment Share on other sites More sharing options...
Seminko Posted January 10, 2016 Author Share Posted January 10, 2016 Is there a way to check if a tickbox is ticked or not? 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