Jump to content

How to say no to a pop up and proceed with the script


Recommended Posts

Sometimes, this popup comes up mid install asking if i want to update to the latest version, and i don't want to.
How can I get the script to say no and then proceed with the main script, tried something with if but no luck yet (im new to all this).

image.png.49d9961fe8acf5e8c5a1ee51a3a7c935.png

Link to post
Share on other sites
29 minutes ago, argumentum said:

...post your code.

This is a cut out of the part:

Run(@ScriptDir & '\kolmas.exe')
AutoItSetOption('MouseCoordMode', 0)

WinWait('Select Setup Language')
;WinActivate('Select Setup Language')
MouseClick('primary', 172, 131, 1, 0)

If WinExists('Setup', 'Do you want to download and install this version?') Then
   WinActivate('Setup', 'Do you want to download and install this version?')
   MouseClick('primary', 334, 132, 1, 0)
EndIf

   WinWait('Setup - PDFCreator', 'Welcome to the PDFCreator Setup Wizard')
   ;WinActivate('Setup - PDFCreator')
   MouseClick('primary', 368, 364, 1, 0)

Link to post
Share on other sites

You will need to debug your script and give us more info that you just did.

1-  Put some error handling after each statement and report return value for each statement even if you do not need it (Use ConsoleWrite for it) so we know what is going on

2- Use Au3info.exe tool to show us the information about those windows, and report it here

3- Use this tool, when you post code.

Link to post
Share on other sites

Made some changes

I am using MouseClick because I want to see what the code does when i test it, with the finished product I would make everything ControlClick and add a /Q to the start.

I have used Au3info tool to insert info to the code.

#RequireAdmin
Run(@ScriptDir & '\kolmas.exe') ;This will run the program installer what i renamed kolmas.exe
AutoItSetOption('MouseCoordMode', 0)

WinWait('Select Setup Language')
MouseClick('primary', 172, 131, 1, 0)

;This IF below is what I have tried
If WinExists('Setup', 'Do you want to download and install this version?') Then
   WinActivate('Setup', 'Do you want to download and install this version?')
   MouseClick('primary', 334, 132, 1, 0)
EndIf

WinWait('Setup - PDFCreator', 'Welcome to the PDFCreator Setup Wizard')
MouseClick('primary', 368, 364, 1, 0)

This is the needed info from au3info:

Capture.PNG2.PNG.1f8b23174df484f634e2fbf6946c4241.PNGCapture.PNG.0a2634f67640236631850eacfd4854b4.PNG

Link to post
Share on other sites

You could answer your own question watching the help file and then searching for the terms @zedna gift you.

To do so, just type it into SciTe And then click on it and push F1.

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to post
Share on other sites
2 hours ago, Zedna said:

Inside your Adlib function place something like this:

If WinExists(...) Then ControlClick(...)

You can use WinActive() instead of WinExists() alternatively ...

Not working, either way
 

Tried this too, seems more logical to me but still no result the pop up is just untouchable haha.

AdlibRegister(If WinExists("Do you want to download and install this version?", "") Then WinActivate("Do you want to download and install this version?", ""))
MouseClick('primary', 334, 132, 1, 0)

 

Link to post
Share on other sites
6 hours ago, caramen said:

You could answer your own question watching the help file and then searching for the terms @zedna gift you.

To do so, just type it into SciTe And then click on it and push F1.

 

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...