For fun, try inserting this as a front script:

on returnInField
get offset(("field "&quote&"script"&quote&" of card "&quote&"revscript"&quote), the long name of the target)
  if (it = 1) then
    put word 2 of the selectedLine into lineNum
    put line (lineNum) of fld "script" of card "revscript" into prevLine
    if (token 2 of prevLine is "=") then
put ("put"&&(token 3 to -1 of prevLine)&&"into"&&(token 1 of prevLine)) into line (lineNum) of fld "script" of card "revscript"
      select empty
      send "revFormatField lineNum,lineNum" to card "revscript"
      select after line (lineNum) of fld "script" of card "revscript"
    end if
  end if
  pass returnInField
end returnInField

Now edit any script and enter "x=5" or some other simple assignment on a line by itself. Hit return. Voila, translation to "verbose" =)!

I'm sure there are various ways a plugin could use this sort of magic to allow customized syntax, without needing changes to the Rev engine. It would just become a script editor convenience. You could always trap script editing messages to even hide the conversion rather than converting it on the fly.

- Brian

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to