Dugdale Posted January 23, 2009 Share Posted January 23, 2009 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 Link to comment Share on other sites More sharing options...
Dugdale Posted January 24, 2009 Author Share Posted January 24, 2009 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. 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