Sign in to follow this  
Followers 0
Maximus1

reading numbers from a website won`t work as aspected

4 posts in this topic

i`m writing a tool which checks prices on a website and post them back to the website.

my problem is it won`t work.

when there is only one price i get errors and i don`t know how to handle it.

the array tells me at [0] a number and at [1] a text.

how do i get it fixed? i`ve screwed my code up.

WinSetTitle ( "childgui","", "preis_sku" )
;~          preis eingabe
$pleft1='EUR'
$pright1=","

$pleft2= $gebpreis &","
$pright2="</strong>"

$skueingleft = "Geben Sie eine"
$skueingright = ", um dieses Produkt"
$skupruef = "Händler-SKU ein"

Dim $source3[1]
$source3[0] = ""

;~ preis auslesen

;~ vorkomma
_IELoadWait ($oIE)
$sText = _IEBodyReadText ($oIE)
;~ $sText = StringReplace ( $sText, @LF, "" )  
;~ $sText = StringReplace ( $sText, @CR, "" )  
;~ $sText = StringReplace ( $sText, @CRLF, "" )

$source1 = _StringBetween($sText, $pleft1,$pright1)
If Not @error Then
    _ArrayDisplay($source1,"vorkomma")
Else
    MsgBox(0,"vorkomma","fehler")
EndIf


;~ i think here must be some code to validate if [1] is text or int and discard if it is text

If Not @error Then
    If int($source1[1]) < int($source1[0]) Then                                             ;sometimes 
        $gebpreis = int($source1[1])
    Else
        $gebpreis = int($source1[0])
    EndIf
EndIf
MsgBox(0,"gebpreis",""& $gebpreis)                                                          ;gives 0 when [1] is not a number.   how do i ?????
    

;~ nachkomma


$source2 = _StringBetween($sText, $pleft2,$pright2)
_ArrayDisplay($source2,"nachkomma")                                                             ;entfernen
MsgBox(0,"nachkomma",""& $source2[0])                                                           ;entfernen
If @error Then
    $end = InputBox("preiseingabe","Bitte den gewünschten Preis eingeben")
Else
;~ preisabzug
    $w = Int($source2[0])
    If Int($source2[0]) ==Int(00) Then                                          ;vorkomma und nachkomma
        $gebpreis = $gebpreis -1                                                ;dann vorkomma -1
        $w =Int(99)                                                             ;und nachkomma 99
    EndIf
    $end = $gebpreis &',' & $w
EndIf

;~ übergabe des preises
Send("{TAB 2}")
Send("" & $end)
Sleep(500)


;~ SKU eingabe
$sText = _IEBodyReadText ($oIE)
$source3 = _StringBetween($sText, $skueingleft,$skueingright)
If @error Then
    Send("{ENTER}")
Else
    Send("{TAB 3}")
    send(""& $sku)
    Send("{ENTER}")
EndIf

here the html code with the price

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html><head>
  <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>Preis eingeben</title>

  <script type="text/javascript">
    var pageLoadStart = new Date();
  </script>
  
<!-- ============================================================ -->
<!-- Begin header -->
        <link href="/abis/9.01.02/Common/Popover.css" rel="stylesheet" type="text/css"/>
<link href="https://images-na.ssl-images-amazon.com/images/G/01/rainier/css/buttons/sc-buttons._V211471482_.css" rel="stylesheet" type="text/css"/>
  <link href="https://images-na.ssl-images-amazon.com/images/G/01/nav2/prod/rainierCoreCSS/rainierCoreCSS-combined-coreCSS-1293._V196797102_.css" rel="stylesheet" type="text/css"/>
  <link href="/abis/9.01.02/Common/normalized.css" rel="stylesheet" type="text/css"/>
  <link href="/abis/9.01.02/Common/variations.css" rel="stylesheet" type="text/css"/>
  <link href="/abis/9.01.02/Common/ABIS.css" rel="stylesheet" type="text/css"/>
  <link href="/abis/Common/jquery-ui-1.7.1.custom.css" rel="stylesheet" type="text/css"/>
  <link href="/abis/Common/SYH.css" rel="stylesheet" type="text/css"/>
  <script type="text/javascript" src="https://images-na.ssl-images-amazon.com/images/G/01/javascripts/lib/jquery/jquery-1.2.6.min.js"></script>

<script type="text/javascript" src="/abis/9.01.02/js/common/jquery.bgiframe.pack.js"></script>

<script type="text/javascript" src="/abis/9.01.02/js/common/jquery.simplemodal.js"></script>

<!-- jsInclude -->
<script type="text/javascript" src="/abis/9.01.02/js/aap.js"></script>

<!-- jsScript -->
<script type="text/javascript" src="/abis/9.01.02/js/datepicker/i18n/ui.datepicker-de.min.js"></script>
    <script type="text/javascript" src="https://images-na.ssl-images-amazon.com/images/G/01/rainier/rainier-javascript/sc-tabs._V192888573_.js"></script>
    <script type="text/javascript" src="https://images-na.ssl-images-amazon.com/images/G/01/rainier/rainier-javascript/sc_buttons._V188142285_.js"></script>
    <script type="text/javascript" src="https://images-na.ssl-images-amazon.com/images/G/01/rainier/rainier-javascript/browsersniffer._V192888574_.js"></script>
    <script type="text/javascript" src="https://images-na.ssl-images-amazon.com/images/G/01/rainier/rainier-javascript/rainier_menus._V192888569_.js"></script>
    <script type="text/javascript" src="https://images-na.ssl-images-amazon.com/images/G/01/rainier/rainier-javascript/generic-modal-popup._V191375519_.js"></script>
    <!-- INFO:09025-4f6d -->
  <!-- End header -->
<script type="text/javascript">

function bodyonload() {
   if (window.hidePleaseWait != undefined) {
       hidePleaseWait();
   }
   if (window.resetCICR != undefined) {
       resetCICR();
   }
   if (window.redrawCICR != undefined) {
       redrawCICR();
   }
   if (window.resetDeletedRows != undefined) {
       resetDeletedRows();
   }
}

function bodyonunload() {
   if (window.hidePleaseWait != undefined) {
       hidePleaseWait();
   }
}
</script>

  </head>
  <body onload="bodyonload();" onunload="bodyonunload();">
<!-- ============================================================ -->
<!-- Begin panel1 -->
    <div id="panel1">    
      <table border=0 cellspacing=0 cellpadding=4 width="95%" bgcolor="#FFFFFF" align="center">
    <tr bgcolor="#FFFFFF">
      <td align="left" colspan="1" width="200" nowrap="nowrap">
        <img alt="amazonLogo" src="https://images-na.ssl-images-amazon.com/images/G/03/abis-ui/amazon-logo.gif"/><!--
  <img alt="amazonLogo" src="https://images-na.ssl-images-amazon.com/images/G/03/abis-ui/amazon-logo.gif"/>
  
 --></td>
      <td>
        <table class="pipeline" align="center" cellspacing="0">
  <tbody>
    <tr style="background:  url(https://images-na.ssl-images-amazon.com/images/G/03/abis-ui/1-by-1/pipeline-bar.gif) repeat-x top">
      <td class="visited" style="width: 150px">
          <img alt="pipelineVisited1" src="https://images-na.ssl-images-amazon.com/images/G/03/abis-ui/1-by-1/pipeline-number-1-visited.gif"/><br />
          Zustand</td>
      <td class="on" style="width: 150px">
          <img alt="pipelineOn2" src="https://images-na.ssl-images-amazon.com/images/G/03/abis-ui/1-by-1/pipeline-number-2-on.gif"/><br />
          Preis/Fulfillment</td>
      <td class="off" style="width: 150px">
          <img alt="pipelineOff3" src="https://images-na.ssl-images-amazon.com/images/G/03/abis-ui/1-by-1/pipeline-number-3-off.gif"/><br />
          Bestätigen und abschließen</td>
      </tr>
   </tbody>
</table>


</td>
    </tr>
  </table>
<div class="SYHtopmodule">
  <table><tr><td>
    <strong>
      Sie haben für den Zustand des Produkts <span class="smallnegative">
            
            &nbsp;Gebraucht - Gut&nbsp;
         </span> ausgewählt.</strong>
    <br />
    <strong>Ihre Kommentare:</strong>
    
    &nbsp;altersbedingte Gebrauchsspuren,</td></tr></table>
</div>


<div style="width:95%; margin:2em auto 1em auto;">
  <form name="productForm" method="post" action="/abis/syh/ProcessPriceAttributes"><input type="hidden" name="encoded_session_hidden_map" value="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" />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td valign="top">
          <div class="SYHleftmodule">
    <h1>Preis des Produkts</h1>
    <span>Wenn Ihr Artikel verkauft wird, berechnet Amazon <a href="javascript:showPopup('http://www.amazon.de/exec/obidos/tg/browse/-/3367411')">eine Verkaufsgebühr und eine Provision</a> entsprechend den Teilnahmebedingungen zwischen Ihnen und Amazon.</span>
    <table class="syh-dataentry" border="0" cellspacing="0" cellpadding="0">
        <tr>
                      <th class="label" scope="row" valign="top">
                       <span>
                         Niedrigstes Angebot:</span>
                      </th>
                      <td class="smallnegative">
                       <strong>
                         EUR 3,90</strong>
                      </td>
                    </tr>
             <tr id="our_price-row" class="" >
        <th scope="row" class="label" valign="top">
      <span class="requiredAsterisk bold" style="display:none">
     <img title="Dieses Attribut ist erforderlich." style="padding:0 5px 0 0" alt="required-attribute" src="https://images-na.ssl-images-amazon.com/images/G/03/abis-ui/asterisk.gif"/></span><span>Ihr Preis:</span>
  <div class="tiny-example" style="font-weight:normal">
          (Preis abhängig vom Zustand)
        </div>
      </th>
    <td class="field" valign="top">
      <input type="hidden" name="our_price-uom" value="EUR">EUR &nbsp;
      <input type="text" name="our_price" maxlength="50" size="6" value="" onchange=""><div class="tiny-example" id="our_price_example"/>
  <script type="text/javascript">
    var lastUserValue_our_price='';
    function update_our_price_range()
    {
      var masterInput=locateFormElement('offering_condition');
      var childInput=locateFormElement('our_price');
      var description='';
      var shouldDisable=false;
      var newValue;
      
        if (masterInput.value == 'New|New') {
          
              //range is 0.01 to 1.0E9
          description='';
        } else
      
        if (masterInput.value == 'Used|LikeNew') {
          
              //range is 0.01 to 1.0E9
          description='';
        } else
      
        if (masterInput.value == 'Used|VeryGood') {
          
              //range is 0.01 to 1.0E9
          description='';
        } else
      
        if (masterInput.value == 'Used|Good') {
          
              //range is 0.01 to 1.0E9
          description='';
        } else
      
        if (masterInput.value == 'Used|Acceptable') {
          
              //range is 0.01 to 1.0E9
          description='';
        } else
      
        if (masterInput.value == 'Collectible|LikeNew') {
          
              //range is 0.01 to 1.0E9
          description='';
        } else
      
        if (masterInput.value == 'Collectible|VeryGood') {
          
              //range is 0.01 to 1.0E9
          description='';
        } else
      
        if (masterInput.value == 'Collectible|Good') {
          
              //range is 0.01 to 1.0E9
          description='';
        } else
      
        if (masterInput.value == 'Collectible|Acceptable') {
          
              //range is 0.01 to 1.0E9
          description='';
        } else
      
      {
        // blanked out value
      }
      if (shouldDisable) {
        if (!childInput.disabled) {
          lastUserValue_our_price=childInput.value;
          childInput.value=newValue;
          childInput.disabled=true;
        }
      } else if (childInput.disabled) {
        childInput.disabled=false;
        childInput.value=lastUserValue_our_price;
      }
      var text=document.getElementById('our_price_example');
      if (text)
      { 
        if (text.innerText != undefined)
            text.innerText=description
        else
            text.textContent=description;
      }
      
    }
    registerChangePush('offering_condition',update_our_price_range);
  </script>
</td>
    </tr>
</table>
    </div>  
<div class="SYHleftmodule">
    <h1>Quantitätsinformationen</h1>
    <span>Geben Sie die zu verkaufende Menge an. <p /><b>Hinweis:</b> Wenn Sie mehrere Kopien dieses Produkts verkaufen, müssen alle Kopien denselben Zustand besitzen. Unterscheiden sich die Zustände, ist dieser Prozess für jeden Zustand erforderlich.</span>
    <table class="syh-dataentry" border="0" cellspacing="0" cellpadding="0">
        <tr id="Offer_Inventory_Quantity-row" class="" >
        <th scope="row" class="label" valign="top">
      <span class="requiredAsterisk bold" style="display:none">
     <img title="Dieses Attribut ist erforderlich." style="padding:0 5px 0 0" alt="required-attribute" src="https://images-na.ssl-images-amazon.com/images/G/03/abis-ui/asterisk.gif"/></span><span>Menge:</span>
  </th>
    <td class="field" valign="top">
      <input type="text" name="Offer_Inventory_Quantity" maxlength="25" size="6" value="1" onchange="return validateInteger(this, 'Menge muss ein Wert vom Typ &quot;integer&quot; sein.') && validateIntRange(this, 1, 1000, 'Menge liegt nicht im Bereich zwischen 1 und 1000.')"></td>
    </tr>
</table>
    </div>  
<div class="SYHleftmodule">
    <h1>Verkäufer-SKU</h1>
    <span>Geben Sie eine Händler-SKU ein, um dieses Produkt in Ihrem Inventar zu kennzeichnen. Wenn Sie keine SKU eingeben, erstellen wir eine SKU für Sie.</span>
    <table class="syh-dataentry" border="0" cellspacing="0" cellpadding="0">
        <tr id="offering_sku-row" class="" >
        <th scope="row" class="label" valign="top">
      <span class="requiredAsterisk bold" style="display:none">
     <img title="Dieses Attribut ist erforderlich." style="padding:0 5px 0 0" alt="required-attribute" src="https://images-na.ssl-images-amazon.com/images/G/03/abis-ui/asterisk.gif"/></span><a href="#" onclick="showAttrDescWindow('ABIS_BOOK','','offering_sku');return false;">Verkäufer-SKU</a>:
  </th>
    <td class="field" valign="top">
      <input type="text" name="offering_sku" maxlength="2000" size="52.0" value="" onchange="return validateMaxLength(this, 40, 'Verk&auml;ufer-SKU darf nicht gr&ouml;&szlig;er sein als 40 Zeichen. Verringern Sie die Gr&ouml;&szlig;e des Eintrags um die folgende Anzahl von Zeichen:',true)"></td>
    </tr>
</table>
    </div>  
<div class="SYHleftmodule">
                     <h1>Ihre Versandmethoden</h1>
                     <input
                type="radio"
                name="offerFulfillment"
                value="MFN"
                checked="checked"
                >
            Wenn dieser Artikel verkauft wird, möchte ich ihn selbst an den Käufer senden.</input><br/>
    <input
                type="radio"
                name="offerFulfillment"
                value="AFN"
                
                >
            Wenn meine Artikel verkauft werden, möchte ich, dass Amazon meine Artikel versendet und den Kundenservice übernimmt.&nbsp;<a class="tiny" href="javascript:showPopup('https://sellercentral.amazon.de/gp/help/external/help-popup.html?itemID=200144670')">Weitere Informationen</a></input><br/>
    <div id="rememberAFN" style="display:none; padding-left: 3em">
        <input
                name="rememberAFN"
                type="checkbox"
                
            >
            Diese Einstellung merken</input>
    </div>
    <br/>
    <div id="afnMessage" style="display:none">
        <div class="messageboximportant" style="">
  <strong>
    Wichtige Nachricht</strong>
  <div style="text-align:left">
    Sie haben ausgewählt, dass Amazon Ihre Bestellungen für diesen Artikel erfüllen soll. Sobald Sie das Angebot komplett anlegt haben, zeigen wir Ihnen, wie Sie Ihre Artikel an das Amazon-Logistikzentrum senden. Sobald wir Ihren Artikel empfangen haben, steht er zum Kauf zur Verfügung und wir kümmern uns um Versand, Kundenservice und Rücksendungen für Ihre Bestellungen. Es fallen die Gebühren für Fulfillment by Amazon an.
            &nbsp;
            <a class="tiny" target="_blank" href="http://www.amazon.de/gp/seller/fba/fulfillment-by-amazon.html">
              Weitere Informationen</a>
        </div>
</div></div>
<div id="shipOptionselection">
Sie müssen Standardversand anbieten. Wenn Ihr Artikel verkauft wird, erhalten Sie eine <a href="javascript:showPopup('http://www.amazon.de/gp/help/customer/display.html?nodeId=3366861')">Versandkostengutschrift</a> und die Adresse des Käufers, an den der Artikel versandt wird. Die von Amazon festgelegten Versandkosten hängen vom Produkttyp ab. <a href="javascript:showPopup('http://www.amazon.de/gp/help/customer/display.html?nodeId=3366861')">Genauere Informationen</a>.<table class="data-entry" cellspacing="1" style="margin-top: 0.5em">
<tr>
        <td class="label" valign="top" scope="row" style="background-color: #FFFFFF">
            Versand innerhalb Deutschlands:
                <br/>
            <div class="tiny-example" style="font-weight: normal;">
    Lieferung in 3 bis 12 Tagen</div>
</td>
        <td class="field" style="background-color: #FFFFFF">
            <strong>Erforderlich</strong>
        <br/>

<a target="_blank" href="http://www.amazon.de/gp/help/customer/display.html?nodeId=3366791">Versandkosten-Übersicht anzeigen</a>
</td>
    </tr>
<tr>
        <td class="label" valign="top" scope="row" style="background-color: #FFFFFF">
            Expressversand - Deutschland:
                <br/>
            <div class="tiny-example" style="font-weight: normal;">
    Transitzeit: 24 Stunden</div>
</td>
        <td class="field" style="background-color: #FFFFFF">
            <input type="checkbox" name="Exp DE Domestic"  value="Exp DE Domestic" />
            <strong>Ja</strong>
        <br/>

<a target="_blank" href="http://www.amazon.de/gp/help/customer/display.html?nodeId=3366791">Versandkosten-Übersicht anzeigen</a>
</td>
    </tr>
<tr>
        <td class="label" valign="top" scope="row" style="background-color: #FFFFFF">
            International:
                <br/>
            <div class="tiny-example" style="font-weight: normal;">
    Lieferung in 5 bis 21 Tagen</div>
</td>
        <td class="field" style="background-color: #FFFFFF">
            <select name="shipOptionsStandard">
            <option>Keine</option>
            <option value="Std DE EU" >Versand innerhalb der EU, der Schweiz und Liechtenstein</option>
            <option value="Std DE Europe" >Versand innerhalb Europas (auch Nicht-EU-Lander)</option>
            <option value="Std DE-ROW" selected="selected">Versand weltweit</option>
            </select>
    <br/>

<a target="_blank" href="http://www.amazon.de/gp/help/customer/display.html?nodeId=3366791">Versandkosten-Übersicht anzeigen</a>
</td>
    </tr>
</table>
</div>

<script type="text/javascript">
    $(function(){
        var isAFNToggle = new ConditionalToggle("offerFulfillment");
        isAFNToggle.addToggle("MFN", "#shipOptionselection");
        isAFNToggle.addToggle("AFN", "#afnMessage");
        isAFNToggle.addInverseToggle("MFN", "#rememberAFN");
        isAFNToggle.init();
    });
    </script>
</div>
          <div class="centeredbutton">
            <button  class="awesomeButton buttonLarge primaryLargeButton " type="submit" >
    <span class="button_label">Weiter</span>
</button>
</div>

        </td>
        <td width="210px" align="right" valign="top">
          <table class="SYHdetailbox" border="0" cellspacing="1">
  <tr>
    <th>Preisdetails für das Produkt</th>
  </tr>
  <tr>
    <td class="cell">
      <div class="tiny">
    <strong>
      Titel</strong>
  </div>
Steuerkuriosa seit Menschengedenken. Trostbilder für Steuerzahler aus fünf Jahrtausenden<p class="tiny">
  <strong>
    Marketplace-Angebote der Konkurrenz</strong>
  <br />

<strong>
            <a href="http://www.amazon.de/gp/offer-listing/3504018658?condition=used" 
                target="_blank">2&nbsp;Gebraucht</a>
          </strong>
          von <span class="tinynegative">
                EUR 3,90</span><br />
        </p>
      <p>
        <span class="tiny">
          <strong>
            Amazon-Verkaufsrangliste</strong>
        </span>
        <br />
        <span>
          2.207.079</span>
      </p>
    </td>
  </tr>
</table>
</td>
      </tr>
    </table>
  </form></div>

<!-- INFO:09025-4f6d -->
  </div>
<!-- End panel1 -->


<!-- ============================================================ -->
<!-- Begin footer -->
    <div style="width:95%;margin-left:auto;margin-right:auto;text-align:center" class="tiny">
  <p />
  <a HREF="javascript:showPopup('http://www.amazon.de/gp/help/customer/display.html?nodeId=505048');">
    Unsere AGB</a> 
  | 
  <a HREF="javascript:showPopup('http://www.amazon.de/gp/help/customer/display.html?nodeId=3312401')">
    Datenschutzerklärung</a> 
  &copy; 
  1996-2010, Amazon, Inc. und Tochtergesellschaften</div>

<!-- INFO:09025-4f6d -->
  <!-- End footer -->
<!-- ============================================================ -->

    <script type="text/javascript">
      

stringTable.put( "url_browse_categories", '/abis/Classify/BrowseCategory.amzn' );
stringTable.put( "url_recent_categories", '/abis/Classify/SaveRecentCategory.amzn' );
stringTable.put( "url_search_categories", '/abis/Classify/SearchCategory.amzn' );

stringTable.put( "msg_no_categories_found", 'Es sind keine Kategorien verf\u00FCgbar, zu denen gewechselt werden kann.' );
stringTable.put( "msg_unknown_exception", 'Bei der \u00DCbermittlung ist ein unerwarteter Fehler aufgetreten.' );
stringTable.put( "one_char_left", 'noch %d Zeichen' );
stringTable.put( "one_char_exceeded", '%d Zeichen \u00FCber dem Limit' );
stringTable.put( "char_left", 'noch %d Zeichen' );
stringTable.put( "char_exceeded", '%d Zeichen \u00FCber dem Limit.' );</script>
    <div id="please-wait-content" style="background-color: white;position: absolute; width: 300px;display:none;border: 1px solid black;text-align: center;padding:5px">
  <p />
  Ihre Übermittlung wird verarbeitet. Bitte warten...<div id="loadingImageDiv" style="margin-top:10px;margin-bottom:5px">
    <img alt="-" src="https://images-na.ssl-images-amazon.com/images/G/03/abis-ui/loading-bar.gif"/></div>
</div><div id="errorBox_unrecoverable_error_0" style="background-color: white;position: absolute; width: 400px;display:none;border: 1px solid black;text-align: center;padding:5px">
    <div class="messageboxerror" style="">
  <strong>
    Fehler.</strong>
  <div style="text-align:left">
    Entschuldigen Sie bitte! Bei der Verarbeitung ist ein Fehler aufgetreten. Bitte kontaktieren Sie den Verkäuferservice über das Kontaktformular auf einer der Verkäufer-Hilfeseiten und bitten Sie um Unterstützung zu folgender SKU:</div>
</div><button  class="awesomeButton buttonLarge secondaryLargeButton " type="button" onclick="window.location.href='https://sellercentral.amazon.de/gp/homepage.html'">
    <span class="button_label">Zurück zum Verkäuferkonto</span>
</button>
</div></body>

</html><!-- INFO:09025-4f6d -->

Share this post


Link to post
Share on other sites



I can see that you have done a fair bit of work here, and I would like to help but the German (I think), is doing my head in. Would you mind translating it please?

Theoretically I can figure it out without worrying about the language used, but it would just help me to understand what the program is doing a bit better, and therefore give a better response.

Thanks,

shanet


[font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS:
%programfiles%/AutoIt3/autoit3.chm

Share this post


Link to post
Share on other sites

thanks for your reply.

this is only one part of the program. i`ve splitted it into different scripts.

