Lupus
September 7th, 2004, 02:31 PM
Hi there!
This is my first post in this forum, though I've had some experience with Girder, and I did read the FAQ and forum posts before asking this question :wink:
I'm using two IGOR - type IR receivers, both connected to COM ports (COM1 and 2). They work fine, I've managed to come up with quite a nice GML that does it's job well.
What I'm trying two achieve is to be able to switch between those two ports using Girder - I have the receivers set in two seperate rooms, and I'd like to use just my remote to change "zones" :)
I've come up with a part of the answer - a LUA script, using Girder-specific, Windows-registry manipulation functions :wink: - Reg[Get/Set]StringValue().
heres the code:
r,x = RegGetStringValue("HKEY_LOCAL_MACHINE", "Software\\Girder3\\HardPlugins\\Igor SFH-56 device","ComName");
if ( r == 0 ) then
if (x == "COM1") then
RegSetStringValue ("HKEY_LOCAL_MACHINE", "Software\\Girder3\\HardPlugins\\Igor SFH-56 device","ComName","COM2");
else
RegSetStringValue ("HKEY_LOCAL_MACHINE", "Software\\Girder3\\HardPlugins\\Igor SFH-56 device","ComName","COM1");
end
end
As you can see the thing is pretty simple (getting the revelation of using the registry wasn't :oops: :wink:)
What I have a problem with is:
how do I get the plugin (IgorPlug.dll) to be reloaded - or more exactly, to get it to re-read it's setting (something that is done when you press OK after doing SETTINGS on it)
(of course as a Girder action - or anything that can be done by Girder :) ).
I've tried capturing messages etc., but it proved fruitless.
Any help and/or advice is most welcome :D
(PS. I'm using Girder 3.2.9 with IgorPlug v1.11)
This is my first post in this forum, though I've had some experience with Girder, and I did read the FAQ and forum posts before asking this question :wink:
I'm using two IGOR - type IR receivers, both connected to COM ports (COM1 and 2). They work fine, I've managed to come up with quite a nice GML that does it's job well.
What I'm trying two achieve is to be able to switch between those two ports using Girder - I have the receivers set in two seperate rooms, and I'd like to use just my remote to change "zones" :)
I've come up with a part of the answer - a LUA script, using Girder-specific, Windows-registry manipulation functions :wink: - Reg[Get/Set]StringValue().
heres the code:
r,x = RegGetStringValue("HKEY_LOCAL_MACHINE", "Software\\Girder3\\HardPlugins\\Igor SFH-56 device","ComName");
if ( r == 0 ) then
if (x == "COM1") then
RegSetStringValue ("HKEY_LOCAL_MACHINE", "Software\\Girder3\\HardPlugins\\Igor SFH-56 device","ComName","COM2");
else
RegSetStringValue ("HKEY_LOCAL_MACHINE", "Software\\Girder3\\HardPlugins\\Igor SFH-56 device","ComName","COM1");
end
end
As you can see the thing is pretty simple (getting the revelation of using the registry wasn't :oops: :wink:)
What I have a problem with is:
how do I get the plugin (IgorPlug.dll) to be reloaded - or more exactly, to get it to re-read it's setting (something that is done when you press OK after doing SETTINGS on it)
(of course as a Girder action - or anything that can be done by Girder :) ).
I've tried capturing messages etc., but it proved fruitless.
Any help and/or advice is most welcome :D
(PS. I'm using Girder 3.2.9 with IgorPlug v1.11)