Author Topic: Enter to repeat command from Menu  (Read 1920 times)

0 Members and 1 Guest are viewing this topic.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Enter to repeat command from Menu
« on: January 12, 2010, 03:29:39 AM »

I have a vague recollection of recently seeing a method of allowing Enter to repeat command from a Menu.

Does anyone have a better recollection than me ??

Regards
Kerry
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Enter to repeat command from Menu
« Reply #1 on: January 12, 2010, 09:39:01 AM »
Are you thinking of the asterisk? I think if you prefix a macro with it the command will repeat.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Crank

  • Water Moccasin
  • Posts: 1503
Re: Enter to repeat command from Menu
« Reply #2 on: January 12, 2010, 01:17:17 PM »
The asterisk works. You can also use the command MULTIPLE
Vault Professional 2023     +     AEC Collection

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Enter to repeat command from Menu
« Reply #3 on: January 13, 2010, 06:31:18 PM »

...........   seeing a method of allowing Enter to repeat command from a Menu.

Does anyone have a better recollection than me ??

Regards
Kerry

My question did not reflect my actual situation.
I'm calling any one of several  Functions/Commands from a modeless dialog. ( think of the dialog as a menu)

I want the user to be able to press ENTER after running one instance of the command and have the command repeat.
I recall reading somewhere of a method of forcing the system to recognise the function (SUBR) as the last command run.

I don't want to run MULTIPLE consecetive instances, I want the option of pressing ENTER and have another instance.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Enter to repeat command from Menu
« Reply #4 on: January 13, 2010, 08:59:05 PM »
Sifu Owen has resolved my problem ... though in a different manner ..

The button_OnClicked Event function was defined as a command (SUBR)
ie:
(DEFUN C:KDUB_CommandCenter_Form_B01_OnClicked (/) (c:KDUB_Steel_Main))

If changed to a function (USUBR) , the last registered command completed is  c:KDUB_Steel_Main not the event trap, allowing for ENTER to repeat the command.
ie:
(DEFUN KDUB_CommandCenter_Form_B01_OnClicked (/) (c:KDUB_Steel_Main))


.. hope that explanation is understandable :)



« Last Edit: January 13, 2010, 09:10:12 PM by Kerry Brown »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Enter to repeat command from Menu
« Reply #5 on: January 13, 2010, 10:15:27 PM »
Useful information, Thanks Kerry.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: Enter to repeat command from Menu
« Reply #6 on: January 14, 2010, 09:04:19 AM »
Sweet - thanks Kerry!
James Buzbee
Windows 8