Jump to content
Sign in to follow this  
fraudh8er

Winclose

Recommended Posts

fraudh8er

I am having trouble getting a explorer window to close. any thoughts.

I have tried, winclose and winkill and I have also typed int text from 'Visible Window Text' from the AutoLt Active window info (Spy). is there any reason why it would not be working.

FileInstall("C:\Installation CD\DBPix\DBPix.exe", "C:\temp2\DBPix.exe", 1)
           WinWaitClose("Remove Programs From Your Computer")
           Run("C:\temp2\DBPix.exe")
                          
;Wait for the Welcome Screen of the DBPix Program to come up
    WinActive("Welcome")
    WinWaitActive("Welcome")
     
;automation portion of the dbpix program
;Use AutoItSetOption to slow down the typing speed so we can see it :)
    AutoItSetOption("SendKeyDelay", $timeout)
    Send("{ENTER}")
    WinWaitActive("Registration")
    Send($agency1)
    Send("{TAB}")
    Send($agency1)
    Send("{TAB}")
      Send("{ENTER}")
    WinWaitActive("Software License Agreement")
    Send("{ENTER}")
    WinWaitActive("Choose Destination Location")
    Send("{ENTER}")
     
;If WinActive("DBPix 2.0 Control") Then
    WinKill("DBPix 2.0 Control", "")
;Elseif WinActive("DBPix Control") Then
    WinKill("DBPix Control", "")
    WinClose("DBPix Control", "C:\Documents and Settings\All Users\Start Menu\Programs\DBPix Control")
    WinClose("DBPix Control", "")
;Endif
    
    WinWaitActive("Setup Complete")
    WinClose("C:\WINDOWS\system32\cmd.exe", "")
    
    Send("{ENTER}")
      Sleep(3000)
Edited by fraudh8er

Share this post


Link to post
Share on other sites
ezzetabi

Try

opt('WinTitleMatchMode',4)

While winExist('classname=ExploreWClass','')
    winclose('classname=ExploreWClass','')
Wend

And remove that registration code danmit!

He(She?) did.

Edited by ezzetabi

Share this post


Link to post
Share on other sites
fraudh8er

donE

let me try it and see what happens. sorry about the key thing. my bad :)

Try

opt('WinTitleMatchMode',4)

While winExist('classname=ExploreWClass','')
    winclose('classname=ExploreWClass','')
Wend

And remove that registration code danmit!

<{POST_SNAPBACK}>

Edited by fraudh8er

Share this post


Link to post
Share on other sites
scriptkitty

Normally I just change codes and passwords to XXXX-XXXX-XXXX or such, that way the code still works to test but safe to post.

A good habit is to set passwords in a variable at the top of each script.

$timeout=5
$password="XXXX-XXXX-XXXX"
$agency1="Bob's house"
; blah blah blah

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites
fraudh8er

I undersatand what you are saying. I needed to get it done quickly to have it ready for something. I am going back and making it efficent and all that fun stuff. thank you

nice pic

Normally I just change codes and passwords to XXXX-XXXX-XXXX  or such, that way the code still works to test but safe to post.

A good habit is to set passwords in a variable at the top of each script.

$timeout=5
$password="XXXX-XXXX-XXXX"
$agency1="Bob's house"
; blah blah blah

<{POST_SNAPBACK}>

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.