Jump to content

Recommended Posts

Posted (edited)

hi guy  

i have  a  questions 

suppose  we  have  a  web page  with  multiplay  button  

the  button  have  this  syntax  in page 

<div class="bottoniFissi text-left">
                    <a title="Scheda Prodotto" href="/b2b/Schede?idArticolo=AAS201SI&amp;opportunitaCash=False" class="tip btn btn-mini btn-quadrato btn-espriRosso gradient" rel="tooltip">
                        <img title="Scheda Prodotto" alt="Scheda Prodotto" src="/b2b/Content/images/ico-scheda.png"></a>


<div class="bottoniFissi text-left">
                    <a title="Scheda Prodotto" href="/b2b/Schede?idArticolo=A-10-K&amp;opportunitaCash=False" class="tip btn btn-mini btn-quadrato btn-espriRosso gradient" rel="tooltip">
                        <img title="Scheda Prodotto" alt="Scheda Prodotto" src="/b2b/Content/images/ico-scheda.png"></a>


etc.....

i want open  the  first time a page  and  click  in first  button  (and  this is a simple  a just do it ),  but  i want   go back  (and  just do it )  but  want  chose  the  second  time a second  button , how  could  do it ?? 

this is  a part of my code 

_IEImgClick($oIE, "Scheda Prodotto", "alt")

        Sleep(4000)
     Local $sText_DCP = _IEBodyReadText($oIE)
                                            
     Local $aArray_Descrizione_completa_prodotti = StringRegExp($sText_DCP, '(?is)  Altre opzioni...(.*?) Vendi  di opzioni', $STR_REGEXPARRAYGLOBALMATCH )

        For $i_DcP = 0 To UBound($aArray_Descrizione_completa_prodotti) - 1
        
                MsgBox($MB_SYSTEMMODAL, "descrizione completa prodotto " & $i_DcP, $aArray_Descrizione_completa_prodotti[$i_DcP])
                    $file = FileOpen("descrizione_completa.txt", 1)
                FileWrite($file,  $aArray_Descrizione_completa_prodotti[$i_DcP])
                FileClose($file)

                        _IEAction($oIE,"back")
                                                                                        
        Next
Edited by faustf
  • Moderators
Posted

Global $giCount = 0
While 1
    _IEImgClick($oIE, "title", "alt", $giCount)
    If @error Then ExitLoop
    
    Sleep(1000)
    _IELoadWait($oIE)
    
    ; stuff here
    ; etc
    ; etc
    ; etc
    ; etc
    
    $giCount += 1
WEnd

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...