t0ddie Posted September 11, 2005 Posted September 11, 2005 $sFile = FileOpenDialog("select a text file... , @ScriptDir & "\config", "Text Files(*.txt)" & _ " ...see " & '"cdkeys.txt"?' & " duh!", 4, "cdkeys.txt") If $sFile = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf but if i hit cancel, i want to detect it, instead the script tries to read the file.. that obviously isnt opening because i clicked cancel i tried this If $sFile <> 2 Then thinking that it would work like a messagebox but nope. suggestions? Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.
/dev/null Posted September 11, 2005 Posted September 11, 2005 (edited) but if i hit cancel, i want to detect it, instead the script tries to read the file.. that obviously isnt opening because i clicked cancelthe help file is your friend. From FileOpenDialog sample. Check @error.If @error Then MsgBox(4096,"","No File(s) chosen") else $var = StringReplace($var, "|", @CRLF) MsgBox(4096,"","You chose " & $var) EndIfCheersKurt Edited September 11, 2005 by /dev/null __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *
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