Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 25th November 2013, 11:44   #1
xbarns
Senior Member
 
xbarns's Avatar
 
Join Date: Aug 2007
Location: Frankfurt, Germany
Posts: 187
nsDialogs::SelectFileDialog presents Messagebox asking to create the file.

Hi all,

i am using:

nsDialogs::SelectFileDialog /NOUNLOAD open "$EXEDIR\License.xml" "XML Files|*.xml|All Files|*.*"

to select a file named "License.xml" from a directory in case it exists there, but if the file does not exist it will present a dialog:

"License.xml"
"This file doesn't exist."
"Create the file?!
"Yes No"

How can i prevent that dialog from showing in case the file i look for does not exist?

Thanks
x
xbarns is offline   Reply With Quote
Old 25th November 2013, 12:25   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
If you call GetOpenFilename directly with the system plugin you will get more control over which flags are used but I'm not sure if it makes any sense to do so, can't you just check if the file exists first?

Normally you would have a text field where the user can type anything they want and a browse button to display the open dialog...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 25th November 2013, 12:34   #3
xbarns
Senior Member
 
xbarns's Avatar
 
Join Date: Aug 2007
Location: Frankfurt, Germany
Posts: 187
Thanks Anders, i did the check for the filename and now it works as it should.

xbarns is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump