Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Autos
- Official Startup File
- Autos is a copyrighted program. Any modified version of
- Autos submitted onto the internet under a different name
- or author are not permitted.
- That said, you may ask for permission to upload an add-on,
- or application that you would recommend onto the comments
- section of the forum post of Autos.
- ]]--
- os.pullEvent = os.pullEventRaw
- -- Loading the APIs
- os.loadAPI("System/.osfiles/resources/APIs/autos")
- os.loadAPI("System/.osfiles/resources/APIs/settings")
- -- The config classes
- cfgClasses = {
- "Colors",
- "Applications",
- "OSSettings",
- "Images",
- "Icons"
- }
- -- The OSInfo Box
- box_osinfo = {
- x = 3,
- y = 2,
- w = 23,
- h = 10,
- t = "TERMINAL INFO"
- }
- -- The OSPic Box
- box_ospic = {
- x = 30,
- y = 3,
- w = 18,
- h = 15,
- t = ""
- }
- -- Current version
- osVersion = "0.01"
- -- Config File Path
- fs_config = "System/.osfiles/.cfg"
- -- Desktop File Path
- fs_desktop = "System/.osfiles/osparts/desktop"
- -- Width and Height of Term
- w,h = term.getSize()
- -- Loading Background Image
- bg_mainSplash = paintutils.loadImage("System/.osfiles/resources/IMGs/fileSplash.img")
- -- Checking if this computer has the config file
- if not fs.exists(fs_config) then
- firstTime = true
- for i=1,#cfgClasses do
- autos.fileWriteTo(fs_config,"["..cfgClasses[i].."]".."\n")
- end
- loadedCFG = settings.openSettingsFile(fs_config)
- loadedCFG.setSectionedValue("Colors","col_mainback","8")
- loadedCFG.setSectionedValue("Colors","col_maintext","1")
- loadedCFG.setSectionedValue("Colors","col_butnback","2048")
- loadedCFG.setSectionedValue("Colors","col_butntitl","8")
- loadedCFG.setSectionedValue("Colors","col_butntext","1")
- loadedCFG.setSectionedValue("Colors","col_butnhilt","16384")
- loadedCFG.setSectionedValue("Colors","col_titlback","2048")
- loadedCFG.setSectionedValue("Colors","col_titltext","32762")
- loadedCFG.setSectionedValue("Colors","col_titlhilb","8192")
- loadedCFG.setSectionedValue("Colors","col_titlhilt","1")
- loadedCFG.setSectionedValue("OSSettings","oss_showIcons","1")
- loadedCFG.setSectionedValue("OSSettings","oss_version",osVersion)
- loadedCFG.setSectionedValue("Images","img_fileIcon1","System/.osfiles/resources/IMGs/fileIcon1.img")
- loadedCFG.setSectionedValue("Images","img_fileIcon2","System/.osfiles/resources/IMGs/fileIcon2.img")
- loadedCFG.setSectionedValue("Images","img_fileBack1","System/.osfiles/resources/IMGs/fileBack1.img")
- loadedCFG.setSectionedValue("Icons","ico_i1_x","2")
- loadedCFG.setSectionedValue("Icons","ico_i1_y","2")
- loadedCFG.setSectionedValue("Icons","ico_i2_x","14")
- loadedCFG.setSectionedValue("Icons","ico_i2_y","2")
- loadedCFG.save(fs_config)
- else
- firstTime = false
- loadedCFG = settings.openSettingsFile(fs_config)
- col_mainback = loadedCFG.getSectionedValue("Colors","col_mainback")
- col_maintext = loadedCFG.getSectionedValue("Colors","col_maintext")
- col_butnback = loadedCFG.getSectionedValue("Colors","col_butnback")
- col_butntitl = loadedCFG.getSectionedValue("Colors","col_butntitl")
- col_butntext = loadedCFG.getSectionedValue("Colors","col_butntext")
- col_butnhilt = loadedCFG.getSectionedValue("Colors","col_butnhilt")
- col_titlback = loadedCFG.getSectionedValue("Colors","col_titlback")
- col_titltext = loadedCFG.getSectionedValue("Colors","col_titltext")
- col_titlhilb = loadedCFG.getSectionedValue("Colors","col_titlhilb")
- col_titlhilt = loadedCFG.getSectionedValue("Colors","col_titlhilt")
- oss_ostype = loadedCFG.getSectionedValue("OSSettings","oss_ostype")
- oss_usertype = loadedCFG.getSectionedValue("OSSettings","oss_usertype")
- oss_version = loadedCFG.getSectionedValue("OSSettings","oss_version")
- loadedCFG.save(fs_config)
- col_mainback = tonumber(col_mainback)
- col_maintext = tonumber(col_maintext)
- col_butnback = tonumber(col_butnback)
- col_butntitl = tonumber(col_butntitl)
- col_butntext = tonumber(col_butntext)
- col_titlback = tonumber(col_titlback)
- col_titltext = tonumber(col_titltext)
- end
- if oss_ostype == "acp_normal" then
- userType = "Adv.Computer"
- osType = "Computer Control"
- else
- if firstTime == true then
- if not term.isColor() then
- autos.clean(1,1)
- autos.pError("CRITICAL","OS Error: ADV.COMPUTER REQUIRED")
- sleep(0.1)
- autos.pError("TRUBLSHT","Searching for issue fix...")
- sleep(1.5)
- autos.pError("TRUBLSHT","Upgrade to Adv.Computer")
- return
- else
- loadedCFG = settings.openSettingsFile(fs_config)
- loadedCFG.setSectionedValue("OSSettings","oss_usertype","Adv.Computer")
- loadedCFG.setSectionedValue("OSSettings","oss_ostype","acp_normal")
- loadedCFG.save(fs_config)
- os.reboot()
- end
- else
- autos.clean(1,1)
- autos.pError("CRITICAL","OS Error: INVALID OS TYPE")
- sleep(0.1)
- autos.pError("TRUBLSHT","Searching for issue fix...")
- sleep(1.5)
- autos.pError("TRUBLSHT","Re-install Autos")
- return
- end
- end
- local tv1 = 0.1
- local tv2 = 0.3
- local time1 = math.random(tv1,tv2)
- local time2= math.random(tv1,tv2)
- local time3 = math.random(tv1,tv2)
- local time4 = math.random(tv1,tv2)
- local time5 = math.random(tv1,tv2)
- local time6 = math.random(tv1,tv2)
- local time7 = math.random(tv1,tv2)
- local time8 = math.random(tv1,tv2)
- local time9 = math.random(tv1,tv2)
- local time10 = math.random(tv1,tv2)
- local time11 = math.random(tv1,tv2)
- local time12 = math.random(tv1,tv2)
- local time13 = math.random(tv1,tv2)
- local time14 = math.random(tv1,tv2)
- local time15 = math.random(tv1,tv2)
- local time16 = math.random(tv1,tv2)
- local time17 = math.random(tv1,tv2)
- local time18 = math.random(tv1,tv2)
- if not os.getComputerLabel() then
- userLabel = "NO LABEL"
- else
- userLabel = os.getComputerLabel()
- end
- autos.bColor(col_mainback)
- autos.clean(1,1)
- autos.draw_Box(box_ospic.x,box_ospic.y,box_ospic.w,box_ospic.h,col_butnback,col_butntitl,box_ospic.t,false)
- paintutils.drawImage(bg_mainSplash,31,3)
- autos.tColor(col_butntext)
- autos.bColor(col_butnback)
- autos.setCursor(31,16)
- print("Made by AutoLocK")
- autos.draw_Box(box_osinfo.x,box_osinfo.y,box_osinfo.w,box_osinfo.h,col_butnback,col_butntitl,box_osinfo.t,false)
- autos.tColor(col_butntext)
- autos.setCursor(4,4)
- print("Version:")
- autos.setCursor(4,5)
- print("Type:")
- autos.setCursor(4,6)
- print("Label:")
- autos.setCursor(13,4)
- autos.tColor(col_butnhilt)
- print(oss_version)
- autos.setCursor(13,5)
- print(userType)
- autos.setCursor(13,6)
- print(userLabel)
- autos.setCursor(4,8)
- autos.tColor(col_butntitl)
- print("---------------------")
- autos.setCursor(4,10)
- autos.tColor(col_butntext)
- print(" WELCOME TO AUTOS! ")
- autos.draw_loadingBar(4,15,col_titlback,colors.lime,1)
- sleep(time1)
- autos.draw_loadingBar(4,15,col_titlback,colors.lime,2)
- sleep(time2)
- autos.draw_loadingBar(4,15,col_titlback,colors.lime,3)
- sleep(time3)
- autos.draw_loadingBar(4,15,col_titlback,colors.lime,4)
- sleep(time4)
- autos.draw_loadingBar(4,15,col_titlback,colors.lime,5)
- sleep(time5)
- autos.draw_loadingBar(4,15,col_titlback,colors.lime,6)
- sleep(time6)
- autos.draw_loadingBar(4,15,col_titlback,colors.lime,7)
- sleep(time7)
- autos.draw_loadingBar(4,15,col_titlback,colors.lime,8)
- sleep(time8)
- autos.draw_loadingBar(4,15,col_titlback,colors.lime,9)
- sleep(time9)
- autos.draw_loadingBar(4,15,col_titlback,colors.lime,10)
- sleep(time10)
- autos.draw_loadingBar(4,15,col_titlback,colors.lime,11)
- sleep(time11)
- autos.draw_loadingBar(4,15,col_titlback,colors.lime,12)
- sleep(time12)
- autos.draw_loadingBar(4,15,col_titlback,colors.lime,13)
- sleep(time13)
- autos.draw_loadingBar(4,15,col_titlback,colors.lime,14)
- sleep(time14)
- autos.draw_loadingBar(4,15,col_titlback,colors.lime,15)
- sleep(time15)
- autos.draw_loadingBar(4,15,col_titlback,colors.lime,16)
- sleep(time16)
- autos.draw_loadingBar(4,15,col_titlback,colors.lime,17)
- sleep(time17)
- autos.draw_loadingBar(4,15,col_titlback,colors.lime,18)
- sleep(time18)
- shell.run(fs_desktop)
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement