Jump to content

Recommended Posts

Posted

I am trying to record the actions users take using reactors. I can't seem to find out how to retrieve the last command. Does anyone know of a method or the table in the database which this is stoed?

 

I know the system variable cmdnames should store the last command but when i try to retrieve it I always get the "" as a value

 

Thanks

Ollie

Posted

You could try LASTPROMPT I suppose, but I don't think it'd be much help.

 

If you are trying to record which commands users enter, then this is easily achieved using a simple command reactor, where information about command line entry is easily retrieved.

Posted

If you want to use the last command you used, then you can just hit enter. You can also "RIGHT CLICK" and see a list of the recent commands.

 

 

Hope this helps!

Posted

Or, as an alternative, (cred to RJP):

 

(defun c:cbl (/ ws)
 (vl-load-com)
 (setq ws (vlax-get-or-create-object "wscript.shell"))
 (repeat 2 (vlax-invoke ws 'sendkeys "{UP}"))
 (vlax-invoke ws 'sendkeys "{ENTER}")
 (vlax-release-object ws)
 (princ))

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • Create New...