Jump to content

Need help trying to automate a few clicks on a websiteI need your help with a Autohotkey script. I have an existing script, but the site I'm using it


 Share

Recommended Posts

I need help creating a script. Any help would be greatly appreciated.

I'm trying to automate a script to help me click on a few things on a site. I can't give you direct access to the site for various reasons, but I've included multiple examples of the html from the website here:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>
    
</title>
    <link href="../../../App_Themes/Default/css/form.css" type="text/css" rel="stylesheet" /><link href="../../../App_Themes/Default/css/grid.css" 

type="text/css" rel="stylesheet" /><link href="../../../App_Themes/Default/css/new_style.css" type="text/css" rel="stylesheet" /><link 

href="../../../App_Themes/Default/css/temp_i.css" type="text/css" rel="stylesheet" /><link href="../../../App_Themes/Default/css/temp_ivan.css" 

type="text/css" rel="stylesheet" /></head>
<body>
<div class="wrapper">
<form name="aspnetForm" method="post" action="/(X(1)A(SNrqqjdvygEkAAAANTI4ODI0ZDgtZmE4ZC00MDczLWE3ZmEtMDFlZTQ3MTNjZDdlVKiHT8xCaiT_FpQCvVnVYEdbrnE1)S

(v4cftg55lo2lagnp22pqkkan)F(gcRdbaEXbgGcGEKz-

fiFMgG7oJ5TtMJesAB89idy31j2esGpxW3MXUNroZubk3MkInr2iS3qMFMj3H4dm3oLqBEjW6tvzC0izlR85PGvaHc1))/SECURE/plus/pfac/QueuePage.aspx?

AspxAutoDetectCookieSupport=1&amp;" id="aspnetForm">
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" 

value="/wEPDwUKMTE2ODgzMDA4NQ8WAh4TRGlzYWJsZUJyb3dzZXJDYWNoZWgWAmYPZBYCAgMPZBYMAgMPFgIeB1Zpc2libGVoZAILDxYCHwFnZAINDxYCHwFoZAIPDxYCHwFnZAIRDw8WBB4IQ3NzQ2xhc3

MFFG1lbnVfaXRlbV9zZWxlY3RlZF8xHgRfIVNCAgJkZAIXD2QWBAIDDzwrAAsBAA8WCB4JUGFnZUNvdW50AgEeCERhdGFLZXlzFgAeC18hSXRlbUNvdW50AgEeFV8hRGF0YVNvdXJjZUl0ZW1Db3VudAIBZBY

CZg9kFgICAg9kFhJmD2QWAgIBDw8WAh4PQ29tbWFuZEFyZ3VtZW50BQU5NjM3NGRkAgEPDxYCHgRUZXh0BQExZGQCAg9kFgICAQ8PFgIfCQUFOTYzNzRkZAIDDw8WAh8JBQtUZW1wbGUgQ2l0eWRkAgQPDxYC

HwkFC0xvcyBBbmdlbGVzZGQCBQ8PFgIfCQUFOTE3ODBkZAIGDw8WAh8JBQckMzI1LjAwZGQCBw9kFgICAQ8WAh8GAgEWAgIBD2QWAmYPFQEOMTAwNC83MCAoVVJBUilkAggPZBYCAgEPEA8WAh4LXyFEYXRhQ

m91bmRnZGRkZAIFDxYCHwFoFgICAQ8PFgQfBAIBHwFoZBYCZg9kFgICAQ88KwAJAQAPFgYfBRYAHwYCAx4NU2VsZWN0ZWRJbmRleAIBZBYKZg9kFgQCAQ8PFgIeB0VuYWJsZWRoFgIeBXN0eWxlBRV0ZXh0LW

RlY29yYXRpb246bm9uZTtkAgMPDxYCHwxoFgIfDQUVdGV4dC1kZWNvcmF0aW9uOm5vbmU7ZAIBDw8WAh8BaGQWAgIBDw8WBh8IBQQgLi4uHwkFBCAuLi4eB1Rvb2xUaXAFDFBhZ2VzIDEgLSAxMGRkAgIPZBY

CAgEPDxYEHwgFATEfCQUBMRYCHw0FHWNvbG9yOmJsYWNrO2ZvbnQtd2VpZ2h0OmJvbGQ7ZAIDDw8WAh8BaGQWAgIBDw8WBh8IBQQuLi4gHwkFBC4uLiAfDgUMUGFnZXMgLTkgLSAxZGQCBA9kFgQCAQ8PZBYC

