Sign in to follow this  
Followers 0
tradertt

Please help with this Macro I created. How do I loop and +1 to the value each time

14 posts in this topic

Hi Guys,

Tried creating the macro myself but need some help.

I will do 1 at a time:

1) How do I loop the Closing Time in the macro so that it runs from 0 to 23 each time and then it will loop the StartDay and increase it by 1.

Process will go like that:

ClosingTime 0 to 23 --> StartDay +1 to StartDay = 2 --> Loop ClosingTime 0 to 23 again --> StartDay +1 to StartDay = 3 and on and on till Start day = 31 then StartMonth Loop from 03 to 04 and it goes in a cycle again.

2)When it goes into the other page to confirm the auction submission, I cannot seem to make it click on the Submit button. I have attached the HTML code here for your reference.

#include <IE.au3>


$s_StartMonth = "03"; Loop from 03 to 04
$s_StartDay = "1"; Loop from 1 to 31
$s_ClosingTime = 0; Loop from 0 to 23 


_YahooAuctions($s_StartMonth, $s_StartDay, $s_ClosingTime)


Func _YahooAuctions($s_StartMonth, $s_StartDay, $s_ClosingTime)
     $s_URL = "http://sg.auctions.yahoo.com/sg/show/submit?category=2092052828&a=b"
     $o_IE = _IECreate($s_URL)
     $o_Form = _IEFormGetObjByName($o_IE, "AUC_SUBMIT")
     $o_StartMonth = _IEFormElementGetObjByName($o_Form, "StartMonth")
     $o_StartDay = _IEFormElementGetObjByName($o_Form, "StartDay")
     $o_ClosingTime = _IEFormElementGetObjByName($o_Form, "ClosingTime") 
    
     _IEFormElementSetValue($o_StartMonth, $s_StartMonth)
     _IEFormElementSetValue($o_StartDay, $s_StartDay)
     _IEFormElementOptionselect($o_ClosingTime, $s_ClosingTime)

     
     _IEFormSubmit($o_Form)
     
    ;how to make it submit another time in the next page? Cannot find its form
     
     SetError(0)
     Return 1
 
 EndFunc  ;==>_YahooAuctions

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Yahoo! Auctions Submit Preview</title>
<meta name="keywords" content="Yahoo! Auctions Submit Preview">  
<meta name="description" content="Many Auctions at great prices">
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<style type="text/css">
<!--
@import url(http://us.i1.yimg.com/us.yimg.com/lib/common/fonts_200502080901.css);
@import url(http://us.i1.yimg.com/us.yimg.com/lib/shop/yshp_global20050311.css);
@import url(http://us.i1.yimg.com/auctions.yahoo.com/yauc_css.css);
-->
</style>
<style type="text/css" rel="stylesheet">
<!--
@import url(http://us.js2.yimg.com/us.js.yimg.com/lib/shop/yshp_list_200602151813.css);

#list_list { margin:0 auto; margin-left:0px; *width:100%; }

-->
</style>

</head>
<body>
<!-- SpaceID=0 robot -->

<div id="tabs">
  <h2>Primary Navigation</h2>
  <div id="main">
    <a id="tab_1" href="/sg/b:Clothing:23000"><span><em>Clothing</em></span></a><span class="sep"> | </span><a id="tab_2" href="/sg/b:Cameras:23636"><span><em>Cameras</em></span></a><span class="sep"> | </span><a id="tab_3" href="/sg/b:Collectibles:20000"><span><em>Collectibles</em></span></a><span class="sep"> | </span><a id="tab_4" href="/sg/b:Electronics:23632"><span><em>Electronics</em></span></a><span class="sep"> | </span><a id="tab_5" href="/sg/b:Furnishing:24198"><span><em>Furnishing</em></span></a><span class="sep"> | </span><a id="tab_6" href="/sg/b:Toys:25464"><span><em>Toys</em></span></a><span class="sep"> | </span><a id="tab_7" href="http://sg.auctions.yahoo.com/sg/0-all.html"><span><em class=allcat>All Categories<img class="arrow" src="http://us.i1.yimg.com/us.yimg.com/i/spacer.gif" width="11" height="7" alt="whitespace"></em></span></a>      <a id="sellstuff" style="background-color:white; position:relative;
      font-size:150%;text-align:right;float:right; color:#FF7700;
      text-decoration:underline;
      border-width:1px; border:0; margin:1 0px 0 0 " href="http://sg.auctions.yahoo.com/sg/0-submit.html">Sell Stuff</a>
  </div>
</div>
<div class="clear"></div>

<div class="tab_menu" id="menu_7" 
  style="position:absolute; visibility:hidden;">
  <ul><li><a href="/sg/b:Antiques%2C+Art+%26amp%3B+Collectibles:20000">Antiques, Art &amp; Collectibles</a></li>
<li><a href="/sg/b:Audio:2092052828">Audio</a></li>
<li><a href="/sg/b:Automotive:2092052492">Automotive</a></li>
<li><a href="/sg/b:Business+%26amp%3B+Office:22896">Business &amp; Office</a></li>
<li><a href="/sg/b:Clothing+%26amp%3B+Accessories:23000">Clothing &amp; Accessories</a></li>
<li><a href="/sg/b:Coins%2C+Paper+Money+%26amp%3B+Stamps:20452">Coins, Paper Money &amp; Stamps</a></li>
<li><a href="/sg/b:Computers:23336">Computers</a></li>
<li><a href="/sg/b:Electronics+%26amp%3B+Cameras:23632">Electronics &amp; Cameras</a></li>
<li><a href="/sg/b:Entertainment:21596">Entertainment</a></li>
<li><a href="/sg/b:Home+%26amp%3B+Furnishing:24198">Home &amp; Furnishing</a></li>
<li><a href="/sg/b:Sports+%26amp%3B+Outdoors:24698">Sports &amp; Outdoors</a></li>
<li><a href="/sg/b:Toys%2C+Games+%26amp%3B+Hobbies:25464">Toys, Games &amp; Hobbies</a></li>
<li><a href="/sg/b:Travel+%26amp%3B+Transportation:26184">Travel &amp; Transportation</a></li>
<li><a href="/sg/b:Other+Goods+%26amp%3B+Services:26084">Other Goods &amp; Services</a></li>
<li><a href="http://sg.auctions.yahoo.com/sg/0-all.html">More...</a></li>
</ul></div>
<div class="yshp_searchbar">
  <div class="yshp_rc">
    <div class="yshp_rc_width">
      <form name=search action=http://sg.auctions.yahoo.com/sg/search method=get>
      <h2 style="width:100px">Search</h2>
      <div class="searchfloat">
    <input type=text name=p size=30 value="">
    <select name=cat><option value="0">All of Auctions<option value="20000">Antiques, Art &amp; Collectibles<option value="2092052828">Audio<option value="2092052492">Automotive<option value="22896">Business &amp; Office<option value="23000">Clothing &amp; Accessories<option value="20452">Coins, Paper Money &amp; Stamps<option value="23336">Computers<option value="23632">Electronics &amp; Cameras<option value="21596">Entertainment<option value="24198">Home &amp; Furnishing<option value="24698">Sports &amp; Outdoors<option value="25464">Toys, Games &amp; Hobbies<option value="26184">Travel &amp; Transportation<option value="26084">Other Goods &amp; Services</select>   <input type=submit value=Search class=yshp_btn_grey>
      </div>
      <div class="yshp_w">
    <a href="http://sg.auctions.yahoo.com/sg/show/searchoptions">Advanced Search</a>
        <br> 
    <a href="http://search.yahoo.com/search?p=">Web Search</a>
        <br>
      </div>
      <div class="clear"></div>
      </form>
    </div>
  </div>
</div>
<table width='100%' border=0 style='padding-top: 5px'>
<tr bgcolor='#F3F3FF'>
<td valign'top' align='left' width='50%'>
<font style='font: 1.2em arial; color:red'><b>This is how your auction will appear.</b></font><br>
<font style='font: 0.95em arial'>Please review your auction information</font>
</td>
<td valign='top' align='left'><FORM ACTION="http://sg.auctions.yahoo.com/sg/show/submit?category=26395&a=b" METHOD="post">

<input type=hidden name="category" value="26395">
<input type=hidden name="singlesubmit" value="1">
<input type=hidden name="thumbnailwidth" value="">
<input type=hidden name="thumbnailid" value="">
<input type=hidden name="ImageServer" value="">
<input type=hidden name="OldCollection" value="000005274909">
<input type=hidden name="auction_server" value="">
<input type=hidden name="uploadserver" value="">
<input type=hidden name="Image1" value="">
<input type=hidden name="Image2" value="">
<input type=hidden name="Image3" value="">
<input type=hidden name="Thumb1" value="">
<input type=hidden name="Thumb2" value="">
<input type=hidden name="Thumb3" value="">
<input type=hidden name="Deleted1" value="">
<input type=hidden name="Deleted2" value="">
<input type=hidden name="Deleted3" value="">
<input type=hidden name="catz" value="">
<input type=hidden name="part" value="">

<input type=hidden name="aID" value="">
<input type=hidden name="oldAID" value="">
<input type=hidden name="mode" value="">
<input type=hidden name="md5" value="">
<input type=hidden name="tos" value="">
<input type=hidden name=".abs" value="">
<input type=hidden name=".ts" value="1173978490">
<input type=hidden name=".sig" value="">
<input type=hidden name=crumb value="">
<input type=hidden name=login value="">
<input type=hidden name="confUrl" value="">
<input type=hidden name=".done" value="">
<input type=hidden name="auctionAcceptsPayPal" value="0">
<input type=hidden name="Condition" value="">
<input type=hidden name="custtags" value="">
<input type=hidden name="attributes" value="">
<input type=hidden name="Quantity" value="">
<input type=hidden name="StartPrice" value="0.01">
<input type=hidden name="Duration" value="10">
<input type=hidden name="BidCount" value="0">
<input type=hidden name="enablePP" value="0">
<input type=hidden name="intlOK" value="">

<input type=hidden name="ypc" value="0">
<input type=hidden name="ymo" value="0">
<input type=hidden name="ycc" value="0">
<input type=hidden name="yes" value="0">
<input type=hidden name="shipping" value="">
<input type=hidden name="shiptime" value="">
<input type=hidden name="BidOrBuyPrice" value="">
<input type=hidden name="shipPrice" value="0">
<input type=hidden name="denomination" value="">
<input type=hidden name="ReservePrice" value="">
<input type=hidden name="StartMonth" value="3">
<input type=hidden name="StartDay" value="15">
<input type=hidden name="StartHour" value="0">
<input type=hidden name="ClosingTime" value="1">
<input type=hidden name="testLabel" value="">
<input type=hidden name="minBidRating" value="">
<input type=hidden name="AutoExtension" value="">
<input type=hidden name="CloseEarly" value="">
<input type=hidden name="numResubmit" value="0">

<input type=hidden name="sellerOkHash" value="">
<input type=hidden name="sellerQuality" value="">
<input type=hidden name="finalValueFee" value="">
<input type=hidden name="Description" value="">
<input type=hidden name="Title" value="">
<input type=hidden name="aucspaceid" value="2092034350">
<input type=hidden name="mqRating" value="10">
<input type=hidden name="mqDays" value="60">
<input type=hidden name="allowNormalShowcase" value="1">
<input type=hidden name="partnum_type" value="">
<input type=hidden name="quicksubmit" value="">
<input type=hidden name="shopintHelpUrl" value="http://help.yahoo.com/help/us/auct/asell/asell-72.html">
<input type=hidden name="shopCatBooks" value="1">
<input type=hidden name="haveitem" value="1">
<input type=hidden name="OrigPrice" value="">
<input type=hidden name="ShipPrice" value="">
<input type=hidden name="ReserveAuction" value="yes">
<input type=hidden name="enableSavePrefs" value="">
<input type=hidden name="prefs2" value="">

<INPUT TYPE=submit VALUE="Edit Auction Info" style="height: 22px">
</FORM>

<FORM ACTION="http://sg.auctions.yahoo.com/sg/show/confirm" METHOD="post">

<input type=hidden name="category" value="26395">
<input type=hidden name="singlesubmit" value="1">
<input type=hidden name="thumbnailwidth" value="">
<input type=hidden name="thumbnailid" value="">
<input type=hidden name="ImageServer" value="">
<input type=hidden name="OldCollection" value="000005274910">
<input type=hidden name="auction_server" value="">
<input type=hidden name="uploadserver" value="">
<input type=hidden name="Image1" value="">
<input type=hidden name="Image2" value="">
<input type=hidden name="Image3" value="">
<input type=hidden name="Thumb1" value="">
<input type=hidden name="Thumb2" value="">
<input type=hidden name="Thumb3" value="">
<input type=hidden name="Deleted1" value="">
<input type=hidden name="Deleted2" value="">
<input type=hidden name="Deleted3" value="">
<input type=hidden name="catz" value="">
<input type=hidden name="part" value="">

<input type=hidden name="aID" value="">
<input type=hidden name="oldAID" value="">
<input type=hidden name="mode" value="">
<input type=hidden name="md5" value="">
<input type=hidden name="tos" value="">
<input type=hidden name=".abs" value="">
<input type=hidden name=".ts" value="1173978490">
<input type=hidden name=".sig" value="">
<input type=hidden name=crumb value="">
<input type=hidden name=login value="">
<input type=hidden name="confUrl" value="">
<input type=hidden name=".done" value="">
<input type=hidden name="auctionAcceptsPayPal" value="0">
<input type=hidden name="Condition" value="">
<input type=hidden name="custtags" value="">
<input type=hidden name="attributes" value="">
<input type=hidden name="Quantity" value="">
<input type=hidden name="StartPrice" value="0.01">
<input type=hidden name="Duration" value="10">
<input type=hidden name="BidCount" value="0">
<input type=hidden name="enablePP" value="0">
<input type=hidden name="intlOK" value="">

<input type=hidden name="ypc" value="0">
<input type=hidden name="ymo" value="0">
<input type=hidden name="ycc" value="0">
<input type=hidden name="yes" value="0">
<input type=hidden name="shipping" value="">
<input type=hidden name="shiptime" value="">
<input type=hidden name="BidOrBuyPrice" value="">
<input type=hidden name="shipPrice" value="0">
<input type=hidden name="denomination" value="">
<input type=hidden name="ReservePrice" value="">
<input type=hidden name="StartMonth" value="3">
<input type=hidden name="StartDay" value="15">
<input type=hidden name="StartHour" value="0">
<input type=hidden name="ClosingTime" value="1">
<input type=hidden name="testLabel" value="">
<input type=hidden name="minBidRating" value="">
<input type=hidden name="AutoExtension" value="">
<input type=hidden name="CloseEarly" value="">
<input type=hidden name="numResubmit" value="0">

<input type=hidden name="sellerOkHash" value="">
<input type=hidden name="sellerQuality" value="">
<input type=hidden name="finalValueFee" value="">
<input type=hidden name="Description" value="">
<input type=hidden name="Title" value="">
<input type=hidden name="aucspaceid" value="2092034350">
<input type=hidden name="mqRating" value="10">
<input type=hidden name="mqDays" value="60">
<input type=hidden name="allowNormalShowcase" value="1">
<input type=hidden name="partnum_type" value="">
<input type=hidden name="quicksubmit" value="">
<input type=hidden name="shopintHelpUrl" value="http://help.yahoo.com/help/us/auct/asell/asell-72.html">
<input type=hidden name="shopCatBooks" value="1">
<input type=hidden name="haveitem" value="1">
<input type=hidden name="OrigPrice" value="">
<input type=hidden name="ShipPrice" value="">
<input type=hidden name="ReserveAuction" value="yes">
<input type=hidden name="enableSavePrefs" value="">
<input type=hidden name="prefs2" value="">

<INPUT TYPE=submit VALUE="Submit Auction" style="height: 22px">
</FORM>

</td>
</tr>
</table>
<p></p><div id="list_cont"><div id="list" style="margin-left:4px"><div class="lineage"><a class="yauc_crumb" href="http://sg.auctions.yahoo.com/sg/">Auctions</a><span class="yauc_crumb"> &gt; </span><a class="yauc_crumb" href="/sg/b:Other%20Goods%20%26%20Services:26084">Other Goods & Services</a><span class="yauc_crumb"> &gt; </span><a class="yauc_crumb" href="/sg/s:Other:26395">Other</a></div><p></p></div></div><table border=0 cellpadding=2 cellspacing=0 width="100%">
 <tr>
  <td>
   <font face=arial size=+1>
    <b>
         </b>
    &nbsp; 
   </font>
  </td>
  <td align=right>
   <table border=0 cellpadding=2 cellspacing=0>
    <tr>
     <td align=center nowrap>
      [
       <a href="http://sg.auctions.yahoo.com/sg/show/reviews?aID=">
Neighbourhood Watch</a>
      ]
      [
       <a href="http://mtf.news.yahoo.com/mailto?url=http://sg.auctions.yahoo.com/sg/auction/&title=&rf=f&prop=auctions&locale=us">Email to a Friend</a>
      ]
      [
       <a href="http://calendar.yahoo.com/?v=60&URL=http://sg.auctions.yahoo.com/sg/i::&VIEW=d&TITLE=&ST=20070324t100000&UID=&REM1=15m">Add to My Calendar</a>
      ]
      [
       <a href="http://sg.auctions.yahoo.com/sg/config/remember?aID=">Add to Watchlist</a>
      ]
     </td>
    </tr>
   </table>
  </td>
 </tr>
</table>
<hr size=1 noshade>
<table width="100%" cellspacing=0 cellpadding=2 border=0><tr><td width=1%>&nbsp;</td><td valign=top>
<TABLE BORDER=0 CELLPADDING=2 width="100%">
<TR>
   <TD colspan=2 BGCOLOR="#c4dbf6" style="font: 1.05em arial">
      <B>Seller Info</B>
   </TD>
</TR>

<TR>
   <TD nowrap style="font: 1.0em arial" valign="top">
      Seller (<SMALL>rating</SMALL>):
   </TD>
   <TD nowrap style="font: 1.0em arial" valign="top"><b>
      <a href="http://sg.auctions.yahoo.com/sg/user/"></a>
    (<a href="http://sg.auctions.yahoo.com/sg/show/rating?userID="><small>0</small></a>)
    
     </b>
     &nbsp;
     <a href="http://edit.yahoo.com/config/send_webmesg?.src=pg&.target=" style="font: 0.9em arial; color: #345BFF"><img src="http://opi.yahoo.com/online?m=g&u=" border=0>Send IM</a>
   </TD>
</TR>

<TR>
   <TD colspan=2 style="font: 0.85em arial">
     Yahoo! Auctions Member since December 31, 1969<br><br>
   </TD>
</TR>

<TR>
   <TD colspan=2 bgcolor="#eeeeee" style="font: 0.86em arial">
     &nbsp;
     <a href="http://sg.auctions.yahoo.com/sg/user/">Seller's Current Auctions</a>

     &nbsp;|&nbsp;<a href="http://sg.auctions.yahoo.com/sg/user/?closed=1">Seller's Closed Auctions</a>
   </TD>
</TR>

<TR>
   <TD colspan=2 bgcolor="#eeeeee" style="font: 0.86em arial">
     &nbsp;
     <a href="http://sg.auctions.yahoo.com/sg/show/rating?userID=">Comments About Seller</a>

     &nbsp;|&nbsp;<a href="http://sg.auctions.yahoo.com/sg/show/qanda?aID=">Ask Seller a Question</a>
   </TD>
</TR>


<TR><TD colspan=2>&nbsp;</TD></TR>

<TR>
   <TD colspan=2 BGCOLOR="#c4dbf6" style="font: 1.05em arial">
      <B>Payment Types Accepted</B>
   </TD>
</TR>

<TR>
   <TD colspan=2 style="font: 1.0em arial">
     
     
     
     
          <br>
   </TD>
</TR>

<TR>
   <TD colspan=2 BGCOLOR="#c4dbf6" style="font: 1.05em arial">
      <B>Shipping Info</B>
   </TD>
</TR>

<TR>
   <TD colspan=2 style="font: 1.0em arial">
             &bull;<small> Buyer Pays Shipping</small><br>
     
             &bull;<small> Seller Ships on Auction Close</small><br>
     
             &bull;<small> Seller will not ship internationally</small><br>
     
     <br>
   </TD>
</TR>

</TABLE>
<p>
</td><td width=1%>&nbsp;</td><td valign=top><TABLE BORDER=0 CELLPADDING=2 width="100%">
<TR>
   <TD colspan=2 BGCOLOR="#c4dbf6" style="font: 1.05em arial">
     <b>Auction Info</b>
   </TD>
</TR>

<TR>
    <TD style="font: 0.90em arial">Current Bid:</TD>
    <TD style="font: 0.90em arial">
        <b>0.01 SGD</b>
                  &nbsp;
          <a href="http://sg.auctions.yahoo.com/sg/show/bid_preview?ItemID=&Quantity=&bidType=1001&submit= Preview Bid ">Quick Bid</a>
            </TD>
</TR>


<TR>
   <TD style="font: 0.90em arial">Starting Price:</TD>
   <TD style="font: 0.90em arial">0.01 SGD</TD>
</TR>


<TR>
   <TD style="font: 0.90em arial">
   High Bidder:   </TD>
   <TD style="font: 0.90em arial" VALIGN=TOP>
        none
   </TD>
</TR>

<TR>
    <TD style="font: 0.90em arial"># of Bids:</TD>
    <TD style="font: 0.90em arial">0&nbsp;<small>
      (<a href="http://sg.auctions.yahoo.com/sg/show/bid_hist?aID=">Bid History</a>)</small>
    </TD>
</TR>

<TR>
   <TD style="font: 0.90em arial">Bid Increment:<br><br></TD>
   <TD style="font: 0.90em arial">0.00 SGD<br><br></TD>
</TR>

<TR>
   <TD style="font: 0.90em arial" bgcolor="#eeeeee"><b>Time Left:</b></TD>
   <TD style="font: 0.90em arial" bgcolor="#eeeeee"><b><a href='' style='text-decoration:none;' id='auctime0' onclick='setAucTime(0)'><font style='font: 13px arial, sans-serif; color: black'>8d 23h 51m 50s</font></a></b><small>
    (<a href="java script:var junk=window.open('http://sg.auctions.yahoo.com/sg/show/countdown?aID=',
    'countdown', 'width=400,height=190,scrollbars=yes,resizable=yes,status=0')"><b>Countdown Ticker</b></a>)</small>
   </TD>
</TR>

<TR>
   <TD style="font: 0.90em arial">Opened:</TD>
   <TD style="font: 0.90em arial">Mar 15 12:00 AM</TD>
</TR>

<TR>
   <TD style="font: 0.90em">Closes:<br><br></TD>
   <TD style="font: 0.90em">Mar 25 01:00 AM<br><br></TD>
</TR>

<TR>
    <TD style="font: 0.90em arial">Available Qty:</TD>
    <TD style="font: 0.90em arial"></TD>
</TR>

<TR>
   <TD style="font: 0.90em arial">Location:</TD>
   <TD style="font: 0.90em arial" nowrap>
     
   </TD>
</TR> 

<TR>
   <TD style="font: 0.90em arial">ID #:</TD>
   <TD style="font: 0.90em arial"></TD>
</TR>

<TR>
   <TD colspan=2 font style="font: 0.90em arial">
     <br><b> <a href="http://help.yahoo.com/help/sg/auct/asell/asell-19.html">Notes:</a> </b>
   </TD>
</TR>

<TR>
   <TD colspan=2 style="font: 1.0em arial">
   <small>
    
          &bull; Auction does not get automatically extended.<br>
    
    
       </small>
   </TD>
</TR>
</TABLE>

</td><td width=1%>&nbsp;</td><td valign=top align=right>
<table cellspacing=0 border=0>
<form action="http://sg.auctions.yahoo.com/sg/show/bid_preview" method="POST">
<input TYPE=hidden NAME=ItemID VALUE=>
<input type=hidden name=aucview value="">
<input TYPE=hidden NAME=Quantity value=1>

<tr bgcolor="#3061AF">
   <td align=right style="padding: 2px;">
   <table BORDER=0 CELLSPACING=0 CELLPADDING=4 WIDTH="205" bgcolor="#e5edf6">
   <tr>
      <td colspan=2 bgcolor="#c4dbf6" style="font: 1.05em arial" align="left">
         <b>Place a Bid</b>
      </td>
   </tr>

   <tr>
      <td align="left" style="font: 0.90em arial">
         <br>Minimum&nbsp;Bid:
      </td> 
      <td align="left" style="font: 0.90em arial">
         <br>0.01 SGD     </td>
   </tr>

   <tr>
      <td align="left" style="font: 0.88em arial">
         <a href="http://help.yahoo.com/bin/help/redirect.cgi?to_url=http://help.yahoo.com/help/sg/auct/abid/abid-03.html">Maximum&nbsp;Bid</a>:
      </td>
      <td align="left" nowrap style="font: 0.90em arial">
         $<input type=text name=Bid size=9>SGD    </td>
   </tr>

   
   <tr>
      <td colspan=2 style="font: 0.85em arial" align="left">
        <input type=radio name="bidType" value="1000" checked>&nbsp;
        Bid up to this amount on my behalf
        <br>
        <input type=radio name="bidType" value="1001">&nbsp;
        Bid this exact amount
      </td>
   </tr>

   <tr>
      <td colspan=2 align=center style="padding-top: 10px">
        <input type="Submit" name=submit value=" Preview Bid ">
      </td>
   </tr>

   <tr>
      <td colspan=2 align=center style="font: 0.80em arial; padding-top: 10px">
        Need Help? View the <a href="http://help.yahoo.com/bin/help/redirect.cgi?to_url=http://help.yahoo.com/help/sg/auct/abid/">Bidders' Guide</a>
      </td>
   </tr>
   </table>
   </td>
</tr>
</form>

</table>
</td><td width=1%>&nbsp;</td></tr></table><table border=0 width="100%" cellspacing=0 cellpadding=0>
  <tr>
    <td align=center width="25%">
      <table bgcolor="#c4dbf6" border=0 width="100%" cellspacing=0>
  <tr align=center>
    <td nowrap>
      <font face=arial size="-1" color="#000000">&nbsp;
        <b>Item Information</b>
      </font>&nbsp;
    </td>
  </tr>
</table>
    </td>
    <td width="2%">&nbsp;</td>
    <td align=center width="25%">
      <table bgcolor="#dcdcdc" border=0 width="100%" cellspacing=0>
  <tr align=center>
    <td nowrap>
      <font face=arial size="-1">&nbsp;
        <a href="http://sg.auctions.yahoo.com/sg/show/bid_hist?aID=">Bid History</a>
      </font>&nbsp;
    </td>
  </tr>
</table>
    </td>
    <td width="2%">&nbsp;</td>
    <td align=center width="25%">
      <table bgcolor="#dcdcdc" border=0 width="100%" cellspacing=0>
  <tr align=center>
    <td nowrap>
      <font face=arial size="-1">&nbsp;
        <a href="http://sg.auctions.yahoo.com/sg/show/qanda?aID=">Question &amp; Answer</a>
      </font>&nbsp;
    </td>
  </tr>
</table>
    </td>
    <td width="1%">&nbsp;</td>
    <td align=right width="20%">&nbsp;</td>
  </tr>
  <tr>
    <td width="100%" colspan=7>
      <table border=0 cellspacing=0 width="100%">
        <tr>
          <td bgcolor="#c4dbf6">
            <table border=0 cellspacing=0 cellpadding=0>
              <tr>
                <td height=3>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<br>
<center><table><tr><td style='background-color: #FFFFFF' align='left'></td></tr></table></center><table width='100%' border=0 style='padding-top: 5px'>
<tr bgcolor='#F3F3FF'>
<td valign'top' align='left' width='50%'>
<font style='font: 1.2em arial; color:red'><b>This is how your auction will appear.</b></font><br>
<font style='font: 0.95em arial'>Please review your auction information</font>
</td>
<td valign='top' align='left'><FORM ACTION="http://sg.auctions.yahoo.com/sg/show/submit?category=26395&a=b" METHOD="post">

<input type=hidden name="category" value="26395">
<input type=hidden name="singlesubmit" value="1">
<input type=hidden name="thumbnailwidth" value="">
<input type=hidden name="thumbnailid" value="">
<input type=hidden name="ImageServer" value="">
<input type=hidden name="OldCollection" value="000005274911">
<input type=hidden name="auction_server" value="">
<input type=hidden name="uploadserver" value="">
<input type=hidden name="Image1" value="">
<input type=hidden name="Image2" value="">
<input type=hidden name="Image3" value="">
<input type=hidden name="Thumb1" value="">
<input type=hidden name="Thumb2" value="">
<input type=hidden name="Thumb3" value="">
<input type=hidden name="Deleted1" value="">
<input type=hidden name="Deleted2" value="">
<input type=hidden name="Deleted3" value="">
<input type=hidden name="catz" value="">
<input type=hidden name="part" value="">

<input type=hidden name="aID" value="">
<input type=hidden name="oldAID" value="">
<input type=hidden name="mode" value="">
<input type=hidden name="md5" value="">
<input type=hidden name="tos" value="">
<input type=hidden name=".abs" value="">
<input type=hidden name=".ts" value="1173978490">
<input type=hidden name=".sig" value="">
<input type=hidden name=crumb value="">
<input type=hidden name=login value="">
<input type=hidden name="confUrl" value="">
<input type=hidden name=".done" value="">
<input type=hidden name="auctionAcceptsPayPal" value="0">
<input type=hidden name="Condition" value="">
<input type=hidden name="custtags" value="">
<input type=hidden name="attributes" value="">
<input type=hidden name="Quantity" value="">
<input type=hidden name="StartPrice" value="0.01">
<input type=hidden name="Duration" value="10">
<input type=hidden name="BidCount" value="0">
<input type=hidden name="enablePP" value="0">
<input type=hidden name="intlOK" value="">

<input type=hidden name="ypc" value="0">
<input type=hidden name="ymo" value="0">
<input type=hidden name="ycc" value="0">
<input type=hidden name="yes" value="0">
<input type=hidden name="shipping" value="">
<input type=hidden name="shiptime" value="">
<input type=hidden name="BidOrBuyPrice" value="">
<input type=hidden name="shipPrice" value="0">
<input type=hidden name="denomination" value="">
<input type=hidden name="ReservePrice" value="">
<input type=hidden name="StartMonth" value="3">
<input type=hidden name="StartDay" value="15">
<input type=hidden name="StartHour" value="0">
<input type=hidden name="ClosingTime" value="1">
<input type=hidden name="testLabel" value="">
<input type=hidden name="minBidRating" value="">
<input type=hidden name="AutoExtension" value="">
<input type=hidden name="CloseEarly" value="">
<input type=hidden name="numResubmit" value="0">

<input type=hidden name="sellerOkHash" value="">
<input type=hidden name="sellerQuality" value="">
<input type=hidden name="finalValueFee" value="">
<input type=hidden name="Description" value="">
<input type=hidden name="Title" value="">
<input type=hidden name="aucspaceid" value="2092034350">
<input type=hidden name="mqRating" value="10">
<input type=hidden name="mqDays" value="60">
<input type=hidden name="allowNormalShowcase" value="1">
<input type=hidden name="partnum_type" value="">
<input type=hidden name="quicksubmit" value="">
<input type=hidden name="shopintHelpUrl" value="http://help.yahoo.com/help/us/auct/asell/asell-72.html">
<input type=hidden name="shopCatBooks" value="1">
<input type=hidden name="haveitem" value="1">
<input type=hidden name="OrigPrice" value="">
<input type=hidden name="ShipPrice" value="">
<input type=hidden name="ReserveAuction" value="yes">
<input type=hidden name="enableSavePrefs" value="">
<input type=hidden name="prefs2" value="">

<INPUT TYPE=submit VALUE="Edit Auction Info" style="height: 22px">
</FORM>

<FORM ACTION="http://sg.auctions.yahoo.com/sg/show/confirm" METHOD="post">

<input type=hidden name="category" value="26395">
<input type=hidden name="singlesubmit" value="1">
<input type=hidden name="thumbnailwidth" value="">
<input type=hidden name="thumbnailid" value="">
<input type=hidden name="ImageServer" value="">
<input type=hidden name="OldCollection" value="000005274912">
<input type=hidden name="auction_server" value="">
<input type=hidden name="uploadserver" value="">
<input type=hidden name="Image1" value="">
<input type=hidden name="Image2" value="">
<input type=hidden name="Image3" value="">
<input type=hidden name="Thumb1" value="">
<input type=hidden name="Thumb2" value="">
<input type=hidden name="Thumb3" value="">
<input type=hidden name="Deleted1" value="">
<input type=hidden name="Deleted2" value="">
<input type=hidden name="Deleted3" value="">
<input type=hidden name="catz" value="">
<input type=hidden name="part" value="">

<input type=hidden name="aID" value="">
<input type=hidden name="oldAID" value="">
<input type=hidden name="mode" value="">
<input type=hidden name="md5" value="">
<input type=hidden name="tos" value="">
<input type=hidden name=".abs" value="">
<input type=hidden name=".ts" value="1173978490">
<input type=hidden name=".sig" value="">
<input type=hidden name=crumb value="">
<input type=hidden name=login value="">
<input type=hidden name="confUrl" value="">
<input type=hidden name=".done" value="">
<input type=hidden name="auctionAcceptsPayPal" value="0">
<input type=hidden name="Condition" value="">
<input type=hidden name="custtags" value="">
<input type=hidden name="attributes" value="">
<input type=hidden name="Quantity" value="">
<input type=hidden name="StartPrice" value="0.01">
<input type=hidden name="Duration" value="10">
<input type=hidden name="BidCount" value="0">
<input type=hidden name="enablePP" value="0">
<input type=hidden name="intlOK" value="">

<input type=hidden name="ypc" value="0">
<input type=hidden name="ymo" value="0">
<input type=hidden name="ycc" value="0">
<input type=hidden name="yes" value="0">
<input type=hidden name="shipping" value="">
<input type=hidden name="shiptime" value="">
<input type=hidden name="BidOrBuyPrice" value="">
<input type=hidden name="shipPrice" value="0">
<input type=hidden name="denomination" value="">
<input type=hidden name="ReservePrice" value="">
<input type=hidden name="StartMonth" value="3">
<input type=hidden name="StartDay" value="15">
<input type=hidden name="StartHour" value="0">
<input type=hidden name="ClosingTime" value="1">
<input type=hidden name="testLabel" value="">
<input type=hidden name="minBidRating" value="">
<input type=hidden name="AutoExtension" value="">
<input type=hidden name="CloseEarly" value="">
<input type=hidden name="numResubmit" value="0">

<input type=hidden name="sellerOkHash" value="">
<input type=hidden name="sellerQuality" value="">
<input type=hidden name="finalValueFee" value="">
<input type=hidden name="Description" value="">
<input type=hidden name="Title" value="">
<input type=hidden name="aucspaceid" value="2092034350">
<input type=hidden name="mqRating" value="10">
<input type=hidden name="mqDays" value="60">
<input type=hidden name="allowNormalShowcase" value="1">
<input type=hidden name="partnum_type" value="">
<input type=hidden name="quicksubmit" value="">
<input type=hidden name="shopintHelpUrl" value="http://help.yahoo.com/help/us/auct/asell/asell-72.html">
<input type=hidden name="shopCatBooks" value="1">
<input type=hidden name="haveitem" value="1">
<input type=hidden name="OrigPrice" value="">
<input type=hidden name="ShipPrice" value="">
<input type=hidden name="ReserveAuction" value="yes">
<input type=hidden name="enableSavePrefs" value="">
<input type=hidden name="prefs2" value="">

<INPUT TYPE=submit VALUE="Submit Auction" style="height: 22px">
</FORM>

</td>
</tr>
</table>
<p>
</body>
</html>
<!-- SpaceID=0 robot -->
<script language="javascript" src="http://us.js1.yimg.com/us.yimg.com/lib/shop/yshp_dom20050121.js" type="text/javascript"></script>
<script language="javascript" src="http://us.js1.yimg.com/us.yimg.com/lib/shop/yshp_tabs20050121.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
<!--
var tempX = new Array(tabs_init());
//-->
</script>
<script src="http://us.js2.yimg.com/us.js.yimg.com/lib/shop/yshp_dom_200509271701.js" type="text/javascript"></script>
<script src="http://us.i1.yimg.com/auctions.yahoo.com/auc.js" type="text/javascript"></script>

<script language='Javascript' type='text/javascript'>
<!--
function startTimers()
{
 document.getElementById('auctime0').onclick(); 
} 
//-->
</script>

Share this post


Link to post
Share on other sites



to do the loops, you will want a nested for loop

$startday = 1

For $startday = $startday to 31 step 1

for $ClosingTime = 0 to 23

; code here to run for start day

Next

Next

im not 100% sure, but i think its what you need, this way, it will do the $Closing time loop from 0 to 23 for EACH loop of $startday

for more info, have a loop at Loops in the helpfile (i dont think the code i provided is 100% its just a rough example)

Share this post


Link to post
Share on other sites

have a look at loops in the help file, the example that is given already should help you out with this.

basically, a FOR loop will continue to loop, until a certain condition is met:

; start the loop

FOR $i = 1 to 24 step 1

; code to run inside the loop ie:

MsgBox(0, "Loop", "Loop number "&$i)

; request the next stage of the loop to run

NEXT

This will run the code inside the loop until the variable $i is equal to 24, you can NEST loop statements (so you can have another loop run INSIDE the current one) as i previously listed.

Start off by getting getting something like the above working... and then get it working with a nested loop, then have a look at adding your code in.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

#include <IE.au3>

$s_StartMonth = "04"; Loop from 03 to 04
$s_StartDay = "1"; Loop from 1 to 31
$s_ClosingTime = 0; Loop from 0 to 23 

For $e = 1 to 3
    
FOR $i = 1 to 3

     $s_URL = "http://sg.auctions.yahoo.com/sg/show/submit?category=2092052828&a=b"
     $o_IE = _IECreate($s_URL)
     $o_Form = _IEFormGetObjByName($o_IE, "AUC_SUBMIT")
     $o_StartMonth = _IEFormElementGetObjByName($o_Form, "StartMonth")
     $o_StartDay = _IEFormElementGetObjByName($o_Form, "StartDay")
     $o_ClosingTime = _IEFormElementGetObjByName($o_Form, "ClosingTime") 
    
     _IEFormElementSetValue($o_StartMonth, $s_StartMonth)
     _IEFormElementSetValue($o_StartDay, $s_StartDay)
     _IEFormElementOptionselect($o_ClosingTime, $s_ClosingTime)

     
     $o_submitform = _IEFormSubmit($o_Form)
     
    ;how to make it submit another time in the next page? Cannot find its form

     
     $s_ClosingTime = $s_ClosingTime + 1
     
     _IEQuit ($o_IE)
     

NEXT

$s_ClosingTime = 0
$s_StartDay = $s_StartDay + 1

Next

Have done this script

However I am facing 2 problems.

1) When it submits up the first time, it goes into another webpage where I have to CONFIRM the submission. How do I do a $_ieformsubmit in the second page??

2) I want to attach the page to any of the exisiting webpage but it does not seem to be able to attach and keeps creating new pages.

Thank you

Edited by tradertt

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

2) I want to attach the page to any of the exisiting webpage but it does not seem to be able to attach and keeps creating new pages.

In source below I took the IEcreate() and used IEnavigate to get back to the start page with the same object.

1) When it submits up the first time, it goes into another webpage where I have to CONFIRM the submission. How do I do a $_ieformsubmit in the second page??

