Jump to content
Sign in to follow this  
anchorsaway

Closing Winzip

Recommended Posts

anchorsaway

I am very new to autoit and need some help. I am executing WinZip to extract a file. It takes about 3 minutes to extract the file. How do I figure out when the file is done extracting to close WinZip?

Code sample

Func _ExtractWinZipFile($sFileName)

Run("C:\Program Files\WinZip\WINZIP32.EXE")

WinWaitActive("WinZip")

;Close Tip of the day if it is open

ControlClick("WinZip Tip of the Day", "Did you know...", 2 )

;Open the Archive

Send("!f")

Send("{DOWN}")

Send("{ENTER}")

;Types the file name you want to unzip

send("C:\oracle client\" & $sFileName)

Send("!O")

;Extracts the Files to the specified directory

WinWaitActive("WinZip - " & $sFileName)

Send("+e")

WinWaitActive("Extract - C:\oracle client\" & $sFileName)

Send("C:\oracle client")

WinWaitActive("Extract - C:\oracle client\" & $sFileName)

ControlClick("Extract - C:\oracle client\" & $sFileName, "E&xtract to:", 1 )

Need help here:

if i try to close winzip now the command will execute before the extraction is finished

EndFunc

Share this post


Link to post
Share on other sites
mikehunt114

anchorsaway: 1

Forums: 0

;)


IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]

Share this post


Link to post
Share on other sites
LxP

That was basically a really polite way of saying 'please share your solution with the rest of us', anchorsaway! :">

Edit: And welcome to the forums. ;)

Edited by LxP

Share this post


Link to post
Share on other sites
anchorsaway

Just added a loop

$x = FileExists("C:\oracle client\client\welcome.html")

While $x = 0

Sleep(5000)

$x = FileExists("C:\oracle client\client\welcome.html")

WEnd

WinClose("WinZip - "& $sFileName, "")

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.