Canada369 Posted July 14, 2005 Posted July 14, 2005 (edited) Well im amking a dir remover, i knw very n00b but its helping me learn . so far i got ;File Remover Version 1.0 ;By Canada369 #include <GuiConstants.au3> If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000 GuiCreate("File Remover Version 1.0 By Canada369", 387, 121,(@DesktopWidth-387)/2, (@DesktopHeight-121)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) GuiSetIcon(@SystemDir & "\cmd.exe", 0) $input = GuiCtrlCreateInput("DIR to be deleted.", 10, 10, 370, 20) $close = GuiCtrlCreateButton("Exit", 240, 80, 90, 30) $delete = GuiCtrlCreateButton("Delete/Remove", 240, 40, 90, 30) ;$Checkbox_5 = GuiCtrlCreateCheckbox("Remove Subfolders?", 40, 50, 140, 50) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $close ExitLoop Case $msg = $delete DirRemove ( "$input" ,1 ); I tryed it wihout the quotes too. EndSelect WEnd Exit Now im having 1 main problem. I cant get it to "remove" what the dir in the input box, what am i doing wrong? p.s., ignore the ;checkbox its jsut there for now, im tyring to get it to work Edited July 14, 2005 by Canada369
Moderators SmOke_N Posted July 14, 2005 Moderators Posted July 14, 2005 Well im amking a dir remover, i knw very n00b but its helping me learn .so far i got;File Remover Version 1.0 ;By Canada369 #include <GuiConstants.au3> If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000 GuiCreate("File Remover Version 1.0 By Canada369", 387, 121,(@DesktopWidth-387)/2, (@DesktopHeight-121)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) GuiSetIcon(@SystemDir & "\cmd.exe", 0) $input = GuiCtrlCreateInput("DIR to be deleted.", 10, 10, 370, 20) $close = GuiCtrlCreateButton("Exit", 240, 80, 90, 30) $delete = GuiCtrlCreateButton("Delete/Remove", 240, 40, 90, 30) ;$Checkbox_5 = GuiCtrlCreateCheckbox("Remove Subfolders?", 40, 50, 140, 50) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $close ExitLoop Case $msg = $delete DirRemove ( "$input" ,1 ); I tryed it wihout the quotes too. EndSelect WEnd ExitNow im having 1 main problem.I cant get it to "remove" what the dir in the input box, what am i doing wrong?p.s., ignore the ;checkbox its jsut there for now, im tyring to get it to work <{POST_SNAPBACK}>I don't know if you can remove a Directory with a variable, but it would go something like this if you could:;By Canada369 #include <GuiConstants.au3> If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000 GuiCreate("File Remover Version 1.0 By Canada369", 387, 121,(@DesktopWidth-387)/2, (@DesktopHeight-121)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) GuiSetIcon(@SystemDir & "\cmd.exe", 0) $input = GuiCtrlCreateInput("DIR to be deleted.", 10, 10, 370, 20) $close = GuiCtrlCreateButton("Exit", 240, 80, 90, 30) $delete = GuiCtrlCreateButton("Delete/Remove", 240, 40, 90, 30) ;$Checkbox_5 = GuiCtrlCreateCheckbox("Remove Subfolders?", 40, 50, 140, 50) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $close ExitLoop Case $msg = $delete $DirRemove = GUICtrlRead($input); *** Reads Input Box and Stores in a Variable DirRemove ( $DirRemove ,1 ); I tryed it wihout the quotes too. EndSelect WEndHope this gives you ideas for this and future projects. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Canada369 Posted July 14, 2005 Author Posted July 14, 2005 (edited) ok cool, let me test it. BTW thx for replying so fast EDIT YYA IT WORKED, thanks. Edited July 14, 2005 by Canada369
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