Sign in to follow this  
Followers 0
t0ddie

ehmmm, dunno.

2 posts in this topic

$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.

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 cancel

the 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)
EndIf

Cheers

Kurt

Edited 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 *

Share this post


Link to post
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
Sign in to follow this  
Followers 0