I want to set a value in a certain field F[fname] on the screen. But sometimes this field is a read-only field, and my command Set F[fname] "..." returns a syntax error. How can I avoid this?

Please use

if I[fname]
  Set F[fname] "..."
endif

or equivalent

if I[fname]
  Set I[fname] "..."
endif