Somebody Someware Posted September 6, 2006 Share Posted September 6, 2006 I made the following script: $van = InputBox( "Easy BackUp", "Van welke map moet een backup gemaakt worden?" ) $naar = InputBox( "Easy BackUp", "In welke map moet de backup worden opgeslagen?" ) If FileExists ( $van ) Then If FileExists ( $naar ) Then $groot = FileGetSize ( $van ) DirCopy ( $van, $naar ) MsgBox ( 0, "Easy BackUp", "De backup is voltooid!" ) Else #Region --- CodeWizard generated code Start --- ;MsgBox features: Title=Yes, Text=Yes, Buttons=Yes and No, Icon=Warning If Not IsDeclared("iMsgBoxAnswer") Then Dim $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(52,"Easy BackUp","De bakup map bestaat niet, aanmaken?") Select Case $iMsgBoxAnswer = 6;Yes Case $iMsgBoxAnswer = 7;No EndSelect #EndRegion --- CodeWizard generated code End --- If $iMsgBoxAnswer = 6 Then DirCreate ( $naar ) $groot = FileGetSize ( $van ) DirCopy ( $van, $naar ) MsgBox ( 0, "Easy BackUp", "De backup is voltooid!" ) Else MsgBox ( 0, "Easy BackUp", "De backup is mislukt!" ) EndIf EndIf Else MsgBox ( 0, "Easy BackUp", "De map waarvan een backup moet worden gemaakt bestaat niet!" ) EndIf But it doesn't work, please help me. Go to This site for my best product! Link to comment Share on other sites More sharing options...
Ruud0209 Posted September 6, 2006 Share Posted September 6, 2006 Hoi,Zo te zien komt dit omdat je geen "flag" bij het DirCopy commando hebt staan.Als je DirCopy ( $van, $naar,1 ) gebruikt werkt het wel.$van = InputBox( "Easy BackUp", "Van welke map moet een backup gemaakt worden?" ) $naar = InputBox( "Easy BackUp", "In welke map moet de backup worden opgeslagen?" ) If FileExists ( $van ) Then If FileExists ( $naar ) Then $groot = FileGetSize ( $van ) DirCopy ( $van, $naar,1 ) MsgBox ( 0, "Easy BackUp", "De backup is voltooid!" ) Else #Region --- CodeWizard generated code Start --- ;MsgBox features: Title=Yes, Text=Yes, Buttons=Yes and No, Icon=Warning If Not IsDeclared("iMsgBoxAnswer") Then Dim $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(52,"Easy BackUp","De bakup map bestaat niet, aanmaken?") ;Select ;Case $iMsgBoxAnswer = 6;Yes ;Case $iMsgBoxAnswer = 7;No ;EndSelect #EndRegion --- CodeWizard generated code End --- If $iMsgBoxAnswer = 6 Then DirCreate ( $naar ) $groot = FileGetSize ( $van ) DirCopy ( $van, $naar ) MsgBox ( 0, "Easy BackUp", "De backup is voltooid!" ) Else MsgBox ( 0, "Easy BackUp", "De backup is mislukt!" ) EndIf EndIf Else MsgBox ( 0, "Easy BackUp", "De map waarvan een backup moet worden gemaakt bestaat niet!" ) EndIfgroeten,Ruud Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 6, 2006 Share Posted September 6, 2006 (edited) Hoi, Zo te zien komt dit omdat je geen "flag" bij het DirCopy commando hebt staan. Als je DirCopy ( $van, $naar,1 ) gebruikt werkt het wel. $van = InputBox( "Easy BackUp", "Van welke map moet een backup gemaakt worden?" ) $naar = InputBox( "Easy BackUp", "In welke map moet de backup worden opgeslagen?" ) If FileExists ( $van ) Then If FileExists ( $naar ) Then $groot = FileGetSize ( $van ) DirCopy ( $van, $naar,1 ) MsgBox ( 0, "Easy BackUp", "De backup is voltooid!" ) Else #Region --- CodeWizard generated code Start --- ;MsgBox features: Title=Yes, Text=Yes, Buttons=Yes and No, Icon=Warning If Not IsDeclared("iMsgBoxAnswer") Then Dim $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(52,"Easy BackUp","De bakup map bestaat niet, aanmaken?") ;Select ;Case $iMsgBoxAnswer = 6;Yes ;Case $iMsgBoxAnswer = 7;No ;EndSelect #EndRegion --- CodeWizard generated code End --- If $iMsgBoxAnswer = 6 Then DirCreate ( $naar ) $groot = FileGetSize ( $van ) DirCopy ( $van, $naar ) MsgBox ( 0, "Easy BackUp", "De backup is voltooid!" ) Else MsgBox ( 0, "Easy BackUp", "De backup is mislukt!" ) EndIf EndIf Else MsgBox ( 0, "Easy BackUp", "De map waarvan een backup moet worden gemaakt bestaat niet!" ) EndIf groeten, Ruud Yeah... what he said! Or possibly: $van = InputBox("Easy BackUp", "Van welke map moet een backup gemaakt worden?") $naar = InputBox("Easy BackUp", "In welke map moet de backup worden opgeslagen?") If FileExists($van) Then ; Need to create destination? If Not FileExists($naar) Then If MsgBox(48 + 4, "Easy BackUp", "De bakup map bestaat niet, aanmaken?") = 6 Then DirCreate($naar) Else MsgBox(0, "Easy BackUp", "De backup is mislukt!") EndIf EndIf ; Perform copy If DirCopy($van, $naar, 1) Then MsgBox(64, "Easy BackUp", "Successfully backed up from: " & $van & @CRLF & "To: " & $naar) Else MsgBox(16, "Easy BackUp", "Error! Error backing up from: " & $van & @CRLF & "To: " & $naar) EndIf Else MsgBox(0, "Easy BackUp", "De map waarvan een backup moet worden gemaakt bestaat niet!") EndIf Cheers! P.S. I would add some error checking for the DirCopy(): Edited above code to include error checking the write operations... translation needed... :"> Edited September 6, 2006 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
dandymcgee Posted September 7, 2006 Share Posted September 7, 2006 Umm... I'm with PsaltyDS... Please give me a translation. Preferably even and ENGLISH translation...? lol what language is that even in? - Dan [Website] Link to comment Share on other sites More sharing options...
Helge Posted September 7, 2006 Share Posted September 7, 2006 lol what language is that even in?I'm pretty certain it's Dutch. A good indication for that is that it usually lookslike it was a drunk German who wrote it. It sounds pretty damn weird too Link to comment Share on other sites More sharing options...
Ruud0209 Posted September 7, 2006 Share Posted September 7, 2006 lol @ reactions I'll translate for you ... Hoi, Zo te zien komt dit omdat je geen "flag" bij het DirCopy commando hebt staan. Als je DirCopy ( $van, $naar,1 ) gebruikt werkt het wel. basicly translates to: Hi, Looks like this is because you don't have a "flag" added to the DirCopy command. If you use DirCopy ( $van, $naar,1 ) it works fine. Or more litteral: Hi, So to see comes this because you no "flag"at the DirCopy command have standing If you DirCopy ( $van, $naar,1 ) use works it ok. I'll stick to English from now on okay ? Link to comment Share on other sites More sharing options...
AceLoc Posted September 7, 2006 Share Posted September 7, 2006 (edited) ach als je genoeg ervan afweet, mag je het best zeggen in het Nederlands.en je hoeft het echt niet speciaal voor hun te 'translaten'.I'm pretty certain it's Dutch. A good indication for that is that it usually lookslike it was a drunk German who wrote it. It sounds pretty damn weird too and yes its dutch !@Somebody Somewareen bij $imsgboxanswer heb je spelfoutje. "bakup".niet dat het uitmaakt, maar ziet er niet zo pro uit. Edited September 7, 2006 by aceloc [quote name='AceLoc']I gots new sunglasses there cool.[/quote] 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