You will have to call the form by its ID not its name .....in this case '2' . This is from the page 'document.forms.item(2).childNodes.item(158)'

#include <IE.au3>

$s_StartMonth = "04"; Loop from 03 to 04
$s_StartDay = "1"; Loop from 1 to 31
$s_ClosingTime = 0; Loop from 0 to 23 
    
    ;Take the create out of the loop so it wont start a new page everytime a loop starts
     $s_URL = "http://sg.auctions.yahoo.com/sg/show/submit?category=2092052828&a=b"
     $o_IE = _IECreate($s_URL)

For $e = 1 to 3
    For $i = 1 to 3

     $o_Form = _IEFormGetObjByName($o_IE, "AUC_SUBMIT")
     $o_StartMonth = _IEFormElementGetObjByName($o_Form, "StartMonth")
     $o_StartDay = _IEFormElementGetObjByName($o_Form, "StartDay")
     $o_ClosingTime = _IEFormElementGetObjByName($o_Form, "ClosingTime") 
    
     _IEFormElementSetValue($o_StartMonth, $s_StartMonth)
     _IEFormElementSetValue($o_StartDay, $s_StartDay)
     _IEFormElementOptionselect($o_ClosingTime, $s_ClosingTime)
     
     $o_submitform = _IEFormSubmit($o_Form)

      ;UNTESTED submit of second page
          sleep(3000)
      $oform = _IEFormGetObjByName($o_IE, 2)
      $o_submitform = _IEFormSubmit($oform)

     $s_ClosingTime += 1
      ;Navigate back to the start page
     _IENavigate($o_IE,$s_URL)
    Next

$s_ClosingTime = 0
$s_StartDay +=  1
Next
Edited by Hasher

Firefox's secret is the same as Jessica Simpson's: its effortless, glamorous style is the result of — shhh — extensions!

Share this post


Link to post
Share on other sites

THank you. YOu have helped me solve the part of creating it in the orginal browser. However, what did you mean by:

You will have to call the form by its ID not its name .....in this case '2' . This is from the page 'document.forms.item(2).childNodes.item(158)'

Don't quite understand this portion. HOw do I intergrate it into the script?

Share this post


Link to post
Share on other sites

THe code below should give you some idea.... _IEFormGetObjByName($o_IE, 2) <--- 2 refers to the form in the page....each form has its own ID even if it doesnt get named.

;UNTESTED submit of second page
          sleep(3000)
      $oform = _IEFormGetObjByName($o_IE, 2)
      $o_submitform = _IEFormSubmit($oform)

Firefox's secret is the same as Jessica Simpson's: its effortless, glamorous style is the result of — shhh — extensions!

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