Jump to content

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


Go to solution Solved by empach,

Recommended Posts

Hi,

Can someone please tell me what this popup is called and how I can save and rename the file??

Please see attached file for the popup

Its been driving me crazy for 3 whole days now :

post-54113-0-13779700-1370039778_thumb.j

Thanks

I have tried using the windows info tool, but when i try to code the details the script doesnt get anywhere.

script available if required

Edited by empach
Link to comment
Share on other sites

that looks like a modal popup, meaning the script won't continue until it's closed (since autoit is not multi threaded).  Initiate a second script to perfom the actual click to bring about that window, or initiate a script just prior to clicking what opens it, to interact with the window, and close it.

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

What are you trying to do? Saving a PDF receipt?

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

that looks like a modal popup, meaning the script won't continue until it's closed (since autoit is not multi threaded).  Initiate a second script to perfom the actual click to bring about that window, or initiate a script just prior to clicking what opens it, to interact with the window, and close it.

 thanks, but I'm not sure how to do that?? which controls should i be looking at??

Link to comment
Share on other sites

What are you trying to do? Saving a PDF receipt?

Hi,

I'm trying to download the .pdf and save it under a new name. The pdf needs to be downloaded once a month as its my payslip, but i need to change the name as every month it is called "Payslip"

Link to comment
Share on other sites

Am I correct that the filename/location changes for security reasons or the file is created on the fly based on your input? So you can't use INetGet to directly download the file?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Am I correct that the filename/location changes for security reasons or the file is created on the fly based on your input? So you can't use INetGet to directly download the file?

 

Basically, I login to a site with my personal details, I select a webpage, then select which month and year I wish to download the payslip from, and then click "show payslip". Then this pops up - where I'm stuck.

I have a GUI that logs me in and navigates to the "show payslip" page and clicks on it to get the popup. Now I wish to save the payslip undera new name dependant on which month and year is selected.

Below is the HTML code I am trying to read from

              <label for="Year">   Year:</label>   <select name="ctl00$PageBody$ddlYear" onchange="javascript:setTimeout(&#39;__doPostBack(&#39;ctl00$PageBody$ddlYear&#39;,&#39;&#39;)&#39;, 0)" id="ctl00_PageBody_ddlYear" name="input" 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" name="input" 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>       <script type="text/javascript">   //<![CDATA[   var Page_ValidationSummaries = new Array(document.getElementById("ctl00_PageBody_ValidationSummary1"));   var Page_Validators = new Array(document.getElementById("ctl00_PageBody_reqCounty"), document.getElementById("ctl00_PageBody_RequiredFieldValidator1"));   //]]>   </script>       <script type="text/javascript">   //<![CDATA[   var ctl00_PageBody_ValidationSummary1 = document.all ? document.all["ctl00_PageBody_ValidationSummary1"] : document.getElementById("ctl00_PageBody_ValidationSummary1");   ctl00_PageBody_ValidationSummary1.validationGroup = "ValidationSummary1";   var ctl00_PageBody_reqCounty = document.all ? document.all["ctl00_PageBody_reqCounty"] : document.getElementById("ctl00_PageBody_reqCounty");   ctl00_PageBody_reqCounty.controltovalidate = "ctl00_PageBody_ddlYear";   ctl00_PageBody_reqCounty.errormessage = "Year is required";   ctl00_PageBody_reqCounty.validationGroup = "ValidationSummary1";   ctl00_PageBody_reqCounty.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";   ctl00_PageBody_reqCounty.initialvalue = "";   var ctl00_PageBody_RequiredFieldValidator1 = document.all ? document.all["ctl00_PageBody_RequiredFieldValidator1"] : document.getElementById("ctl00_PageBody_RequiredFieldValidator1");   ctl00_PageBody_RequiredFieldValidator1.controltovalidate = "ctl00_PageBody_ddlMonth";   ctl00_PageBody_RequiredFieldValidator1.errormessage = "Month is required";   ctl00_PageBody_RequiredFieldValidator1.validationGroup = "ValidationSummary1";   ctl00_PageBody_RequiredFieldValidator1.evaluationfunction = "RequiredFieldValidatorEvaluateIsValid";   ctl00_PageBody_RequiredFieldValidator1.initialvalue = "";   //]]>   </script>           <script type="text/javascript">   //<![CDATA[       var Page_ValidationActive = false;   if (typeof(ValidatorOnLoad) == "function") {   ValidatorOnLoad();   }       function ValidatorOnSubmit() {   if (Page_ValidationActive) {   return ValidatorCommonOnSubmit();   }   else {   return true;   }   }   //]]>   </script>   </form>           <!-- END BOTTOM PAGE STYLES -->   <!-- YOUR CONTENT ENDS BEFORE THIS COMMENT -->       </div>       </div>   <div id="footer" />   </div>   </div>       </body>   </html>  
Link to comment
Share on other sites

Oops, looks a bit complex. I'm not sure this JavaScript can be automated at all.

I would create a function that detects the popup window and clicks the button. Use AdLibRegister to call this function every n seconds.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Oops, looks a bit complex. I'm not sure this JavaScript can be automated at all.

I would create a function that detects the popup window and clicks the button. Use AdLibRegister to call this function every n seconds.

 

Thanks water, I'll have a look in the help files :)

Link to comment
Share on other sites

So Google Chrome is the browser you want to code for? Or should it run with IE and FF too?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Can you post a screenshot of the AutoIt Window Info Tool with the cursor pointing to one of the buttons?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Try function ControlClick and pass the data displayed as "Advanced Mode" as parameter 3.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Tried 

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

 

but with no joy.

I have noticed that my script pauses at the line just before this popup occurs so I may need to focus on the popup but Winactivate doesnt focus it.

Edited by empach
Link to comment
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
 Share

  • Recently Browsing   0 members

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