Reply
Djo
Logi Browser
Djo
Posts: 7
Registered: ‎08-29-2009
0
Accepted Solution

Scripting: G13 + G11. How to get 2 difrent scripts on G13 & G11's G buttons

Hey all

What I would like to see is the following:

G13 button G1: Runs script X

G15 button G1: Runs script Y.

 

What i've made so far but sadly not working:

 

 

function OnEvent(event, arg, family)
    if(family=="lhc") then
    if (event == "G_PRESSED" and arg == 1) then
    MoveMouseTo(1179, 8136)
    PressMouseButton(1)
    end
    if (event == "G_RELEASED" and arg == 1) then
    ReleaseMouseButton(1)
    end
end
    if(family=="kbd") then
    if (event == "G_PRESSED" and arg == 1) then
    MoveMouseTo(5555, 5555)
    PressMouseButton(1)
    end
    if (event == "G_RELEASED" and arg == 1) then
    ReleaseMouseButton(1)
    end
end
end

 

 

 

Could somebody tell me what I am doing wrong please?

 

Thanks in advance,

 

Djo

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
It doesn't always has to be used for gaming!
http://img15.imageshack.us/gal.php?g=pic699j.jpg
kgober
Posts: 3,770
Kudos: 438
Solutions: 287
Registered: ‎05-28-2009
0

Re: Scripting: G13 + G11. How to get 2 difrent scripts on G13 & G11's G buttons

just looking at it (I didn't try to run it on my own system), it looks fine to me.  what does it do or not do for you?

 

and you are using v3.02 or later of the software, right? 

 

-ken 

________________________________
I do not work for Logitech. I'm just a user.
Logi Apprentice
daemonvi
Posts: 127
Registered: ‎09-14-2008
0

Re: Scripting: G13 + G11. How to get 2 difrent scripts on G13 & G11's G buttons

The family for keyboard input is "kb" not "kbd". Perhaps that is the source of the problem if it only reacts to the gamepad button press.
Djo
Logi Browser
Djo
Posts: 7
Registered: ‎08-29-2009
0

Re: Scripting: G13 + G11. How to get 2 difrent scripts on G13 & G11's G buttons

Thanks for the replies, it was indeed the "kb" and not "kbd" (i got "kbd" from the API manual)

 

I can continue scripting wth a happy face :smileyhappy: thanks.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
It doesn't always has to be used for gaming!
http://img15.imageshack.us/gal.php?g=pic699j.jpg