Jump to content
Sign in to follow this  
empach

What is this popup called and how can I click on it??

Recommended Posts

Look again at post number 2.

It hints that the popup is the kind which blocks the current thread.

 

So if I called a function with the ControlClick part of the script in, this would click the popup??

or, would I need to launch another exe??

Edited by empach

Share this post


Link to post
Share on other sites

just put this:

Func click()
   winwait("File Download", "")
WinActivate("File Download", "")

ControlClick("File Download", "Save", 4427, "left")

ControlClick("File Download", "", "[CLASS:Button; INSTANCE:2]")

ControlClick("File Download", "Save", 4427, "left")
ControlClick("", "", "[CLASS:Button; INSTANCE:2]")

EndFunc

as a function just after I called the click button but now my script pauses on the winwait line ?????

Share this post


Link to post
Share on other sites

Because if the popup is in fact modal and is generated as a result of your script, then the script is blocked until the popup is closed.

If you want to see another example of this then write a script that clicks a button on a message box it creates itself.

MsgBox(0,0,0)

;Code here to click the ok button
Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

No, the script is not waiting, it is blocked/suspended.

Just get it up, and while it is there create a different script to close it, it will be simple, or very very difficult, if it's the latter then it's a security issue and the OS does not want such a security window to be automated at all.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

No, the script is not waiting, it is blocked/suspended.

Just get it up, and while it is there create a different script to close it, it will be simple, or very very difficult, if it's the latter then it's a security issue and the OS does not want such a security window to be automated at all.

 

Thank you!!

I have created a script that waits for the popup and controlclicks the buttons, with message boxes to let me know where it is, and then I run my GUI script at the same time.

It now moves on to the Save As screen, so I now need to manipulate that...

Any ideas how I can get the month and year from the HTML and rename the download before saving???

Thanks again!! :)

Edited by empach

Share this post


Link to post
Share on other sites

Do you not know it at this point?

 

The field is automatically filled with the latest slip available. I've tried IEGetObjByName and ID but I cant get it to return anything.

<fieldset>
        <div id="ctl00_PageBody_ValidationSummary1" class="warning" style="color:Red;display:none;">
 
</div>
        <br>
         
 
        <label for="Year">
            Year:</label>
        <select name="ctl00$PageBody$ddlYear" onchange="javascript:setTimeout('__doPostBack('ctl00$PageBody$ddlYear','')', 0)" id="ctl00_PageBody_ddlYear" class="text medium">
<option selected="selected" value="2013">2013</option>
 
</select>
        <span id="ctl00_PageBody_reqCounty" style="color:Red;visibility:hidden;">*</span>
        <br>
        <br>
        <label for="Month">
            Month:</label>
        <select name="ctl00$PageBody$ddlMonth" id="ctl00_PageBody_ddlMonth" class="text medium">
<option selected="selected" value="23.05.2013">May</option>
<option value="23.04.2013">April</option>
<option value="22.03.2013">March</option>
<option value="22.02.2013">February</option>
 
</select>
        <span id="ctl00_PageBody_RequiredFieldValidator1" style="color:Red;visibility:hidden;">*</span>
        <br>
        <br>
        <div class="divLogin">
             <input type="submit" name="ctl00$PageBody$btnShow" value="Show Payslip" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$PageBody$btnShow&quot;, &quot;&quot;, true, &quot;ValidationSummary1&quot;, &quot;&quot;, false, false))" id="ctl00_PageBody_btnShow" class="button">
             <input type="submit" name="ctl00$PageBody$btnCancel" value="Cancel" id="ctl00_PageBody_btnCancel" class="button">
       </div>
    </fieldset>
 
 
Even tried getting the frame collection, but no joy

Share this post


Link to post
Share on other sites

Got it!! Thanks for all your help!! :) Just tying a few loose ends now and then its finished!!

Thanks again!! :)

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...