View Full Version : Error Windows control lua help?

September 2nd, 2005, 12:20 AM
Do I have bad setup this seems to be happening alot 3.3 ever since move to 3.3 from 3.2.9 nohin that should work does woerk help

error: attempt to call global `FindWindowEx' (a nil value)
stack traceback:
1: main of string "?" at line 9

following error from this what is not working here

--Select CD

UnloadLuaCom ()
LoadLuaCom ()
Table_entries = {}
-- Get Select CD Listbox Handle first
Hwnd = FindWindow (nil,"Select CD")
Hlb = FindWindowEx (Hwnd,nil,"ListBox",nil) --this is line 9

-- Next get entries in list box and put them in table

local i = 0
SendMessageGetText (Hlb,393,i,"Text",100)
if Text =="" then break end
position = strfind(Text," [%w]")-strlen (Text)
tinsert(Table_entries,(strsub(Text,position,strlen (Text))))
-- print (position.." "..Text)
i = i + 1
until Text == ""

number_entries = getn(Table_entries)
disp_num = 1
disp_entry = Table_entries[1]
--Tidy Up

collectgarbage ()

UnloadLuaCom ()

September 2nd, 2005, 06:04 AM
you need to enable the lua windows function plugin.

also, you do not need the luacom statements.

September 5th, 2005, 02:29 AM
ok that is enabled always has been that is what I was told last time am I supposed to put them in a different director it says it operating.....files are in plugin director


What luacom statement is required?

I had problems with Serial plugin too with these functions what is not right here have reinstalled several times plugin says it loaded?

Help this is really getting on my nerves. Why does the other find function work? :roll:

This is someome elses script so it works elsewhere for EAC so it seems to be something on my machine is there a service required for this to work?

September 5th, 2005, 02:49 AM
ok looking at status in setup the plugin is loaded but not sending events what causes this issue? or that because it is a plugin that does not send events

September 6th, 2005, 09:14 PM
Just to confirm, are you running girder 3.3.10 and you downloaded and ran the lua windows function plugin?

September 19th, 2005, 01:56 AM
Yes to both questions and it is enabled in settings I have had issues since upgrade from 3.29 to 3.3.10

It's like it not loaded in memory but girder says it is

generic Seriel port scripts wit these functions fail too so something is wrong ? Just not sure where

September 19th, 2005, 08:03 AM
try another function from that plugin like

print (ShowWindow)

September 25th, 2005, 05:02 AM

script finished return value=0

This is the response on playing that command in itown script editoring widow

September 25th, 2005, 08:00 AM
have you enabled the lua windows function plugin in the plugins tab?

September 25th, 2005, 08:10 PM
yes I have

September 25th, 2005, 08:11 PM
i am not sure what is going on.

what os?

i would complete uninstall g3.3, delete the dir, and then reinstall

September 26th, 2005, 02:14 AM
ok I have full slink-e install with some key stuff there so will copy reg for that part and install it later

Am running XP sp2

October 8th, 2005, 10:42 PM
I have managed to isolate the issue causing this. It relates to the load reg save reg commands. On girder close I save reg and on open load it.

This causes this issues by disabling these commands problem solved can you explain why this is the case?

October 9th, 2005, 08:22 AM
are you saving to the girder plugin reg entries? maybe you are disabling the plugin in the registry?

October 9th, 2005, 09:35 PM
I am using the old save reg command to a file on close .......and then restoring reg on open with load reg under Girder tab (points to file name) it is the load that seems to screw it. Disabling this event on open allows the plugin to function so somehow it must be smashing the plugin.

So maybe a bug or just that I need to initialise values instaed of saving and restoring stuff on close then open

October 31st, 2005, 04:40 PM
Any oideas save reg load reg on open and or clode is killing windows lua functions in someway this is obviously a bug am I the only one using this I have worked around by initialising variables but can someone comment it happen on two machines

November 21st, 2005, 06:32 PM
Any ideas why load reg command from saved file kills LUA windows functions?

November 21st, 2005, 07:47 PM
it might be disabling the plugin in the registry.