Jump to content

Imranimi

Active Members
  • Posts

    42
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Imranimi's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Thanks a lot @Subz, i got my requirement in your recent shared script. Cheeeeers....
  2. yes, the results are same.... showing 908-items in array but actually they are half to this number (454-items) as in array they are coming in duplicate because the <a> & <img> links share before. How can i bypass or filter 1st-array to 3rd then 5th because it will save my time otherwise i have do one task for twice ..... Urgent help needed, thanks....
  3. no, i am modifying it because i need to open the tabs one-by-one after pop-up message as your code is directly opening the tabs in one shot & making my PC & internet too much busy so now i am adding message-box script to give a break in loop.
  4. any further suggestions or idea to differentiate between the above mentioned tags.... ...
  5. ;~ Check to see if next element is an <img...> tag             If $oLink.NextElementSibling.tagName <> "img" Then The above code is not working as per my requirement & it's giving the same previous results..... ... (no change in result)
  6. One & Last thing for this thread, Please provide some hint & help to solve. How can i pick only one link when they are in array, as per guide by @faustf 1. Hypertext-Link 2. Image-Link @Subz your code is also give me the same result. For explanation: The above links are of same product & in _ArrayDisplay() its showing me 2 products. How can i play with only one link. below is the script-line which i am using ARRAY. ... .... ..... $sHtmlpag = _IEBodyReadHTML($oIE) Local $oInputs = _IETagNameGetCollection($oIE, "a") Local $array = StringRegExp($sHtmlpag, "More information", $STR_REGEXPARRAYGLOBALMATCH) _ArrayDisplay($array) ... .... ..... Autoit-Help Forum Guys are very much helpful & loving, they helped me a lot to complete my script (as i am a new bee). Just show me a right way to solve above situation. @Nine @faustf @Subz Thanks a ton, Cheers
  7. I am trying to match & filter my required <a>
  8. Thanks a Ton but results are same for me as its showing url of both <a> & <img> I need to filter one & play with it i am doing r&d & will share the solution soon, if you have any idea just let me know.
  9. @faustf I tried with the below but didn't succeeded Local $array = StringRegExp($sHtmlpag, '<a title="More information" href="(.*?)"> "(.*?)" </a>' $STR_REGEXPARRAYGLOBALMATCH)
  10. @faustf Thanks for your pleasant feedback & pushing me to finish my script with all requirement (Oh thanks for the hidden comments, it really helped me to examine/see my script carefully) Can you give me a hint to filter img-tag in search loop. Really, you had helped me alot to close my script, Thanks a lot
  11. #include <IE.au3> #include <Excel.au3> #include <MsgBoxConstants.au3> #include <StringConstants.au3> #include <Array.au3> #include <ArrayDisplayInternals.au3> #include <InetConstants.au3> #include <WinAPI.au3> #include <WinAPIsysinfoConstants.au3> #include <WindowsConstants.au3> #include <GDIPlus.au3> #include <Misc.au3> #include <Inet.au3> #include <File.au3> #include <Date.au3> #include <Misc.au3> #include <Debug.au3> Local $ProductName Local Const $ie_newtab = 0x0800 Local $arr[30] $oIE = _IECreate("http://repl.flexlink.com/os/products.htm?clicktype=A") _IELoadWait($oIE, 1, 1) $sHtmlpag = _IEBodyReadHTML($oIE) Local $oInputs = _IETagNameGetCollection($oIE, "a") Local $array = StringRegExp($sHtmlpag, "More information", $STR_REGEXPARRAYGLOBALMATCH) MsgBox($MB_SYSTEMMODAL, "Product Name", $array) _ArrayDisplay($array) For $i=0 To UBound ($array) -1 For $oInput In $oInputs if $oInput.title = "More information" then Local $oIELink = $oInputs $oIE.Navigate($oinput.href, $ie_newtab) MsgBox($MB_SYSTEMMODAL, "Product Name", $oinput.href) _IELoadWait($oIE) ExitLoop endif Next MsgBox($MB_SYSTEMMODAL, "Chains and Accessories", $oIELink.title) Send("^w") Sleep(3000) Next Func Terminate() Exit 0 EndFunc ;==>Terminate @faustf, Bundle of thanks for diverting me to on ARRAY, in the above shared code please note that it is showing all the hyperlinks with Title ="More information" collected in the array & only one first array is opening in new tab. after closing the tab the script is terminated and the script next to second-loop is not working. <a title="More information" href="productinfo.htm?orgid=WKTL 150">WKTL 150</a> <img style="vertical-align: middle;" src="images/information38.png"> ----------> this image is also have title = "More Information" Above code is displaying me the both <a> & <img> in array but i need to work only on <a> I need to open & close all the href's one by one (other process for what to do with the opened tabs.... I have already completed that script)
  12. @Subz Thanks, I had already done without array & its working fine but i am having trouble to fetch all the href of web-page & save them in array & open them in new-tab one-by-none.
  13. @faustf, I will automate a login page but my concern is the one which i asked about array as asked before, thanks
  14. @faustf, I need to stick to href.title (which is similar) in all links, i need to store them in array & need to open one-by-one in new-tabs. < #include <IE.au3> #include <Excel.au3> #include <MsgBoxConstants.au3> #include <StringConstants.au3> #include <Array.au3> #include <ArrayDisplayInternals.au3> #include <InetConstants.au3> #include <WinAPI.au3> #include <WinAPIsysinfoConstants.au3> #include <WindowsConstants.au3> #include <GDIPlus.au3> #include <Misc.au3> #include <Inet.au3> #include <File.au3> #include <Date.au3> #include <Misc.au3> #include <Debug.au3> Global $ProductName Global Const $ie_newtab = 0x0800 Global $arr[30] ; open Flexlink Website in Internet Explorer $oIE1 = _IECreate("http://repl.flexlink.com/os/products.htm?clicktype=A") _IELoadWait($oIE1, 1, 1) $sHtmlpag = _IEBodyReadHTML($oIE1) Global $oInputs = _IETagNameGetCollection($oIE1, "a") Global $array = StringRegExp($oInputs, "More information", $STR_REGEXPARRAYGLOBALFULLMATCH) _ArrayDisplay($array) For $oInput In $oInputs if $oInput.title = "More information" then Global $oIELink = $oInput ExitLoop endif Next MsgBox($MB_SYSTEMMODAL, "Product Name", $oIELink.href) Global $oIE2 = _IECreateTab ($oIE1, $oIELink.href) Func _IECreateTab (ByRef $oIE, $url) Local $Count = 0, $oIE2 $oIE.Navigate ($url, $ie_newtab) $oIE2 = _IEAttach($url, "url") _IELoadWait ($oIE2, 300) return $oIE2 EndFunc Send("#{LEFT}", 0) ;Send("{enter}") MsgBox($MB_SYSTEMMODAL, "Chains and Accessories", $oIELink.title) Sleep(4000) Send("^w") Sleep(3000) Func Terminate() Exit 0 EndFunc > The above is not working for me
  15. @faustf Thanks but the above example is too much complicated can you simplify it with Autoit-Website using href in array & share please
×
×
  • Create New...