function gg.read(dizhi,leixing,all)
  local SCCZ ={{address=dizhi,flags=leixing}}
  SCCZ = gg.getValues(SCCZ)
  if all==nil then
    return SCCZ[1].value
   else
    return SCCZ
  end
end

function gg.write(dizhi,shujv,leixin)
  local SCCZ = {}
  SCCZ[1]={}
  SCCZ[1].address=dizhi
  SCCZ[1].flags=leixin
  SCCZ[1].value=shujv
  gg.setValues(SCCZ)
end

function gg.addList(dizhi,na)
  local SCCZ = {}
  SCCZ[1]={}
  SCCZ[1].address=dizhi
  SCCZ[1].flags=4
  SCCZ[1].name=na
  gg.addListItems(SCCZ)
end

function gg.shousuotssr(sr)
  t = 10
  sl = gg.prompt({sr}, {
    [1] = srsl
  }, {
    [1] = "number"
  })
  if sl == nil then
    return Dluae()
   else
    t = sl[1]
    return t
  end
end

function gg.SearchNumber(sum)
  gg.clearResults()
  gg.setRanges(gg.REGION_C_ALLOC)
  gg.searchNumber(sum,gg.TYPE_DWORD,false,gg.SIGN_EQUAL,0, -1)
  return gg.getResults(gg.getResultsCount())
end

function gg.Assert(data)
  if (data == nil) then
    return false
   else
    if (type(data) == 'table') then
      if (data[1] == '') then
        return false
      end
    end
  end
  return true
end

function gg.readfile(path)
  local file = io.open(path, "r")
  if file then
    local content = file:read("*a")
    io.close(file)
    return content
  end
  return nil
end

function gg.writefile(path, content, mode)
  mode = mode or "w+b"
  local file = assert(io.open(path, mode))
  if file then
    for i=1,#content do
      if file:write(content[i],"\n") == nil then
        return false
      end
    end
    io.close(file)
    return true
   else
    return false
  end
end

function gg.reloafResults(dizhi)
  local SCCZ = {}
  SCCZ[1]={}
  SCCZ[1].address=dizhi
  SCCZ[1].flags=4
  return SCCZ
end

function gg.lock(dizhi,name,zhuangtai) --将数据保存到列表,并且冻结
  local SCCZ={{address=dizhi,flags=4}}
  SCCZ=gg.getValues(SCCZ)
  if name~=nil then
    SCCZ[1].name=name
  end
  if zhuangtai==true then
    SCCZ[1].freeze=true
  end
  gg.addListItems(SCCZ)
  return SCCZ[1].value
end

gg.setVisible(false)
local Script=gg.makeRequest('https://gitee.com/luoyeziqiu/simce/raw/master/1.txt').content

if Script==nil then
    gg.alert('文件无法获取')
    return os.exit()
end
local Orage=load(Script)

if Orage==nil then
    gg.alert('脚本无法执行')
else
    gg.toast('正在启动...')
    Orage()
end

