AskFileName 101 Flag Doesn't Work

Started by MrLeadFoot, May 16, 2016, 02:07:31 PM

Previous topic - Next topic

MrLeadFoot

Just letting you know that AskFileName with 101 flag crashes, while 1 is fine.

In other words, while this works:
AskFileName("Select file...","c:\", "", "", 1)

This doesn't:
AskFileName("Select file...","c:\", "", "", 101)

Tested on Win7, but once I saw this I didn't bother trying on any other OS, nor did I bother trying any of the other 100-plus flags.

td

Please be more precise in the future.   The term 'crash' has too many interpretations.

You need to have at least one file type specified in the file type parameter when you use any of the 100  flags.  If you don't, you will get a dialog creation error.   So you need to do this instead
Code (winbatch) Select
AskFileName("Select file...","c:\", "all|*", "", 101)
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

MrLeadFoot

Thank you. If only the documentation was more in-depth.  ;)

MrLeadFoot

OK, now that I tried it, in the preview pane of the File Open Dialog created by WB, when a .PDF file (for example) is highlighted a message in the viewing pane says:

"This file can't be previewed because of an error in the PDF Previewer Handler for Vista."

It sure would be nice if this were a more generic message that did not refer specifically to Vista. Windows' own File Open Dialog simply says:

"This file can't be previewed."

I'd hate for people to think that the new .EXEs we distribute created in WB 2016a were made in 2006!  ;) While I doubt it's possible for us to do so, is there a way, short of waiting to see if you guys will actually fix this, for us to change the verbiage in that message?






td

Not a WinBatch generated message.  You will have to talk to whomever created the preview handler or the OS.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

MrLeadFoot

That's interesting. Like I said, when I use a Windows File Open dialog it does not give that message. It only does it in the File Open dialog that is generated from WB's AskFileName function. Oh, well.

td

If you are saying that you thing it is a WinBatch generated message because you don't see the message in a Explorer window then you are mistaken.   There is absolutely no question that the message you are seeing is not a WinBath message.  The message could very well be the result of the Explorer shell being 64-bit and your WinBatch process is 32-bit, if you are running 32-bit WinBatch on 64-bit Windows.  The Previewer Handler simply doesn't have a 32-bit version.  It just has a 64-bit version for the 64-bit shell.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

MrLeadFoot

OK, that makes sense. Thanks for the clarification. Too bad for me that alienating 32-bit OS users would not be good for me.  :-\

td

"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade