Current Field Variable in a Script
Is it possible to use a variable in a script that will cause actions to be performed on whatever is the active field?
A common use I have is when clicking on a field, if it's empty, then the contents of the clipboard are pasted. If not empty, the field is selected normally.
Currently, I have been creating a separate script for each and every field. The field is a button with a Perform Script action:
Paste [Select; No style; Contact::Phone]
Go to Field [Contact::Phone]
It would be nice if a variable with Get (ActiveFieldName) could be used. I'm envisioning this, but it doesn't seem possible:
Set Variable [$ActiveFieldName; Value:Get ( ActiveFieldName )]
Paste [Select; No style; $ActiveFieldName]
Go to Field [$ActiveFieldName]