Auto find Account name

His Dad [03-16-15 - 03:47]
Auto find Account name
Filename
doc/offline_use.txt
lua/RTOffline.lua
diff --git a/doc/offline_use.txt b/doc/offline_use.txt
index ac193ad..778ce4e 100644
--- a/doc/offline_use.txt
+++ b/doc/offline_use.txt
@@ -8,8 +8,8 @@ download http://sourceforge.net/projects/iup/files/3.13/



-This is zip archive which contain 2 versions of Lua with the IUP Dlls.
-It also contains some exe programs what we dont need.
+This is a zip archive which contains 2 versions of Lua with the IUP Dlls.
+It also contains some exe programs that we don't need.
 Unzip it and move stuff around if you want.
 The basic is in directory \IUP\Lua52  All else can be discarded.

@@ -17,7 +17,7 @@ Lua52 contains a command line exe (lua52.exe) that has a console--good for debug



-Open it in a text editor.
+Open RTOffline.lua in a text editor.

 Review this line.

diff --git a/lua/RTOffline.lua b/lua/RTOffline.lua
index f242ef7..ab2e8f0 100644
--- a/lua/RTOffline.lua
+++ b/lua/RTOffline.lua
@@ -4,8 +4,7 @@ dateformat = "%d/%m, %H:%M"
 require( "iuplua" )
 require( "iupluacontrols" )

-dofile "ResearchTimer.lua"
-local allcraft = ResearchTimer["Default"]["@MYACCOUNTNAME"]["$AccountWide"]["Craft"]
+dofile "C:/iup/prog/ResearchTimer.lua"

 function dump(o)
    if type(o) == 'table' then
@@ -20,8 +19,14 @@ function dump(o)
    end
 end

+local i =0 k =0
+
+for i,_ in pairs(ResearchTimer["Default"]) do -- Only one entry
+	myaccount = i
+end
+
+local allcraft = ResearchTimer["Default"][myaccount]["$AccountWide"]["Craft"]

-local allcraft = ResearchTimer["Default"]["@Hisdad"]["$AccountWide"]["Craft"]
 -- print (dump (allcraft))
 local summary = {} names = {}
  for char, _ in pairs(allcraft) do