Hw0FFXRleHQtZGVjb3JhdGlvbjpub25lO2QCAw8PZBYCHw0FFXRleHQtZGVjb3JhdGlvbjpub25lO2Rk/io4SDl+YMpw5JZO9t02g8M+g+0=" />
</div>

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['aspnetForm'];
if (!theForm) {
    theForm = document.aspnetForm;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</script>


  <div class="header">
    <div class="logo"></div>
    <div class="logo_title"></div>
    <div class="header_strip_wrapper">
      <div class="menu_top">
        
            <div class="menu_top_item"><a id="ctl00_hl_logout" href="../../../LogOut.aspx">LOG OUT</a></div>      
        
                
        <div class="menu_top_item"><a id="ctl00_hl_about" href="../../../About.aspx">ABOUT US</a></div>
        <div class="menu_top_item"><a id="ctl00_hl_help" href="../../../Help.aspx">HELP</a></div>
        <div class="menu_top_item"><a id="ctl00_hl_referencecenter" href="../../../ReferenceCenter.aspx">REFERENCE CENTER</a></div>
        
            <div class="menu_top_item"><a id="ctl00_lb_user_account" href="javascript:__doPostBack('ctl00$lb_user_account','')">MY ACCOUNT</a></div>
        
        
        
            <div class="menu_top_item"><a id="ctl00_hl_home" href="QueuePage.aspx">HOME</a></div>        
        
      </div>      
      <div class="menu_wrap">
        <div id="ctl00_mi1" class="menu_item_selected_1" class="menu_item">
    <a id="ctl00_lnk_queue" href="javascript:__doPostBack('ctl00$lnk_queue','')">AVAILABLE ORDERS</a>
</div>
        <div id="ctl00_mi2" class="menu_item">
    <a id="ctl00_lnk_my_pipeline" href="javascript:__doPostBack('ctl00$lnk_my_pipeline','')">MY PIPELINE</a>
</div>
        <div id="ctl00_mi3" class="menu_item">
    <a id="ctl00_lnk_orders_history" href="javascript:__doPostBack('ctl00$lnk_orders_history','')">ORDERS HISTORY</a>
</div> 
      </div>
    </div>
  </div> 
<!--middle content frame begin-->
  <div class="mid_content">
  

                        
              
<div class="mid_wrap_reg_queue">
    <div class="mid_frame">
        <div class="mid_frame_top">
          <div class="mid_frame_top_l"></div>
          <div class="mid_frame_top_r"></div>
        </div>
        <div class="mid_frame_mid_l">
          <div class="mid_frame_mid_r">
            <div class="mid_content_form">
<div class="form_title">Available Orders <br />
              Queue</div>
              <div class="attent_wrap_reg_queue">
                <div class="attent_frame">
                  <div class="attent_frame_top">
                    <div class="attent_frame_top_l"></div>
                    <div class="attent_frame_top_r"></div>
                  </div>
                  <div class="attent_frame_mid_l">
                    <div class="attent_frame_mid_r">
                      <div class="attent_content_form">
                        <div class="attent_sign_1"></div>
                        Please select orders that you would like to complete.<br />
Note that we strive for all orders to be completed within 96 hours.<br />
Do not select an order if you do not think you can commit this standard. </div>
                    </div>
                  </div>
                  <div class="attent_frame_bottom">
                    <div class="attent_frame_bottom_l"></div>
                    <div class="attent_frame_bottom_r"></div>
                  </div>
                </div>
              </div>
                
              <div class="div_clear"></div>
    </div>
    </div>

<div class="mid_frame_mid_l">
    <div class="mid_frame_mid_r">
        <div class="grid">

            

                            
            
                    <table class="grid_relative" cellspacing="0" cellpadding="0" border="0" id="ctl00_cph_content_dgOrders" 

style="width:100%;border-collapse:collapse;">
    <tr>
        <th class="th_left" scope="col">Min In Q</th><th scope="col" style="white-space:nowrap;">Order #</th><th scope="col">City</th><th 

scope="col">County</th><th scope="col">Zip</th><th scope="col">Comp</th><th scope="col">Product Type</th><th scope="col" style="width:90px;">Assign to 

Me</th>
    </tr><tr>
        <td class="td_left">1</td><td style="white-space:nowrap;">
                                    <span id="ctl00_cph_content_dgOrders_ctl03_lbl_order_id">96374</span>
                                </td><td style="white-space:nowrap;">Temple City</td><td style="white-space:nowrap;">Los 

Angeles</td><td style="white-space:nowrap;">91780</td><td>$5.00</td><td>
                                    &nbsp;
                                    
                                            <ul>                                                    
                                        
                                            <li>
                                                1004
                                            </li>
                                        
                                            </ul>
                                                                                                                           
                                </td><td>
                                    <span id="ctl00_cph_content_dgOrders_ctl03_rbl"><input 

id="ctl00_cph_content_dgOrders_ctl03_rbl_0" type="radio" name="ctl00$cph_content$dgOrders$ctl03$rbl" value="0" onclick="var postback = confirm('The order 

will be taken off the list of available orders for you.'); if (postback) { javascript:__doPostBack('ctl00$cph_content$dgOrders$ctl03$lb','96374') } else { 

this.checked = false; } ;" /><label for="ctl00_cph_content_dgOrders_ctl03_rbl_0">No</label><input id="ctl00_cph_content_dgOrders_ctl03_rbl_1" type="radio" 

