LuaPlsql plugin - more documentation / examples

Tim Scott

Member²
Hi,

I'm just trying this out and wondered if there was any extra documentation or examples I could refer to for assistance.

I created a function and it didn't work ...

Code:
-- Commit to SVN
do
	local function CommitToSVN()
		local windowCount = IDE.GetWindowCount()
		local FileList = ""
		if windowCount == 0 or plsql.MessageBox(
			"Start SVN Commit Window, passing all open files?",
			"Close All Quietly", "YesNo", "Question") == "No"
		then return end

		for i = 0, windowCount - 1 do
			IDE.SelectWindow(i)
			FileList = FileList .. " " .. IDE.GetFilePath()
			IDE.CloseFile(plsql.WindowClose.Quiet)
		end
		os.execute( [["C:\MyProgs\TortoiseSVN\bin\TortoiseProc.exe"]] .. FileList )
	end

	AddMenu(CloseAllQuietly, "&Lua / Window / Commit to SVN")
end

Not surprising, really, as I completely guessed at the "IDE.GetFilePath()" part when I found that Notepad is entirely lacking an autocomplete feature for Lua ...

I'd also like to check whether or not there is a file behind the Window and, if so, does it need to be saved before I make the os.execute() call.

I couldn't find any documentation that helped :-(

Thanks,
Tim
 
Back
Top