This post is intended to explain a specific objective which is a popup dialog to rename selected file(s) with a suffix.
No attempt is made at described how this would be achieved.
This post is in relation to 2 recent posts
Calls from within OnGetNewName; and
Passing args to OnGetNewName - Part 2.
The dialog would be invoked by a hotkey or it could be a button.
Once invoked a popup dialog would appear similar or the same to that one shown below:
The dialog has 2 fields - a text field and a pulldown menu.
The cursor location would ideally be defaulted to the text field.
If possible the text field would be populated with the last entry returned by the dialog. This is not essential and would probably complicate matters. But it is desirable and I would like to add this feature when I work through the challenge at some point if not immediately.
Striking the tab key would move the cursor between the text and the pulldown fields.
The user would add a suffix to selected file(s) in 2 ways:
Option1 - Text entry
Enter some text in the text field and hit enter or click ok.
The file(s) would then have the text added as a suffix after a space.
For example if "BLAH" was entered in the text field then a filename would be changed in this way:
Before:
Sample_filename.doc
After:
Sample_filename BLAH.doc
Option2 - Pulldown menu
The user would strike the tab key (or use mouse) to move the cursor from the text field to the pulldown menu.
The pulldown menu would comprise a list of predefined options each having it's own accelerator key.
The top entry in the screenshot is "TopSuffixEntry" with the accerator key as "t"
The user would select a pulldown menu entry and then hit enter or click ok.
The selected file(s) would then have their filenames changed by adding a space and the selected suffix.
For example consider the user wants to select the top entry "TopSuffixEntry".
The user then needs to move the cursor to the pulldown menu (hit tab or use mouse) and then hit enter or click ok.
A sample filename would be changed in this way:
Before:
Sample_filename.doc
After:
Sample_filename TopSuffixEntry.doc
I hope this all makes sense.
As mentioned no attempt is made here to suggest how I envisage achieving this.
The two posts mentioned above constitute the sum of my considerations ably assisted by those who have replied on those posts. One question was - what are you trying to do?
Hence this description
Hope this makes sense!