Graham Jackson Posted June 12, 2006 Posted June 12, 2006 It's all a bit new to me and I'm struggling to get my head round some of the basics. Could some kind soul make an old man very happy please I'm wanting to copy a number of files automatically from one location to another using a button. Sounds simple? Well here's the other bit I can't figure out. I have a number of files in different directories - selection of the source is by a drop down box - the destination for the files is the same. I'm not asking for a script (altho that would be very nice) but if someone can give me an idea of the commands and the way I should structure this please. Thanks for reading - hope someone can help
Paulie Posted June 12, 2006 Posted June 12, 2006 (edited) It's all a bit new to me and I'm struggling to get my head round some of the basics.Could some kind soul make an old man very happy please I'm wanting to copy a number of files automatically from one location to another using a button. Sounds simple? Well here's the other bit I can't figure out. I have a number of files in different directories - selection of the source is by a drop down box - the destination for the files is the same.I'm not asking for a script (altho that would be very nice) but if someone can give me an idea of the commands and the way I should structure this please.Thanks for reading - hope someone can help I recomend getting SciTE and using the GUI builder that comes with the program, then you just have to configure the buttons/comboboxesCheck the helpfile that comes with autoit 3 (wonderful thing) or this sitehttp://www.autoitscripts.com/autoit3/docs/for more info on what your looking for Edited June 12, 2006 by Paulie
Thatsgreat2345 Posted June 12, 2006 Posted June 12, 2006 try this #include <GUIConstants.au3> ; == GUI generated with Koda == $GUI = GUICreate("Copier", 245, 112, 192, 125) $File = GUICtrlCreateCombo("", 48, 16, 81, 21) GUICtrlCreateLabel("File", 16, 16, 20, 17) $browse = GUICtrlCreateButton("Browse", 144, 16, 73, 17) GUICtrlCreateLabel("Copy to", 0, 48, 40, 17) $to = GUICtrlCreateCombo("", 48, 48, 81, 21) $browse2 = GUICtrlCreateButton("Browse", 144, 48, 73, 17) $copy = GUICtrlCreateButton("Copy", 88, 80, 57, 25) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $browse GUICtrlSetData($File,FileOpenDialog("Select a file","","Files(*.*)")) Case $msg = $browse2 GUICtrlSetData($to,FileSelectFolder("Select Folder","")) Case $msg = $copy If GUICtrlRead($File) = "" or GUICtrlRead($to) = "" Then MsgBox(0,"Error","Choose a file or a destination") Else FileCopy(GUICtrlRead($File),GUICtrlRead($to)) MsgBox(0,"Complete","File Copied Completely") EndIf Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd
Graham Jackson Posted June 12, 2006 Author Posted June 12, 2006 Wow - super fast reply you guys. Thanks for the suggestions - I think I might even be seeing a bit of light at the end of the tunnel now. Best.
nfwu Posted June 12, 2006 Posted June 12, 2006 Also, look at the tutoral for AutoIt located at:http://www.autoitscript.com/forum/index.php?showtopic=21048#) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode()
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