name="ctl00$cph_content$dgOrders$ctl03$rbl" value="1" onclick="var postback = confirm('Are you sure you want to assign this order to you?'); if (postback) { 

javascript:__doPostBack('ctl00$cph_content$dgOrders$ctl03$lb','96374') } else { this.checked = false; };" /><label 

for="ctl00_cph_content_dgOrders_ctl03_rbl_1">Yes</label></span>
                                </td>
    </tr>
</table>        
            <div class="pager_wrapper">
            
            </div>
        </div>
    </div>
</div>                                          
                    
    </div>
</div>
                

</div>
     
              


    
    </div>
    </form>
    <div class="push"></div>
  
</div>


<!--middle content frame end-->
<div class="footer">
  <div class="footer_strip">
    <div class="footer_title"></div>
  </div>
  <div class="footer_strip_angl"></div>
  <div class="footer_title2"></div>
  
</div>
</body>
</html>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>

</title>
    <link href="../../../App_Themes/Default/css/form.css" type="text/css" rel="stylesheet" /><link href="../../../App_Themes/Default/css/grid.css" 

type="text/css" rel="stylesheet" /><link href="../../../App_Themes/Default/css/new_style.css" type="text/css" rel="stylesheet" /><link 

href="../../../App_Themes/Default/css/temp_i.css" type="text/css" rel="stylesheet" /><link href="../../../App_Themes/Default/css/temp_ivan.css" 

type="text/css" rel="stylesheet" /></head>
<body>
<div class="wrapper">
<form name="aspnetForm" method="post" action="QueuePage.aspx" id="aspnetForm">
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" 

value="/wEPDwUKMTE2ODgzMDA4NQ8WAh4TRGlzYWJsZUJyb3dzZXJDYWNoZWgWAmYPZBYCAgMPZBYMAgMPFgIeB1Zpc2libGVoZAILDxYCHwFnZAINDxYCHwFoZAIPDxYCHwFnZAIRDw8WBB4IQ3NzQ2xhc3

MFFG1lbnVfaXRlbV9zZWxlY3RlZF8xHgRfIVNCAgJkZAIXD2QWBAIDDzwrAAsBAA8WCB4JUGFnZUNvdW50AgEeCERhdGFLZXlzFgAeC18hSXRlbUNvdW50AgEeFV8hRGF0YVNvdXJjZUl0ZW1Db3VudAIBZBY

CZg9kFgICAg9kFhJmD2QWAgIBDw8WAh4PQ29tbWFuZEFyZ3VtZW50BQYxMzY4NDZkZAIBDw8WAh4EVGV4dAUBMmRkAgIPZBYCAgEPDxYCHwkFBjEzNjg0NmRkAgMPDxYCHwkFBlR1c3RpbmRkAgQPDxYCHwkF

Bk9yYW5nZWRkAgUPDxYCHwkFBTkyNzgwZGQCBg8PFgIfCQUHJDMyNS4wMGRkAgcPZBYCAgEPFgIfBgIBFgICAQ9kFgJmDxUBDjEwMDQvNzAgKFVSQVIpZAIID2QWAgIBDxAPFgIeC18hRGF0YUJvdW5kZ2RkZ

