Jump to content
Sign in to follow this  
Dugdale

Getting MySQL Admin To Close With My Script

Recommended Posts

Dugdale

I can open MySQL Admin just fine with the below script, but I am not sure how to close it once the scheduled backup is done.

Can anyone assist me?

;
; AutoIt Version: 3.0
; Language:    English
; Platform:    Win9x/NT
; Author:        Dave Dugdale
;
; Script Function:
;   Opens MySQL Administrator 1.2.15 and allows a backup the rentvine db to local machine.
;

; This script requires full Administrative rights
#requireadmin


; Run the MySQL Administrator 
Run("C:\Program Files\MySQL\MySQL Tools for 5.0\MySQLAdministrator.exe")


; Wait for the MySQL Administrator become active
WinWaitActive("MySQL Administrator 1.2.15")


; Now that the MySQL Administrator window is active Click OK Button sleep for 15 minutes 900,000
Send("{ENTER}")
Sleep(900000) 


; Now quit by sending a "close" request to the MySQL Administrator
WinClose("MySQL Administrator 1.2.15")


; Now wait for MySQL Administrator to close before continuing
WinWaitClose("MySQL Administrator 1.2.15")


; Finished!

Thanks,

Dave

Share this post


Link to post
Share on other sites
Dugdale

I can open MySQL Admin just fine with the below script, but I am not sure how to close it once the scheduled backup is done.

Can anyone assist me?

;
; AutoIt Version: 3.0
; Language:    English
; Platform:    Win9x/NT
; Author:        Dave Dugdale
;
; Script Function:
;   Opens MySQL Administrator 1.2.15 and allows a backup the rentvine db to local machine.
;

; This script requires full Administrative rights
#requireadmin


; Run the MySQL Administrator 
Run("C:\Program Files\MySQL\MySQL Tools for 5.0\MySQLAdministrator.exe")


; Wait for the MySQL Administrator become active
WinWaitActive("MySQL Administrator 1.2.15")


; Now that the MySQL Administrator window is active Click OK Button sleep for 15 minutes 900,000
Send("{ENTER}")
Sleep(900000) 


; Now quit by sending a "close" request to the MySQL Administrator
WinClose("MySQL Administrator 1.2.15")


; Now wait for MySQL Administrator to close before continuing
WinWaitClose("MySQL Administrator 1.2.15")


; Finished!

Thanks,

Dave

I figured out how to use MySQL Admin to do this with the task scheduler. My issue was a bad password.

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.