May 15, 200520 yr I wish to create a button that will automatically paste text (previously copied into the clipboard) into a field but which prompts me with an error message if the field in not empty ie so that I dont over write anything! Other wise if the file is empty then it will paste automatically thanks
May 15, 200520 yr If you don't want to allow a paste if the field contains data: If [ not IsEmpty(field) ] Halt Script End If Paste[No Style; field ] If you want to give the option to overwrite: If [ not IsEmpty(field) ] Show Custom Dialog( "Overwrite"; "Cancel"; "Field contains data. Replace with clipboard contents?" ] If [ Get(LastMessageChoice) = 2 ] Halt Script End If End If Paste [select; No style; field ] Paste can be problematic however. It's better to use Set Field [] or even script parameters. Otherwise, a User may find themselves pasting all kinds of junk into this field even if it's empty (like things previously copied onto clipboard from another app). You haven't said enough for me to describe how script parameter could be used and I am unsure when your copy process happens.
Create an account or sign in to comment