tsjippy Posted January 30, 2015 Share Posted January 30, 2015 I am working on automating windows updates. That works great. however the line, Global $searchresult = $updatesearcher.search("IsInstalled=0 and IsHidden=0 and Type='Software'") takes a lot of time. Is there a way to execute this line and wait for it to complete in a while loop? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 30, 2015 Moderators Share Posted January 30, 2015 What kind of value does $searchresult return? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
tsjippy Posted January 30, 2015 Author Share Posted January 30, 2015 It returns an object, with all pending updates Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 30, 2015 Moderators Share Posted January 30, 2015 I was afraid of that... then the answer I'm guessing is no. Is there something pressing you must do while that is running? If it's a GUI thing, then I'd suggest creating a popup that says "still running..." using AdlibRegister() to update it. I'm not going to guess more, but if it's an object you must use within your script, then you're pretty much stuck waiting for it to be done unless you can utilize AdlibRegister(). If it's just data you're receiving that you want, and you have no further need for the object, then maybe run a second script that writes the data to an ini file, data base, or something similar. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
tsjippy Posted January 30, 2015 Author Share Posted January 30, 2015 to bad, AdlibRegister() does not work the object call, but think '?do=embed' frameborder='0' data-embedContent>> is a good direction for me to start, although the script provided there does not work Link to comment Share on other sites More sharing options...
jdelaney Posted January 30, 2015 Share Posted January 30, 2015 You can always execute that in another script. Then loop for the return value. 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 More sharing options...
Solution tsjippy Posted January 31, 2015 Author Solution Share Posted January 31, 2015 Thanks for all the replies, I have found out that there is a way to start a asynchronous update searcher, that helped. 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