GQCBQ8WAh8BaBYCAgEPDxYEHwQCAR8BaGQWAmYPZBYCAgEPPCsACQEADxYGHwUWAB8GAgMeDVNlbGVjdGVkSW5kZXgCAWQWCmYPZBYEAgEPDxYCHgdFbmFibGVkaBYCHgVzdHlsZQUVdGV4dC1kZWNvcmF0aW

9uOm5vbmU7ZAIDDw8WAh8MaBYCHw0FFXRleHQtZGVjb3JhdGlvbjpub25lO2QCAQ8PFgIfAWhkFgICAQ8PFgYfCAUEIC4uLh8JBQQgLi4uHgdUb29sVGlwBQxQYWdlcyAxIC0gMTBkZAICD2QWAgIBDw8WBB8

IBQExHwkFATEWAh8NBR1jb2xvcjpibGFjaztmb250LXdlaWdodDpib2xkO2QCAw8PFgIfAWhkFgICAQ8PFgYfCAUELi4uIB8JBQQuLi4gHw4FDFBhZ2VzIC05IC0gMWRkAgQPZBYEAgEPD2QWAh8NBRV0ZXh0

LWRlY29yYXRpb246bm9uZTtkAgMPD2QWAh8NBRV0ZXh0LWRlY29yYXRpb246bm9uZTtkZBrnadiads6w8263eczFoTg8Li5z" />
</div>
 
<script type="text/javascript"> 
//<![CDATA[
var theForm = document.forms['aspnetForm'];
if (!theForm) {
    theForm = document.aspnetForm;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</script>
 
 
  <div class="header">
    <div class="logo"></div>
    <div class="logo_title"></div>
    <div class="header_strip_wrapper">
      <div class="menu_top">
        
            <div class="menu_top_item"><a id="ctl00_hl_logout" href="../../../LogOut.aspx">LOG OUT</a></div>      
        
                
        <div class="menu_top_item"><a id="ctl00_hl_about" href="../../../About.aspx">ABOUT US</a></div>
        <div class="menu_top_item"><a id="ctl00_hl_help" href="../../../Help.aspx">HELP</a></div>
        <div class="menu_top_item"><a id="ctl00_hl_referencecenter" href="../../../ReferenceCenter.aspx">REFERENCE CENTER</a></div>
        
            <div class="menu_top_item"><a id="ctl00_lb_user_account" href="javascript:__doPostBack('ctl00$lb_user_account','')">MY ACCOUNT</a></div>
        
        
        
            <div class="menu_top_item"><a id="ctl00_hl_home" href="QueuePage.aspx">HOME</a></div>        
        
      </div>      
      <div class="menu_wrap">
        <div id="ctl00_mi1" class="menu_item_selected_1" class="menu_item">
    <a id="ctl00_lnk_queue" href="javascript:__doPostBack('ctl00$lnk_queue','')">AVAILABLE ORDERS</a>
</div>
        <div id="ctl00_mi2" class="menu_item">
    <a id="ctl00_lnk_my_pipeline" href="javascript:__doPostBack('ctl00$lnk_my_pipeline','')">MY PIPELINE</a>
</div>
        <div id="ctl00_mi3" class="menu_item">
    <a id="ctl00_lnk_orders_history" href="javascript:__doPostBack('ctl00$lnk_orders_history','')">ORDERS HISTORY</a>
</div> 
      </div>
    </div>
  </div> 
<!--middle content frame begin-->
  <div class="mid_content">
  
 
                        
              
<div class="mid_wrap_reg_queue">
    <div class="mid_frame">
        <div class="mid_frame_top">
          <div class="mid_frame_top_l"></div>
          <div class="mid_frame_top_r"></div>
        </div>
        <div class="mid_frame_mid_l">
          <div class="mid_frame_mid_r">
            <div class="mid_content_form">
<div class="form_title">Available Orders <br />
              Queue</div>
              <div class="attent_wrap_reg_queue">
                <div class="attent_frame">
                  <div class="attent_frame_top">
                    <div class="attent_frame_top_l"></div>
                    <div class="attent_frame_top_r"></div>
                  </div>
                  <div class="attent_frame_mid_l">
                    <div class="attent_frame_mid_r">
                      <div class="attent_content_form">
                        <div class="attent_sign_1"></div>
                        Please select orders that you would like to complete.<br />
Note that we strive for all orders to be completed within 96 hours.<br />
Do not select an order if you do not think you can commit this standard. </div>
                    </div>
                  </div>
                  <div class="attent_frame_bottom">
                    <div class="attent_frame_bottom_l"></div>
                    <div class="attent_frame_bottom_r"></div>
                  </div>
                </div>
              </div>
                
              <div class="div_clear"></div>
    </div>
    </div>
 
<div class="mid_frame_mid_l">
    <div class="mid_frame_mid_r">
        <div class="grid">
 
            
 
                            
            
                    <table class="grid_relative" cellspacing="0" cellpadding="0" border="0" id="ctl00_cph_content_dgOrders" 

style="width:100%;border-collapse:collapse;">
    <tr>
        <th class="th_left" scope="col">Min In Q</th><th scope="col" style="white-space:nowrap;">Order #</th><th scope="col">City</th><th 

scope="col">County</th><th scope="col">Zip</th><th scope="col">Comp</th><th scope="col">Product Type</th><th scope="col" style="width:90px;">Assign to 

Me</th>
    </tr><tr>
        <td class="td_left">2</td><td style="white-space:nowrap;">
                                    <span id="ctl00_cph_content_dgOrders_ctl03_lbl_order_id">136846</span>
                                </td><td style="white-space:nowrap;">Oneida</td><td style="white-

space:nowrap;">Oneida</td><td style="white-space:nowrap;">13421</td><td>$5.00</td><td>
                                    &nbsp;
                                    
                                            <ul>                                                    
                                        
                                            <li>
                                                1004
                                            </li>
                                        
                                            </ul>
                                                                                                                           
                                </td><td>
                                    <span id="ctl00_cph_content_dgOrders_ctl03_rbl"><input 

id="ctl00_cph_content_dgOrders_ctl03_rbl_0" type="radio" name="ctl00$cph_content$dgOrders$ctl03$rbl" value="0" onclick="var postback = confirm('The order 

will be taken off the list of available orders for you.'); if (postback) { javascript:__doPostBack('ctl00$cph_content$dgOrders$ctl03$lb','136846') } else { 

this.checked = false; } ;" /><label for="ctl00_cph_content_dgOrders_ctl03_rbl_0">No</label><input id="ctl00_cph_content_dgOrders_ctl03_rbl_1" type="radio" 

