HoTMetal中使用JavaScript
5.怎样编写脚本来检查上次修改的日期
接着,我们调用当前文档的定制属性集:props = ActiveDocument.CustomDocumentProperties 并且检查这个属性的数字是否不等于零。我们已经在前面的On_Document_Open_Complete 宏中已经保存了,并将它赋值给oldMod:
oldMod = props.Item("LastMod").value
当我们发现oldMod (来自打开的文档) and newMod (来自磁盘)之间的矛盾的时候,我们应该告诉用户是否从磁盘上转载了这个文件:
var Yes = 6;
var No = 7;
var msg = "The disk version of this document has changed from the";
msg += "version in memory. Do you want to re-open the document?";
var ret = Application.MessageBox(msg, 36, "...[ 查看全文 ]