News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

QEditor plugin: most recently used files

Started by jj2007, December 29, 2022, 11:08:55 AM

Previous topic - Next topic

jj2007

One more try :cool:

.if !Instr_(esi, "MostRecentUsed.dll", 1)
.if !Instr_(esi, "[&Tools]", 1)
.if !Instr_(esi, "[Plugin]", 1)
void Instr_(esi, "[help]", 1)
.endif
.endif
.if edx
add eax, 5
.Repeat
inc eax
mov dl, [eax]
.Until dl=="&" || !dl
.if dl


The MessageBox will be misleading, as the entry is not under "Tools".

zedd151

Quote from: jj2007 on December 29, 2022, 12:54:55 PM
So you have no [&Tools entry]... hmmmm... which means I must add another test :rolleyes:
It works with a pristine 'menus.ini' file. I did a new install on another drive. And it works so far...  :biggrin:

jj2007

Quote from: zedd151 on December 29, 2022, 01:01:47 PM
Quote from: jj2007 on December 29, 2022, 12:54:55 PM
So you have no [&Tools entry]... hmmmm... which means I must add another test :rolleyes:
It works with a pristine 'menus.ini' file. I did a new install on another drive. And it works so far...  :biggrin:

Great, but nonetheless I will replace the first version with one that checks, if [&Tools] is not found, for the presence of other menu entries. Tomorrow - it's 3:03 AM over here. Good night :biggrin:

zedd151

#18
MruInsertV2 worked okay too under "Plugins". But you can't really rely on any menus.ini entry being present:undecided:    Users routinely modify the menus.ini file, adding to it, removing things they do not need, etc. Even some don't use menus.ini at all:dazzled:    They just use the basic embedded functions of qeditor. I had a lot of phun when attempting to make the PluginBuilder work for everyone even with 'menus.ini' issues in their Masm32 SDK installation. I gave up though making it work for the masses... and keep it for private use.


... Just a couple tips for you.

Possibly pop up a messagebox asking if okay to create a "menus.ini" file if not present, also possibly add a "Tools" or "&Tools" popup menu to "menus.ini" if the tools menu is not present?

zedd151


After thinking about this for a while ...
Instead of the tips I offered in the last post, maybe it would be better that you stipulate that both 'menus.ini' must be present and the "[&Tools]" submenu must be present in the menus.ini file. (User must add "[&Tools]" submenu theirself if had been removed by them).

This would remove any unnecessary complexity to the program, and it would rest on the user to meet the simple requirement.  :icon_idea:
Good that you make a backup of the original menus.ini file in case anything goes sideways during the installation, or the user decides not to use the MRU after all.  :thumbsup:  One thing I hadn't done with the PluginBuilder. (backup of menus.ini)

jj2007

Quote from: zedd151 on December 29, 2022, 03:29:15 PMit would be better that you stipulate that both 'menus.ini' must be present and the "[&Tools]" submenu must be present in the menus.ini file.

Thanks, Z. In the end I voted for:

a) assuming that menus.ini is present (it's needed for QE to work) and
b) checking for [&Plugins], [&Tools], [&Help] in that order, and if none of them was found, pick the first [whatever] menu.

It renames now \Masm32\menus.ini to e.g. menus29.old (i.e. today's date=29, as an additional safety measure).

If the currently loaded file is modified, the plugin will prompt you "discard changes": yes, no, cancel.

Hope that works for everybody, the new version is attached to the first post.

zedd151

Quote from: jj2007 on December 29, 2022, 10:00:16 PM
... it's needed for QE to work ...

That's not entirely true. You just wouldn't have the added functionality.

jj2007


zedd151

Quote from: jj2007 on December 30, 2022, 01:15:46 AM
You are right :thumbsup:
But it should be fine, whatever you do in the final release. I would check the submenu names with and without the ampersand '&'. Knuckleheads like me generally remove them. I rarely use keyboard combinations, due to issues with dexterity in my left hand.


I will test the latest version a bit later...  :biggrin:

jj2007

Quote from: zedd151 on December 30, 2022, 01:49:12 AMI would check the submenu names with and without the ampersand '&'. Knuckleheads like me generally remove them.

I thought about the ampersands, actually. This is the usage in a very old (October 2011) "official" version of menus.ini:

[&Project]
[&Tools]
[&Code]
[Conversions]
[Scr&ipt]
[help]

zedd151

probably makes sense to let the current version circulate and gauge any feedback from others. This would help determine if this is just a 'zedd issue'  :tongue:  or more widespread.  :biggrin:

zedd151

#26

Well under the Tools menu, 'Recent Files' menuitem okay. (1.PNG.zip)

Upon clicking on 'Recent Files' there, the window maximizes to the height of the screen (1280x1024 monitor) and justifies qeditors window to the right. I'll zip a screenshot seperately. (4.zip) <--- definitely an issue that needs looking into

Also, a menu entry on the menubar 'Recent Files'. I assume for verification that the plugin is active? (2.Png.zip)

But yes, the MRU list is where it is expected under the 'File' menu.(3.PNG.zip)
Hope this helps.


Attached images removed as they have served their intended purpose

zedd151

#27
And clicking on the file in the MRU list does indeed work as expected.  :thumbsup:  Forgot to mention that above.
added...
Here is a screenshot of how qeditor looks for me when normally opened, for comparison to the 4.zip image from above post

The only issue I see so far is the window resizing.  :sad: Everything else seems to work fine.  :thumbsup:

Attachment removed as it has served its intended purpose.

jj2007

Quote from: zedd151 on December 30, 2022, 03:03:23 AMThe only issue I see so far is the window resizing.  :sad: Everything else seems to work fine.  :thumbsup:

Get used to it, it's a feature :biggrin:

(you can always resize it...)

I posted a new version that does no longer add a separate "Most recent" menu. Try it, and tell me if you see any difference when opening a file :cool:

zedd151

Quote from: jj2007 on December 30, 2022, 03:37:26 AM
Try it, and tell me if you see any difference when opening a file :cool:

Works fine. Of course the window resizing persists.


Actually I liked the 'Recent Files' that was on the menu bar. Gives a quick indication that the plugin is active. Maybe put a message on the status bar instead though, to indicate that the plugin is active?
If the images I posted are no longer needed jj2007, I will remove them. So if you need em, keep a copy.