piratao2
February 16th, 2007, 04:12 AM
Ok, I've opened this new thread since I thought the original one did not have the correct title.
http://www.promixis.com/forums/showthread.php?t=16245
I'm building my own GML file to support:
Winamp
Zoom Player
Windows Operations (Mouse, Keyboard)
TVedia
*maybe I add more later.
I want to have a OSD Menu to choose what application to start and once started, I want the group of commands for that application to be enabled and the others disabled. This will be triggered with a button on the X10 remote UR81A and the X10 RF receiver MR26A.
I have all configured and now I'm working on the OSD Menu, which needs to enable/disable groups based on which option was choosen by the user on the OSD menu.
My doubt for now is how I can do to make the response from the OSD menu trigger the related macro on girder. I've created some macros for each of the options of the OSD menu and each of these macros will do the necessary actions to enable an application and disable the others. The problem is how to relate the option choosen on the OSD menu with the macros I've already created.
Any ideas, examples? Please I'm stuck on this, have searched but it looks nobody uses this approach...
This is the current OSD menu code that I want to change as mentioned in the previous post.
--[[
OSD Menu example
:New ({Modifiers})
Modifiers is a table containing modifications to the base class (see osd.lua). The example below specifies a callback function.
:Initialize ()
Setups up the menu
:Show (ForceToTopOfScreen,Title,{Table of items})
--]]
local function ShowResult (number,text)
osd.StatusMessage ("Processando\n"..text)
if number == 1 then -- launch app 1
--[[ HERE I WOULD LIKE TO CALL A MACRO THAT WILL DISABLE
SOME GROUPS AND ENABLE OTHERS, OPEN THE RELATED
APPLICATION, SET FOCUS, ETC
]]
elseif number == 2 then
--[[ HERE I WOULD LIKE TO CALL A MACRO THAT WILL DISABLE
SOME GROUPS AND ENABLE OTHERS, OPEN THE RELATED
APPLICATION, SET FOCUS, ETC
]]
elseif number == 3 then
--[[ HERE I WOULD LIKE TO CALL A MACRO THAT WILL DISABLE
SOME GROUPS AND ENABLE OTHERS, OPEN THE RELATED
APPLICATION, SET FOCUS, ETC
]]
elseif number == 4 then
--[[ HERE I WOULD LIKE TO CALL A MACRO THAT WILL DISABLE
SOME GROUPS AND ENABLE OTHERS, OPEN THE RELATED
APPLICATION, SET FOCUS, ETC
]]
else
--[[ HERE I WOULD LIKE TO CALL A MACRO THAT WILL DISABLE
SOME GROUPS AND ENABLE OTHERS, OPEN THE RELATED
APPLICATION, SET FOCUS, ETC
]]
end
end
local menu = osd.Classes.Menu:New ({Callback = ShowResult})
menu:Initialize ()
menu:Show (true,"Menu Principal",{"1-Winamp","2-Zoom Player","3-Windows Media Player","4-TVedia Portal (default)",})
Thanks in advance.
http://www.promixis.com/forums/showthread.php?t=16245
I'm building my own GML file to support:
Winamp
Zoom Player
Windows Operations (Mouse, Keyboard)
TVedia
*maybe I add more later.
I want to have a OSD Menu to choose what application to start and once started, I want the group of commands for that application to be enabled and the others disabled. This will be triggered with a button on the X10 remote UR81A and the X10 RF receiver MR26A.
I have all configured and now I'm working on the OSD Menu, which needs to enable/disable groups based on which option was choosen by the user on the OSD menu.
My doubt for now is how I can do to make the response from the OSD menu trigger the related macro on girder. I've created some macros for each of the options of the OSD menu and each of these macros will do the necessary actions to enable an application and disable the others. The problem is how to relate the option choosen on the OSD menu with the macros I've already created.
Any ideas, examples? Please I'm stuck on this, have searched but it looks nobody uses this approach...
This is the current OSD menu code that I want to change as mentioned in the previous post.
--[[
OSD Menu example
:New ({Modifiers})
Modifiers is a table containing modifications to the base class (see osd.lua). The example below specifies a callback function.
:Initialize ()
Setups up the menu
:Show (ForceToTopOfScreen,Title,{Table of items})
--]]
local function ShowResult (number,text)
osd.StatusMessage ("Processando\n"..text)
if number == 1 then -- launch app 1
--[[ HERE I WOULD LIKE TO CALL A MACRO THAT WILL DISABLE
SOME GROUPS AND ENABLE OTHERS, OPEN THE RELATED
APPLICATION, SET FOCUS, ETC
]]
elseif number == 2 then
--[[ HERE I WOULD LIKE TO CALL A MACRO THAT WILL DISABLE
SOME GROUPS AND ENABLE OTHERS, OPEN THE RELATED
APPLICATION, SET FOCUS, ETC
]]
elseif number == 3 then
--[[ HERE I WOULD LIKE TO CALL A MACRO THAT WILL DISABLE
SOME GROUPS AND ENABLE OTHERS, OPEN THE RELATED
APPLICATION, SET FOCUS, ETC
]]
elseif number == 4 then
--[[ HERE I WOULD LIKE TO CALL A MACRO THAT WILL DISABLE
SOME GROUPS AND ENABLE OTHERS, OPEN THE RELATED
APPLICATION, SET FOCUS, ETC
]]
else
--[[ HERE I WOULD LIKE TO CALL A MACRO THAT WILL DISABLE
SOME GROUPS AND ENABLE OTHERS, OPEN THE RELATED
APPLICATION, SET FOCUS, ETC
]]
end
end
local menu = osd.Classes.Menu:New ({Callback = ShowResult})
menu:Initialize ()
menu:Show (true,"Menu Principal",{"1-Winamp","2-Zoom Player","3-Windows Media Player","4-TVedia Portal (default)",})
Thanks in advance.