here is the same code, but with comments in english. hope it will help.

WinSetTitle ( "childgui","", "preis_sku" )
;~          preis eingabe
$pleft1='EUR'
$pright1=","

$skueingleft = "Geben Sie eine"
$skueingright = ", um dieses Produkt"
$skupruef = "Händler-SKU ein"

Dim $source3[1]
$source3[0] = ""

;~ preis auslesen-------------------------------------------------------------------reading the price

;~ vorkomma-------------------------------------------------------------------------bevore the  ,
_IELoadWait ($oIE)
$sText = _IEBodyReadText ($oIE)
;~ $sText = StringReplace ( $sText, @LF, "" )
;~ $sText = StringReplace ( $sText, @CR, "" )
;~ $sText = StringReplace ( $sText, @CRLF, "" )

$source1 = _StringBetween($sText, $pleft1,$pright1)
If Not @error Then
    _ArrayDisplay($source1,"vorkomma")
Else
    MsgBox(0,"vorkomma","fehler")
EndIf


;~ i think here must be some code to validate if [1] is text or int and discard if it is text

If Not @error Then
    If int($source1[1]) < int($source1[0]) Then                                     ;sometimes [1] is not int
        $gebpreis = int($source1[1])
    Else
        $gebpreis = int($source1[0])
    EndIf
