mohan93 Posted November 21, 2013 Share Posted November 21, 2013 Hello Everyone, Am struck with the below scenario, $EXEpath = FileOpenDialog('Please choose any file', '', 'All (*.*)', 1) ---> This will open a window to select for a file. if $EXEpath <> 0 Then (This Not equal to is not working) ;;"User has selected a file, Continue with script" Else ;;"User did not select any file, exiting" EndIf If user does not select any file and clicks on cancel after the opening Choose a file dialog (please refer the attachment) my script should exit else have to proceed with scripting Please help. Link to comment Share on other sites More sharing options...
NewPlaza Posted November 21, 2013 Share Posted November 21, 2013 (edited) try this if Not $EXEpath = 0 Then or.... From the help file. Local $message = "Hold down Ctrl or Shift to choose multiple files." Local $var = FileOpenDialog($message, @WindowsDir & "\", "Images (*.jpg;*.bmp)", 1 + 4) If @error Then MsgBox(4096, "", "No File(s) chosen") Else $var = StringReplace($var, "|", @CRLF) MsgBox(4096, "", "You chose " & $var) EndIf Edited November 21, 2013 by NewPlaza mohan93 1 Link to comment Share on other sites More sharing options...
mohan93 Posted November 21, 2013 Author Share Posted November 21, 2013 Got it, Thanks NewPlaza 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