Jump to content
Macro Express Forums

Foldername Prompt, Preset & Applet Navigation


Recommended Posts

If you Prompt for Filename and preset the variable with a filename, the applet opens in the relevant folder with the file pre-selected.

 

If you Prompt for Foldername, you get an applet that has My Computer selected regardless of any preset of the variable. That is quite annoying. The applet can be easily navigated manually. To get to the 3rd folder starting with "T" on the D: drive you would type D<KEYP+>TTT . The applet does not seem to respond to keystrokes from ME.

 

Ideas on opening the applet with a preset folder selected, or method to navigate applet?

Link to comment
Share on other sites

If you Prompt for Filename and preset the variable with a filename, the applet opens in the relevant folder with the file pre-selected.

This doesn't appear to work for me. In Windows 7 x64 Professional, regardless of what value I assign to %tFilename%, the command:

Variable Set String %tFilename%: Prompt for a filename

always starts in Desktop\Libraries\Documents.

Link to comment
Share on other sites

Thanks for trying. I tried the "named" variable approach and the Prompt for Filename behaviour worked as I described. It seems that we have differences between OSs. Could you navigate either the Filename or Foldername applets with ME? That may be OS-dependent too.

 

I get an applet for Prompt for Foldername but an Explorer-style dialog for Prompt for Filename.

Link to comment
Share on other sites

Thanks for trying. I tried the "named" variable approach and the Prompt for Filename behaviour worked as I described. It seems that we have differences between OSs. Could you navigate either the Filename or Foldername applets with ME? That may be OS-dependent too.

 

I get an applet for Prompt for Foldername but an Explorer-style dialog for Prompt for Filename.

Under Windows XP Pro I get exactly the same results as you, both for file names and folder names.

 

I'll try again later under W7 x64 pro.

Link to comment
Share on other sites

If you look back you will seem me complaining about this in the past.

....................................................................

It's a Windows common control so it's not anything in the MEP code and will vary slightly depending on OS. In W7 it's very much different and gives the folder tree only.

 

I have two suggestions. First maintain a list of MRUDs (Most Recently Used Directories) and have them to the registry. You could easily have a top ten that gets updated every time you select a directory. Also you could save them per macro in the registry or in an INI file. So when you prompt the user it would give you a list and the last item would be browse. If browse is selected you have to do the manual browse but I bet the MRUD would avoid that in most cases. I've done things like this before with a static list or a dynamic one. But I think a really cool idea would be to create a tracking system that would rank by frequency of use. I've never done it but I could see it definitely working w/o too much work.

 

Secondly you could create a folder select routine of your own using multiple choice. I've had to do this for FTP before. But that would take some work and I could definitely see some limitations.

 

Oh, I did think of a third option. We could have someone write a simple VB app that would do it for us. There must be a way.

Link to comment
Share on other sites

Your comments highlighted my "up to the ass in alligators/drain the swamp" mindset. One wants to overcome the problem but loses sight of what the task really was. I'm sure something could be done along the lines you indicated for general use. I detest VB so it won't be me.

 

My reasoning for opening at a particular folder is that I already know approximately where I want to be for the task in hand. Each macro may have a different starting folder. Getting back to "The Swamp", I could easily make a multiple choice list of the folders I regularly access (not that many) in a separate macro and preset the radio button with the user macro. Then the most likely choice is already selected, otherwise I can select another. Otherwise, use the standard folder selection dialog and get clicking.

Link to comment
Share on other sites

OT: Why such intense feelings? PM me if you like - I'm genuinely interested.

 

I was involved in a project which peripherally needed a driver written for some industrial equipment. The code was by another company but I was overseeing the work. I got hold of the VB manual; VB had just come out I think. It was truly the worst manual I've ever read (bar a few oriental electronics manuals). Clearly written by someone involved in the development. Totally useless. Apart from that I dislike the syntax of object-oriented programs. I occasionally do something in VB.

 

For years I've done a lot of programming in CorelScript for Photopaint. Then that got changed to VBA. It made the simplest task a real pain. Even though I use PPX3 today I still do most of my work in PP7 (early Win95 vintage). It's so easy to knock off a script and the application itself is up and running in seconds. You can do far more with VBA but it's gross overkill for what I need. The only thing I miss from the VBA is that CorelScript can't Get and Put pixels. CorelScript to VBA is as AutoIt to VB.

 

As I noted in another thread PP7s tools are all controls, I'm not sure about PPX3. That has enabled simple automation by ME during hands-on editing (eg hanging on to the mouse while a hotkey with the other hand does something).

Link to comment
Share on other sites

CorelScript to VBA is as AutoIt to VB.

Haters of VB are often lovers of C#, C++, Assembler, etc. (and usually quite ignorant about VB, basing their opinions on hearsay and statements that were out of date years ago). Your preference goes entirely the other way!

Mind you, writing a hardware driver in VB is not something I've ever encountered - quite bizarre, I would have thought.

Link to comment
Share on other sites

Haters of VB are often lovers of C#, C++, Assembler, etc. .....

 

Not me. Syntax should be as unobtrusive as possible and mimic human thought trains. ME is perhaps an extreme example of where syntax is dealt with outside the human interface. You select what you want to do in simple terms. You don't have to care about how that is going to be translated down - syntax by others. Many of the languages in use are gross overkill for average purposes but you are forced to use them even for simple tasks because they come with an application.

Link to comment
Share on other sites

I had a VB hater in my midst once while I was poking around learning and like most would go on and on about how bad it was, what slow performance it had, and so on. But after he saw me using THE SAME IDE as all the 'good' programs used he was perplexed and checked it out. Well as is often the case he was basing all his judgment on the old VB and not the current VB.NET. After a while he changed his tune and was actually excited about it. And since it runs on the same .NET Framework realized it's just as fast and capable as the 'real' programming languages.

 

That reminds me, I really need to get back to my lessons. It's really hard for me to bend my mind to go from procedural based thinking OO programming. But I like it...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...