kzar Posted March 21, 2007 Share Posted March 21, 2007 I am writing a script that opens a PDF at one stage. If Acrobat reader has not already been used on the PC it makes you press accept to the EULA but obviously if you have already accepted the agreement you don't have to again. I know how to accept the EULA but I'm not sure how to handle both situations. I did try waiting for the EULA window for 10 seconds but on slow computers that isn't enough time and if the EULA isn't going to show up it wastes time and slows down the script. How would you do this? Thanks Link to comment Share on other sites More sharing options...
Vindicator209 Posted March 21, 2007 Share Posted March 21, 2007 If WinExists() Then ? maybe... [center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center] Link to comment Share on other sites More sharing options...
CrewXp Posted March 21, 2007 Share Posted March 21, 2007 I could never figure out how to do that either... It'd be a cool feature to add into Autoit. What I had to end up doing was using the Coroutine UDF here in the forums, create a seperate Autoit instance that waits for the seperate window. Then if one found one before the other, it'd close the other instance then continue. Link to comment Share on other sites More sharing options...
lod3n Posted March 21, 2007 Share Posted March 21, 2007 I think you can just set the EULA as read: RegWrite("HKCU\Software\Adobe\Acrobat Reader\6.0\AdobeViewer","REG_DWORD","EULA","1") RegWrite("HKCU\Software\Adobe\Acrobat Reader\7.0\AdobeViewer","REG_DWORD","EULA","1") Or something like that. I haven't tested this, but I think it's a good theory. [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
seandisanti Posted March 21, 2007 Share Posted March 21, 2007 I am writing a script that opens a PDF at one stage. If Acrobat reader has not already been used on the PC it makes you press accept to the EULA but obviously if you have already accepted the agreement you don't have to again. I know how to accept the EULA but I'm not sure how to handle both situations. I did try waiting for the EULA window for 10 seconds but on slow computers that isn't enough time and if the EULA isn't going to show up it wastes time and slows down the script.How would you do this? Thanksuse an adlib function, and wait for each window with winwait() or pixelchecksum() verification of window before continuing. that way you won't have to worry about code executing early, and you'll have the code to handle the odd window IF it shows up. Link to comment Share on other sites More sharing options...
CrewXp Posted March 22, 2007 Share Posted March 22, 2007 ^^ That's kinda what I said. Search the forums for coroutine or adlib. Link to comment Share on other sites More sharing options...
MHz Posted March 22, 2007 Share Posted March 22, 2007 AdlibEnable() is in the help file index. It will will handle the task easily by using WinExist() to check for your window. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now