EndIf
MsgBox(0,"gebpreis",""& $gebpreis)                                                  ;gives 0 when [1] is not a number.   how do i ?????


;~ nachkomma------------------------------------------------------------------------after the  ,
$pleft2= $gebpreis &","
$pright2="</strong>"

$source2 = _StringBetween($sText, $pleft2,$pright2)
_ArrayDisplay($source2,"nachkomma")
MsgBox(0,"nachkomma",""& $source2[0])
If @error Then
    $end = InputBox("preiseingabe","Bitte den gewünschten Preis eingeben")         ;please enter the price
Else
;~ preisabzug------------------------------------------------------------------------to rebate
    $w = Int($source2[0])
    If Int($source2[0]) ==Int(00) Then                                              ;   is this correct?   if price = for example 8,00euro then
        $gebpreis = $gebpreis -1                                                    ;-1 bevore the     ,
        $w =Int(99)                                                                 ;and 99 after the  ,
    EndIf
    $end = $gebpreis &',' & $w
EndIf

;~ übergabe des preises-------------------------------------------------------------send the price back to website
Send("{TAB 2}")
Send("" & $end)
Sleep(500)


;~ SKU eingabe-----------------------------------------------------------------------send the sku to website
$sText = _IEBodyReadText ($oIE)
$source3 = _StringBetween($sText, $skueingleft,$skueingright)                       ;search for a srring
If @error Then                                                                      ;if not found you are not logged in
    Send("{ENTER}")
