Sign in to follow this  
Followers 0
empach

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

30 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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.

Share this post


Link to post
Share on other sites

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


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_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: 04/09/2015

Share this post


Link to post
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??

Share this post


Link to post
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"

Share this post


Link to post
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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
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>  

Share this post


Link to post
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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
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 :)

Share this post


Link to post
Share on other sites

I've tried AdLibRegister, with no luck :(

Ive also found when I use google chrome the window info says its a widget ?????

Is there any way I get control this widget??

Share this post


Link to post
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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

I have created a GUI with IE embedded in it, and this is a popup from the webpage

Share this post


Link to post
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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Ok, This is the one from Chrome with the window info of the Save button :)

 

Share this post


Link to post
Share on other sites

forgot to attach.... :

post-54113-0-02270000-1370093088_thumb.p

Share this post


Link to post
Share on other sites

And this is the save button info from my gui

 

post-54113-0-24173100-1370093350_thumb.p

Share this post


Link to post
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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Consider other UDFs for the job. My advice would be to use WinHttp.au3 to completely avoid your current problems.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

Consider other UDFs for the job. My advice would be to use WinHttp.au3 to completely avoid your current problems.

 

errr??? :ermm:

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