-- save to "screenshots" folder as "screenshot_(date)_(time).png
local time = os.date("%Y-%m-%d_%Hh-%Mm-%Ss")
createScreenshot("screenshots/screenshot_" .. time .. ".png")
if getProperty("platform") == "html5" then
-- web browser add relevant screenshot code here
else
-- desktop add relevant screenshot code here
end
if getProperty("platform") == "html5" then
-- save to "screenshots" folder as "screenshot_(date)_(time).png
local time = os.date("%Y-%m-%d_%Hh-%Mm-%Ss")
createScreenshot("screenshots/screenshot_" .. time .. ".png")
else
-- save to "screenshots" folder as "screenshot_(date)_(time).png
local time = os.date("%Y-%m-%d_%Hh-%Mm-%Ss")
createScreenshot("screenshots/screenshot_" .. time .. ".png")
end
local dir = os.getenv("userprofile") .. "\\Documents\\"
lfs.mkdir(dir .. "\\Example Game Name")
lfs.mkdir(dir .. "\\Example Game Name\\Screenshots")
local time = os.date("%Y-%m-%d_%Hh-%Mm-%Ss")
createScreenshot(dir .. "\\Example Game Name\\screenshots\\" .. time .. ".png")