Else                                                                                ;if found you are logged in
    Send("{TAB 3}")
    send(""& $sku)
    Send("{ENTER}")
EndIf

Share this post


Link to post
Share on other sites

i made it by myself :x

WinSetTitle ( "childgui","", "preis_sku" )
;~          preis eingabe
$pleft1='EUR'
$pright1=","

$skueingleft = "Geben Sie eine"
$skueingright = ", um dieses Produkt"
$skupruef = "Händler-SKU ein"

Dim $source3[1]
$source3[0] = ""

;~ preis auslesen-------------------------------------------------------------------reading the price

;~ vorkomma-------------------------------------------------------------------------bevore the  ,
_IELoadWait ($oIE)
$sText = _IEBodyReadHTML ($oIE)
$source1 = _StringBetween($sText, $pleft1,$pright1)
If Int($source1[1]) ==0 Then
    $gebpreis = int($source1[0])
Else
    If int($source1[1]) < int($source1[0]) Then                                     ;sometimes [1] is not int
        $gebpreis = int($source1[1])
    Else
        $gebpreis = int($source1[0])
    EndIf
EndIf

;~ nachkomma------------------------------------------------------------------------after the  ,
$pleft2= $gebpreis &","
$pright2="</strong>"

$source2 = _StringBetween($sText, $pleft2,$pright2)
if Not @error Then;~ preisabzug------------------------------------------------------------------------to rebate
    $w = Int($source2[0])
    If Int($source2[0]) ==Int(00) Then                                              ;   is this correct?   if price = for example 8,00euro then
        $gebpreis = $gebpreis -1                                                    ;-1 bevore the     ,
        $w =Int(99)                                                                 ;and 99 after the  ,
    Else
        $w = $w -1
    EndIf
    $end = $gebpreis &',' & $w
Else
    MsgBox(262192,"Warnung","Konnte keinen Preis auslesen!!!")
    $end = InputBox("Preiseingabe","Bitte den gewünschten Preis eingeben."&@LF &Int($source1[1]&Chr(44)Int($source2[0]),""," ","-1","-1","-1","-1")
EndIf

;~ übergabe des preises-------------------------------------------------------------send the price back to website
Send("{TAB 2}")
MsgBox(0,"",""&$end)
Send("" & $end)
Sleep(500)


;~ SKU eingabe-----------------------------------------------------------------------send the sku to website
$sText = _IEBodyReadText ($oIE)
$source3 = _StringBetween($sText, $skueingleft,$skueingright)                       ;search for a srring
If @error Then                                                                      ;if not found you are not logged in
    Send("{ENTER}")
Else                                                                                ;if found you are logged in
    Send("{TAB 3}")
    send(""& $sku)
    Send("{ENTER}")
EndIf

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0