AutoHotkey Community

It is currently May 27th, 2012, 1:40 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 75 posts ]  Go to page Previous  1, 2, 3, 4, 5
Author Message
 Post subject:
PostPosted: September 21st, 2009, 1:00 am 
Offline

Joined: June 24th, 2009, 9:15 am
Posts: 35
I fixed that one, now I'm getting another.

I'm not sure what's happening:

Code:

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

^d::
FormatTime date, , yyyyMMdd
if (date > 20091001) {
   MsgBox, 48, Terminating Program, Current Date is after 10/1/2009
   Return
}
count = 0
COM_Init() ; requires COM.ahk Library
pwd := GetWebBrowser() ; get pointer to IE COM object
webpage := COM_Invoke(pwd, "document.location.href") ; get webpage url
Order := COM_Invoke(pwd, "document.all.ctl00_cph_content_dgOrders_ctl03_lbl_order_id.innerText") ; new line
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
   {   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, DONE!
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



Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 21st, 2009, 1:13 am 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
Code:
IEReady(hIESvr = 0)   { ; written by Sean
......
   Return   pweb ? "DONE!" : False
} ; <--- You need this ending bracket


Also, you could try replacing each instance of IEReady(hIESvr = 0) with:
Code:
While, COM_Invoke(pwd, "Busy")
   Sleep, 100
This would allow you to completely remove the IEReady() function definition and save 32 lines of code.

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Last edited by jethrow on September 21st, 2009, 8:07 am, edited 3 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 21st, 2009, 1:19 am 
Offline

Joined: June 24th, 2009, 9:15 am
Posts: 35
Thanks!

now:

Function name: "ctl00_cph_content_dgOrders_ctl03_lbl_order_id"
Error: Unknown Name
0x80020006


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 21st, 2009, 1:56 am 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
Well, if it's always the first row in the table, you could replace:
Code:
Order := COM_Invoke(pwd, "document.all.ctl00_cph_content_dgOrders_ctl03_lbl_order_id.innerText") ; new line

with
Code:
Order := COM_Invoke(pwd, "document.all.ctl00_cph_content_dgOrders.rows[1].cells[1].innerText") ; new line


Also, I would place this directly above the COM_Invoke(pwd, "Navigate", ... line (inside the if statement).

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 13th, 2010, 8:55 pm 
Offline

Joined: June 24th, 2009, 9:15 am
Posts: 35
Hello Gentleman, I need some help updated this script as I think the site may have changed.

This is what the script evolved into with your guy's help.

Code:
^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
  } ;



The problem i'm having is that when the script detects the order, its no longer automatically clicking the "yes" it just hangs there.

I've got three page code examples for you so you can see three different orders:

Code:
 
 
<!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>


Code:
                                                                 
                                                                   
                                                                     
                                             


<!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>



Code:
<!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/SpryCollapsiblePanel.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="/wEPDwUKMTE2ODgzMDA4NQ8WAh4TRGlzYWJsZUJyb3dzZXJDYWNoZWgWAmYPZBYCAg

MPZBYMAgMPFgIeB1Zpc2libGVoZAILDxYCHwFnZAINDxYCHwFoZAIPDxYCHwFnZAIRDw8WBB4

IQ3NzQ2xhc3MFFG1lbnVfaXRlbV9zZWxlY3RlZF8xHgRfIVNCAgJkZAIXD2QWBAIDDzwrAAsB

AA8WCB4JUGFnZUNvdW50AgEeCERhdGFLZXlzFgAeC18hSXRlbUNvdW50AgEeFV8hRGF0YVNvd

XJjZUl0ZW1Db3VudAIBZBYCZg9kFgICAg9kFhJmD2QWAgIBDw8WAh4PQ29tbWFuZEFyZ3VtZW

50BQYxNzM0MDZkZAIBDw8WAh4EVGV4dAUBMmRkAgIPZBYCAgEPDxYCHwkFBjE3MzQwNmRkAgM

PDxYCHwkFCkxvbmcgQmVhY2hkZAIEDw8WAh8JBQtMb3MgQW5nZWxlc2RkAgUPDxYCHwkFBTkw

ODA3ZGQCBg8PFgIfCQUHJDMyNS4wMGRkAgcPZBYCAgEPFgIfBgIBFgICAQ9kFgJmDxUBDjEwM

DQvNzAgKFVSQVIpZAIID2QWAgIBDxAPFgIeC18hRGF0YUJvdW5kZ2RkZGQCBQ8WAh8BaBYCAg

EPDxYEHwQCAR8BaGQWAmYPZBYCAgEPPCsACQEADxYGHwUWAB8GAgMeDVNlbGVjdGVkSW5kZXg

CAWQWCmYPZBYEAgEPDxYCHgdFbmFibGVkaBYCHgVzdHlsZQUVdGV4dC1kZWNvcmF0aW9uOm5v

bmU7ZAIDDw8WAh8MaBYCHw0FFXRleHQtZGVjb3JhdGlvbjpub25lO2QCAQ8PFgIfAWhkFgICA

Q8PFgYfCAUEIC4uLh8JBQQgLi4uHgdUb29sVGlwBQxQYWdlcyAxIC0gMTBkZAICD2QWAgIBDw

8WBB8IBQExHwkFATEWAh8NBR1jb2xvcjpibGFjaztmb250LXdlaWdodDpib2xkO2QCAw8PFgI

fAWhkFgICAQ8PFgYfCAUELi4uIB8JBQQuLi4gHw4FDFBhZ2VzIC05IC0gMWRkAgQPZBYEAgEP

D2QWAh8NBRV0ZXh0LWRlY29yYXRpb246bm9uZTtkAgMPD2QWAh8NBRV0ZXh0LWRlY29yYXRpb

246bm9uZTtkZFnoEUpawmOI9CRvWYDfMjMUsqzZ" />
</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">173406</span>
                                                      </td><td

style="white-space:nowrap;">Long Beach</td><td style="white-

space:nowrap;">Los Angeles</td><td style="white-

space:nowrap;">90807</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','173406') } 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','173406') } 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>
 
<!-- Developed by Stamen Petov and Kiril Kosturkov  -->
</div>
</body>
</html>



The last example is from today, I noticed they've added that last section. Is this affecting my script at all?

Thank you for your help in advance.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Any solution yet?
PostPosted: January 29th, 2010, 6:02 pm 
This is interesting. I am facing same issue now. But not in you area. Do you get any solution yet Marcus?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 30th, 2010, 7:10 am 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
marcusjb wrote:
The problem i'm having is that when the script detects the order, its no longer automatically clicking the "yes" it just hangs there.


Does this work? ( written for AHKL & COM_L )
Code:
^w::
   If Not pwb := IEGet()
      MsgBox, Could not access webpage
   Else If Not InStr( pwb.document.documentElement.outerHTML, "No orders found." ) {
      RegExMatch( pwb.document.all[ "ctl00_cph_content_dgOrders_ctl03_rbl_1" ].outerHTML, "javascript:.*\)", code )
      pwb.Navigate2( code )
   }
RETURN
   

IEGet( Name="" ) {
   IfEqual, Name,, WinGetTitle, Name, ahk_class IEFrame
   Name := (Name="New Tab") ? "about:Tabs" : RegExReplace( Name, " - (Windows|Microsoft) Internet Explorer" )
   Loop, % ( oShell := COM_CreateObject( "Shell.Application" ) ).Windows.Count
      If pweb := oShell.Windows( A_Index-1 )
         If ( pweb.LocationName=Name && InStr( pweb.FullName, "iexplore.exe" ) )
            Return, pweb
}

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 30th, 2010, 11:47 pm 
Offline

Joined: June 24th, 2009, 9:15 am
Posts: 35
Thanks Jethrow for working on this.

I get the error "No COM Dispatch Object"

is this the whole code or an addition to the old? I'm running it alone with AHKL and COML


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 31st, 2010, 4:28 am 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
marcusjb wrote:
I get the error "No COM Dispatch Object"

is this the whole code or an addition to the old?

This code by itself "should" select the "Yes" radio & bypass the pop-up confirmation if the window is active. If you're sure you're running AHKL & COM_L correctly, the next step would be to determine what exactly is causing the COM error. I would run this line-by-line, and possibly even object-call by object-call to determine the error. You can Invoke each object and see what is causing the COM error. For example:
Code:
^w::
   MsgBox, % IsObject( pwb := IEGet() ) ; test "web browser" object
   If Not pwb {
      MsgBox, Could not access webpage
      Return
   }
   MsgBox, % IsObject( pwb.document ) ; test "document" object
   MsgBox, % IsObject( pwb.document.documentElement ) ; test "documentElement" object
   If Not InStr( pwb.document.documentElement.outerHTML, "No orders found." ) { ; if there is an order
      MsgBox, % IsObject( pwb.document.all[ "ctl00_cph_content_dgOrders_ctl03_rbl_1" ] ) ; test "Yes Radio" object
      RegExMatch( pwb.document.all[ "ctl00_cph_content_dgOrders_ctl03_rbl_1" ].outerHTML, "javascript:.*\)", code )
      Clipboard := code
      MsgBox, % "You should be able to select the order by putting the following code in the URL Address bar and hitting enter.`nIt has been copied to the clipboard.`n`n" code
      pwb.Navigate2( code )
   }
RETURN


IEGet( Name="" ) {
   IfEqual, Name,, WinGetTitle, Name, ahk_class IEFrame
   Name := (Name="New Tab") ? "about:Tabs" : RegExReplace( Name, " - (Windows|Microsoft) Internet Explorer" )
   Loop, % ( oShell := COM_CreateObject( "Shell.Application" ) ).Windows.Count
      If pweb := oShell.Windows( A_Index-1 )
         If ( pweb.LocationName=Name && InStr( pweb.FullName, "iexplore.exe" ) )
            Return, pweb
}

All the MsgBox, % IsObject() calls should show 1.

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Last edited by jethrow on February 1st, 2010, 3:11 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 1st, 2010, 7:56 am 
Offline

Joined: June 24th, 2009, 9:15 am
Posts: 35
this is somewhat over my head.

do i need to change the tab title in the script?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 1st, 2010, 8:00 am 
Offline

Joined: June 24th, 2009, 9:15 am
Posts: 35
Also, there's a decent chance i'm not using AHKL properly. Should I have Autohotkey installed also?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 2nd, 2010, 4:39 am 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
marcusjb wrote:
this is somewhat over my head.
I disagree :wink: . The last two scripts I provided are the same, just the second contains a bunch of MsgBox's to test the object calls. Please note the javascript that is found by the RegExMatch() function - test this javascript to see if it selects the order for you.
marcusjb wrote:
do i need to change the tab title in the script?
Not sure what you mean here.
marcusjb wrote:
Also, there's a decent chance i'm not using AHKL properly. Should I have Autohotkey installed also?
Please, don't overcomplicate things :wink: . jk -- kinda. AutoHotkey.exe simply executes scripts. You really don't even need to install AHK. AutoHotkey_L.exe runs the same exact way. You can even drag-n-drop your scripts on the executable. For the COM library, you simply need a "Lib" folder in the same directory. Put the COM library in that folder - and make sure you use COM & COM_L with the correct AHK versions.

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 2nd, 2010, 9:43 am 
Offline

Joined: June 24th, 2009, 9:15 am
Posts: 35
The error says Function Name "Windows"

then I get the "could not access webpage" message

so I'm guessing the error is in the IEGet.

Now I don't know how to test it line by line, but I'm wondering if I need to change anything in this section since it indicates Name="new tab" which isn't the name of my window.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2010, 8:03 am 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
marcusjb wrote:
The error says Function Name "Windows"

Then the error is occuring in one of these two lines:
Code:
Loop, % ( oShell := COM_CreateObject( "Shell.Application" ) ).Windows.Count
   If pweb := oShell.Windows( A_Index-1 )

Are you sure you're using the COM_L version of the COM Standard Library? Make sure you don't have more that one version of the COM library in your "Lib" folder.

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2010, 9:42 am 
Offline

Joined: June 24th, 2009, 9:15 am
Posts: 35
I just redownloaded everything.

I've got a folder on my desktop call AHKL, it contains these things:

'Lib' folder
AutoHotkey_L.exe
script.ahk

Lib folder contains COM.ahk

which was downloaded from here:
http://www.autohotkey.net/~Sean/Lib/COM_L.zip

So all do is drop the scipt on the AutoHotkey_L.exe icon, then press ctrl-w to start the script andI'm getting that error.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 75 posts ]  Go to page Previous  1, 2, 3, 4, 5

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], chaosad, Yahoo [Bot] and 18 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group