Geeky Posted June 9, 2006 Posted June 9, 2006 I've got this script for moving files from one folder to another, and i wanted to know how i can make a script that checks what files are checked, and if they are, then move it to the right directory. But it keeps saying that there is Endselect but not Select, why? GUICreate ( "Checkbox" , 300 , 200 , -1 , -1 ) GUISetBKColor (0xFFFFAA) $cb1 = GUICtrlCreateCheckbox ("CHECKBOX 1", 10, 10, 120, 20) $cb2 = GUICtrlCreateCheckbox ("CHECKBOX 2", 10, 40, 120, 20) $button = GUICtrlCreateButton ("Check", 60, 80, 200, 20) While 1 $msg = GUIGetMsg() Select case $msg = $button If $cb2 = $GUI_CHECKED Then DirCopy("1", "dest", 1) If $cb1 = $GUI_CHECKED Then DirCopy("2", "dest", 1) Endselect If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend
GaryFrost Posted June 9, 2006 Posted June 9, 2006 (edited) I've got this script for moving files from one folder to another, and i wanted to know how i can make a script that checks what files are checked, and if they are, then move it to the right directory. But it keeps saying that there is Endselect but not Select, why? GUICreate ( "Checkbox" , 300 , 200 , -1 , -1 ) GUISetBKColor (0xFFFFAA) $cb1 = GUICtrlCreateCheckbox ("CHECKBOX 1", 10, 10, 120, 20) $cb2 = GUICtrlCreateCheckbox ("CHECKBOX 2", 10, 40, 120, 20) $button = GUICtrlCreateButton ("Check", 60, 80, 200, 20) While 1 $msg = GUIGetMsg() Select case $msg = $button If $cb2 = $GUI_CHECKED Then DirCopy("1", "dest", 1) If $cb1 = $GUI_CHECKED Then DirCopy("2", "dest", 1) Endselect If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Didn't close your if statements If $cb2 = $GUI_CHECKED Then DirCopy("1", "dest", 1) endif If $cb1 = $GUI_CHECKED Then DirCopy("2", "dest", 1) endif Edited June 9, 2006 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
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