Author Topic: AskFileName 101 Flag Doesn't Work  (Read 4365 times)

MrLeadFoot

  • Jr. Member
  • **
  • Posts: 52
AskFileName 101 Flag Doesn't Work
« on: May 16, 2016, 02:07:31 pm »
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

  • Tech Support
  • *****
  • Posts: 3992
    • WinBatch
Re: AskFileName 101 Flag Doesn't Work
« Reply #1 on: May 16, 2016, 02:30:48 pm »
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
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

  • Jr. Member
  • **
  • Posts: 52
Re: AskFileName 101 Flag Doesn't Work
« Reply #2 on: May 16, 2016, 02:43:04 pm »
Thank you. If only the documentation was more in-depth.  ;)

MrLeadFoot

  • Jr. Member
  • **
  • Posts: 52
Re: AskFileName 101 Flag Doesn't Work
« Reply #3 on: May 16, 2016, 03:04:52 pm »
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

  • Tech Support
  • *****
  • Posts: 3992
    • WinBatch
Re: AskFileName 101 Flag Doesn't Work
« Reply #4 on: May 16, 2016, 04:00:44 pm »
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

  • Jr. Member
  • **
  • Posts: 52
Re: AskFileName 101 Flag Doesn't Work
« Reply #5 on: May 16, 2016, 04:54:25 pm »
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

  • Tech Support
  • *****
  • Posts: 3992
    • WinBatch
Re: AskFileName 101 Flag Doesn't Work
« Reply #6 on: May 17, 2016, 06:40:39 am »
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

  • Jr. Member
  • **
  • Posts: 52
Re: AskFileName 101 Flag Doesn't Work
« Reply #7 on: May 17, 2016, 02:57:20 pm »
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

  • Tech Support
  • *****
  • Posts: 3992
    • WinBatch
Re: AskFileName 101 Flag Doesn't Work
« Reply #8 on: May 18, 2016, 07:48:20 am »
Try 64-bit WinBatch.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade