Choice.folos
{ "\f[name.%(zitai)]这里是简单的喃语查词\![open,inputbox,folosdelok,-1]" }
Input.folosdelok
{ if reference1 == "" ; "\f[name.%(zitai)]抱歉，我听不到任何词汇\w9\![open,inputbox,folosdelok,-1]" ; else ; delokfolos(reference1) }
delokfolos
{
    delok = _argv[0]
    res = ""
    _j = 0
    _ndk = "."+delok+"，"
    if RE_MATCH(delok,"[^A-Za-z%]+") == 1
    { res = SikanNufolosue(delok) }
    else
    {
        if "%" _in_ delok
        {
            _dek = SPLIT(delok,"%")
            foreach _dek ; _cc {
                if STRLEN(_cc) >1
                { _j += 1 }
            }
            if _j==3 || _j==0
            {}
            else
            {
                _tmp = REPLACE(_ndk,".%","")
                _tmp = REPLACE(_tmp,"%，","")
                res = SikanNufolosue(_tmp)
            }
        }
        else
        {
            res = SikanNufolosue(_ndk)
        }
    }
    "\f[name.%(zitai)]"
    --
    if res ; "目前查到的单词有：\n"+res ; else ; "没有查到"+delok+"相关的单词"
}
SikanNufolosue
{
    _aoi = _argv[0] 
    filepath="delok.txt"
    _txt=""
    FCHARSET(1);
    if FOPEN(filepath,"r")
    {
        for _buff = FREAD(filepath); _buff != -1; _buff = FREAD(filepath) 
        {  
            if "%" _in_ _aoi
            {
                _dek = SPLIT(_aoi,"%")
                if ARRAYSIZE(_dek) == 3
                {
                    _adk = _dek[0]
                    _nek = _dek[1]
                    _sak = _dek[2]
                     if _adk _in_ _buff && _nek _in_ _buff && _sak _in_ _buff 
                        _txt=_txt+_buff+"\n"
                }
                elseif ARRAYSIZE(_dek) == 2
                {
                    _adk = _dek[0]
                    _nek = _dek[1]
                     if _adk _in_ _buff && _nek _in_ _buff
                        _txt=_txt+_buff+"\n"
                }
            }
            else
            { if _aoi _in_ _buff ; _txt=_txt+_buff+"\n" }
        }
    }
    FCLOSE(filepath)
    FCHARSET(1)
    _txt
}
