Jump to content

Help with canceling delete


Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...