• 一段古董代码留念


    if SelectState == "_SCENE" then
    (
        if SaveImgPath != undefined then
        (
            if checkTxt() then --三方路径已经正确
            (
                ini = (coolFolder + (txtName.text) +".txt")
                hasIni = doesFileExist ini --如果有类别的大INI
                if turing.isTrueNmae (txtName.text) then --保存名字非法字符检测
                (
                    if not hasIni then 
                    (
                        anyCoolReadyAddLib (jpgPath.text) (txtName.text) ("新建的模板名字为 :")	"Firest"
                    )
                    else
                    (
                        oldPath = getinisetting ini "Tip" "MaxPath"
                        if oldPath == maxPath.text then
                        (
                            anyCoolReadyAddLib (jpgPath.text) (txtName.text) ("修改的模板名字为 :")	"Last"
                        ) else turing.mbox "检测到已存在的文件名,
    
    但配置与当前Max文件路径不符,
    
    请重新更改一个模板名字。"	
                    )	
                )else turing.mbox "文件名存在非法字符,请重新输入。"	
            )else turing.mbox "路径检测未通过。"
        )else turing.mbox "请拖入预览图片。"	
    )else turing.mbox "请将标签切换至[场景]"	
    

    顺手改了下

    if SaveImgPath != undefined do return (turing.mbox "请拖入预览图片。")
    if checkTxt() == false do return (turing.mbox "路径检测未通过。")
    if turing.isTrueNmae (txtName.text) == false do return (turing.mbox "文件名存在非法字符,请重新输入。")
    
    local ini = coolFolder + txtName.text + ".txt"
    local hasIni = doesFileExist ini --如果有类别的大INI
    if not hasIni then 
    (
        anyCoolReadyAddLib (jpgPath.text) (txtName.text) ("新建的模板名字为 :") "Firest"
    )
    else
    (
        oldPath = getinisetting ini "Tip" "MaxPath"
        if oldPath != maxPath.text do return (turing.mbox "检测到已存在的文件名,
    
    但配置与当前Max文件路径不符,
    
    请重新更改一个模板名字。")
        anyCoolReadyAddLib (jpgPath.text) (txtName.text) ("修改的模板名字为 :") "Last"
    )
    
  • 相关阅读:
    json格式
    IntelliJ Idea 常用快捷键列表
    print、println与printf之间的区别
    ABAP开发实用快捷键
    Beforeunload打点丢失原因分析及解决方案
    javascript触发input-file的click事件
    h5的本地存储
    jQuery的map()与jQuery.map()总结
    用javascript预加载图片、css、js的方法研究
    JavaScript中的內定物件與函式: arguments, callee, caller, this, apply(), call()
  • 原文地址:https://www.cnblogs.com/trykle/p/13705353.html
Copyright © 2020-2023  润新知