WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: MrLeadFoot on May 16, 2016, 02:07:31 PM

Title: AskFileName 101 Flag Doesn't Work
Post by: MrLeadFoot 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.
Title: Re: AskFileName 101 Flag Doesn't Work
Post by: td 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) Select
AskFileName("Select file...","c:\", "all|*", "", 101)
Title: Re: AskFileName 101 Flag Doesn't Work
Post by: MrLeadFoot on May 16, 2016, 02:43:04 PM
Thank you. If only the documentation was more in-depth.  ;)
Title: Re: AskFileName 101 Flag Doesn't Work
Post by: MrLeadFoot 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?





Title: Re: AskFileName 101 Flag Doesn't Work
Post by: td 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.
Title: Re: AskFileName 101 Flag Doesn't Work
Post by: MrLeadFoot 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.
Title: Re: AskFileName 101 Flag Doesn't Work
Post by: td 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.
Title: Re: AskFileName 101 Flag Doesn't Work
Post by: MrLeadFoot 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.  :-\
Title: Re: AskFileName 101 Flag Doesn't Work
Post by: td on May 18, 2016, 07:48:20 AM
Try 64-bit WinBatch.