Python 暂停用法原创
金蝶云社区-╄秋メ凋零
╄秋メ凋零
4人赞赏了该文章 117次浏览 未经作者许可,禁止转载编辑于2024年03月14日 16:25:48

#如果要使用Thread.Sleep方法,需要先引入System.Threading命名空间

from System.Threading import * #名空间

def BarItemClick(e):
    if e.BarItemKey  == "tbSplitSave":#保存触发

        date1=this.Model.GetValue("FModifyDate");
        Thread.Sleep(5000); #// 暂停5秒 
        date2=this.Model.GetValue("FModifyDate");
        this.View.ShowMessage(str(date1) + "  " + str(date2));

image.png

不过可能没什么作用,本以为可以延时执行看来Python插件的优先级比本身的保存服务高,以上仅供参考!

赞 4