Rewl Posted November 19, 2010 Share Posted November 19, 2010 My code isn't working, syntax is correct but when ever I run it to test it, it doesn't work. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> HotKeySet("{ESC}" , "close") #Region ### START Koda GUI section ### Form= Global $Form1 = GUICreate("Back-Up by Rewl", 393, 288, 192, 124) Global $Button1 = GUICtrlCreateButton("Backup to H:/", 120, 16, 131, 57, $WS_GROUP) Global $Checkbox1 = GUICtrlCreateCheckbox("Favorites", 16, 96, 97, 17) Global $Checkbox2 = GUICtrlCreateCheckbox("Desktop", 16, 120, 97, 17) Global $Checkbox3 = GUICtrlCreateCheckbox("Music", 16, 144, 97, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Do $msg = GUIGetMsg() If $msg = $Button1 Then DirCreate("H:\Back Up") If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then ConsoleWrite ( "DirCopy Favorites " & @Crlf ) If GUICtrlRead($Checkbox2) = $GUI_CHECKED Then ConsoleWrite ( "DirCopy Desktop " & @CRLF ) If GUICtrlRead($Checkbox3) = $GUI_CHECKED Then ConsoleWrite ( "DirCopy Music " & @Crlf ) MsgBox(0 , "Back-Up Complete" , "Your files have been backed up.") EndIf Until $msg = $GUI_EVENT_CLOSE Func close() MsgBox(0, "Back-Up by Rewl" , "Thank you for using Back-Up by Rewl") Exit EndFunc [size="1"]Programs: Draw Tool | [/size] Link to comment Share on other sites More sharing options...
water Posted November 19, 2010 Share Posted November 19, 2010 What do you mean by "doesn't work."? I tested the code and it does what it is supposed to do: Write Text to the Console or to a MsgBox. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Spiff59 Posted November 19, 2010 Share Posted November 19, 2010 It seems to do just what it ought to... It displays messages on the console, depending on which boxes are checked. Wherein lies the problem? Link to comment Share on other sites More sharing options...
Rewl Posted November 19, 2010 Author Share Posted November 19, 2010 it doesn't back up the files when you press backup [size="1"]Programs: Draw Tool | [/size] Link to comment Share on other sites More sharing options...
water Posted November 19, 2010 Share Posted November 19, 2010 (edited) It can't do any backups because there is no backup code in your script. It only creates a directory. I think you should remove the ConsoleWrite statements and replace them with Dircopy commands. Edited November 19, 2010 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Rewl Posted November 20, 2010 Author Share Posted November 20, 2010 So what code would be used to make it "compile" and than be moved [size="1"]Programs: Draw Tool | [/size] 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