Minikori Posted July 21, 2008 Share Posted July 21, 2008 Just wondering how I'm supposed to cancel a delete in the notes script I'm making, here's what I have: CODE If $msg = $MenuFileDelete Or $msg = $Delete Then $DFile = GUICtrlRead($FileList) $DConfirm = MsgBox(4, "Confirmation", "Are you sure you want to delete the file " & $DFile & "?") If $DConfirm = 6 Then IniDelete("Files.ini", "Files", $DFile) If IniReadSection("Files.ini", "Files") = @error Then Msgbox(0, "Sorry", "Sorry can't delete this file, you must have one file at all times!") Else MsgBox(0, "Deleted", "File deleted successfully.") GUICtrlSetData($FileList, "") $Notes = IniReadSection ("Files.ini", "Files") For $x = 1 to $Notes[0][0] GUICtrlSetData($FileList, $Notes[$x][0]) Next GUICtrlSetData($NameInput, "") GUICtrlSetData($TextInput, "") EndIf EndIf EndIf For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com Link to comment Share on other sites More sharing options...
Richard Robertson Posted July 21, 2008 Share Posted July 21, 2008 First, IniDelete doesn't delete any files. It deletes sections or lines in an Ini file. Second, you can't cancel a delete. You have to either delete it or not delete it, and make that choice ahead of time. Link to comment Share on other sites More sharing options...
Minikori Posted July 21, 2008 Author Share Posted July 21, 2008 First, IniDelete doesn't delete any files. It deletes sections or lines in an Ini file.Second, you can't cancel a delete. You have to either delete it or not delete it, and make that choice ahead of time.I'm aware of both of these, what I'm wondering is how to rearrange my code and what to add or take out to fix my problem. For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com Link to comment Share on other sites More sharing options...
Richard Robertson Posted July 21, 2008 Share Posted July 21, 2008 You ask first, then if the answer is yes, you delete it. If the answer is no, you don't delete it. Where is your confusion? I'm also afraid I don't understand at what point it would be canceled. 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