name="ctl00$cph_content$dgOrders$ctl03$rbl" value="1" onclick="var postback = confirm('Are you sure you want to assign this order to you?'); if (postback) { 

javascript:__doPostBack('ctl00$cph_content$dgOrders$ctl03$lb','136846') } else { this.checked = false; };" /><label 

for="ctl00_cph_content_dgOrders_ctl03_rbl_1">Yes</label></span>
                                </td>
    </tr>
</table>        
            <div class="pager_wrapper">
            
            </div>
        </div>
    </div>
</div>                                          
                    
    </div>
</div>
                
 
</div>
     
              
 
 
    
    </div>
    </form>
    <div class="push"></div>
  
</div>
 
 
<!--middle content frame end-->
<div class="footer">
  <div class="footer_strip">
    <div class="footer_title"></div>
  </div>
  <div class="footer_strip_angl"></div>
  <div class="footer_title2"></div>
  
</div>
</body>
</html>

^r:: count = 3 ; to manually terminate loop

^d::
FormatTime date, , yyyyMMdd
if (date > 20100205) {
   MsgBox, 48, Program Expired, 
   Return
} 
count = 0
MsgBox, Accepting 3 orders, refreshing 20k times. All Property types.
COM_Init() ; requires COM.ahk Library
pwd := GetWebBrowser() ; get pointer to IE COM object
webpage := COM_Invoke(pwd, "document.location.href") ; get webpage url
ControlGet, hIESvr, hWnd, , Internet Explorer_Server1, A ; get IE window handle (borrowed from Sean's IEReady() function)
COM_Invoke(pwd, "document.location.reload", "True") ; reload webpage
IEReady(hIESvr) ; wait for webpage to be fully loaded
loop 20000
{   if count = 3 ; if we have utilized the next if statement 5 times, or pressed ^r
      break
   if COM_Invoke(pwd, "document.getElementById[ctl00_cph_content_dgOrders_ctl03_rbl_1]") ; if the webpage element exists
   
   { Order := COM_Invoke(pwd, "document.all.ctl00_cph_content_dgOrders_ctl03_lbl_order_id.innerText") ; new line
   COM_Invoke(pwd, "Navigate", "javascript:__doPostBack('ctl00$cph_content$dgOrders$ctl03$lb','" Order "')") ; select yes
   
      IEReady(hIESvr) ; wait for webpage to be fully loaded
      COM_Invoke(pwd, "Navigate", webpage) ; return to original webpage
      IEReady(hIESvr) ; wait for webpage to be fully loaded
      count++
      continue
   }
   COM_Invoke(pwd, "document.location.reload", "True") ; reload webpage
   IEReady(hIESvr) ; wait for webpage to be fully loaded
}
Msgbox, 3 orders accepted or you cancelled the script
COM_Release(pwd)
COM_Term()
return


GetWebBrowser() ; written by Sean
{
   ControlGet, hIESvr, hWnd, , Internet Explorer_Server1, ahk_class IEFrame
   If Not   hIESvr
      Return
   DllCall("SendMessageTimeout", "Uint", hIESvr, "Uint", DllCall("RegisterWindowMessage", "str", "WM_HTML_GETOBJECT"), "Uint", 0, "Uint", 0, "Uint", 2, "Uint", 1000, "UintP", lResult)
   DllCall("oleacc\ObjectFromLresult", "Uint", lResult, "Uint", COM_GUID4String(IID_IHTMLDocument2,"{332C4425-26CB-11D0-B483-00C04FD90119}"), "int", 0, "UintP", pdoc)
   IID_IWebBrowserApp := "{0002DF05-0000-0000-C000-000000000046}"
   pweb := COM_QueryService(pdoc,IID_IWebBrowserApp,IID_IWebBrowserApp)
   COM_Release(pdoc)
   Return   pweb
}

IEReady(hIESvr = 0)   { ; written by Sean
   If Not   hIESvr
   {
      Loop,   50
      {
         ControlGet, hIESvr, hWnd, , Internet Explorer_Server1, A ; ahk_class IEFrame
         If   hIESvr
            Break
         Else   Sleep 100
      }
      If Not   hIESvr
         Return   """Internet Explorer_Server"" Not Found."
   }
   Else
   {
      WinGetClass, sClass, ahk_id %hIESvr%
      If Not   sClass == "Internet Explorer_Server"
         Return   "The specified control is not ""Internet Explorer_Server""."
   }

   COM_Init()
   If   DllCall("SendMessageTimeout", "Uint", hIESvr, "Uint", DllCall("RegisterWindowMessage", "str", "WM_HTML_GETOBJECT"), "Uint", 0, "Uint", 0, "Uint", 2, "Uint", 1000, "UintP", lResult)
   &&   DllCall("oleacc\ObjectFromLresult", "Uint", lResult, "Uint", COM_GUID4String(IID_IHTMLDocument2,"{332C4425-26CB-11D0-B483-00C04FD90119}"), "int", 0, "UintP", pdoc)=0
   &&   pdoc && pweb:=COM_QueryService(pdoc,IID_IWebBrowserApp:="{0002DF05-0000-0000-C000-000000000046}")
      Loop
         If   COM_Invoke(pweb, "ReadyState") = 4
            Break
         Else   Sleep 500
   COM_Release(pdoc)
   COM_Release(pweb)
   COM_Term()
   Return   pweb ? "DONE!" : False
  } ;

What needs to happen is

1. Auto-refresh the page about once per second.

2. sometimes when the page is refreshed the "order" will appear. The order is the line near the bottom below the "Min in Q" showing "173406 Long Beach" in the first example. I need to click the "yes" box that appears on the right, then a dialog will pop up with an ok or cancel box, I'd need to click on on that to confirm the order.

3. then it would go back to refreshing itself and after successfully completing this 4 or 5 times, I'd like the script to kill itself so it doesn't run forever. (Generally this will take approximately 1 hour to complete this 5 times)

Link to comment
Share on other sites

It will let you fix the title, so fix it. And these are the AutoIT forums, not the AutoHotKey forums.

For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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