87450kalle Posted September 13, 2005 Posted September 13, 2005 Hi, When I open a file dialog and select any file then the script cant open the temp.txt file. If I choose cancel in the file dialog the script will open the temp.txt file. Why is that? //Johan $message = "Select new driver file" $var2 = FileOpenDialog($message, "C:\Windows\system32\drivers\", "All (*.sys)") $file = FileOpen("temp.txt", 0) ; Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf
LxP Posted September 13, 2005 Posted September 13, 2005 If I choose cancel in the file dialog the script will open the temp.txt file.Why is that?Adding If @error Then Exit after the FileOpenDialog() line will terminate the script if the user clicks Cancel.
/dev/null Posted September 13, 2005 Posted September 13, 2005 Why is that?That's O.K. See help file of FileOpenDialog().@WorkingDir is changed on successfull return.CheersKurt __________________________________________________________(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 *
87450kalle Posted September 13, 2005 Author Posted September 13, 2005 Thats it!! Finally, Thanks Kurt u made my day:-) and I found the help text in the Beta help file. (will be using that one instead...) Thanks again /Johan
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