2
Opens the existing script named "run-test-script.lua" that you can use
3
for development. If the script does not exist it will be created and
4
added to the "Tools->Lua Scripts" menu, under the same menu item as
8
local test_script=geany.dirname(geany.script)..geany.dirsep.."02.run-test-script.lua"
10
local comment=' This is your "scratch pad" for developing new scripts.'
14
local stat,err=geany.stat(test_script)
16
if stat.type=="r" then
17
if geany.open(test_script) == 0 then
18
geany.message("Can't open script!", test_script.."\nAccess denied.")
21
geany.message("Can't open script!", test_script.."\nNot a regular file.")
25
if geany.confirm("Can't open script!", test_script..
26
"\n"..err.."\n\nWould you like to create this file?", true)
28
fh,err=io.open(test_script,"w")
30
fh:write("--[[\n"..comment.."\n--]]\n\n")
34
geany.message("Can't create script!", "Error saving file.")
38
geany.message("Can't create script!", err)