Reply
Logi Nu
HooDoo
Posts: 2
Registered: ‎07-11-2009
0

Colored Profiles..

Hey all!

 

Just got my G13 and LOVE it but was wondering if there is a way to have your backlight to change when the profiles are changed.. for instance i have one profile that has m1 m2 m3 with the colors green blue and red. But if i switch characters or even games and change to a diferent profile is there a way for the backlighting to be different to reflect the change in profiles? As it is the colors are staying the same green blue and red no matter which profile i change to.

 

Any advice is greatly apprieciated!

Logi Master II
SpecialK
Posts: 1,119
Registered: ‎07-19-2006
0

Re: Colored Profiles..

Logi Team
Chris_P
Posts: 421
Registered: ‎02-08-2007

Re: Colored Profiles..

My custom-color script for WoW (M1 = Druid, M2 = Paladin, M3 = Priest)

 

function OnEvent(event, arg) --custom backlighting color per profile --first we create variables if ( event=="PROFILE_ACTIVATED" ) then mkey = GetMKeyState(); r = 0 g = 0 b = 0 --color settings for M1 if ( mkey==1) then SetBacklightColor(0, 0, 0); --Turn off backlighting, then we fade in the color in 12 steps (just to look cool) Sleep(10); r = 2 while (g < 55) do SetBacklightColor(r, g, b); Sleep(30); -- 12x30ms=360ms = just over 1/3 second r = r + 23 g = g + 5 end SetBacklightColor(255, 55, 0); --orange - this is my WoW druid macro set end --color settings for M2. This time with no fade (because I'm lazy) if ( mkey==2 ) then SetBacklightColor(255, 152, 154); --pink, for the paladin end --color settings for M3, also with no fade if ( mkey==3 ) then SetBacklightColor(129, 255, 129); --white - for the priest end end --if M-keys are pressed during gameplay if ( event=="M_RELEASED" ) then if ( arg==1 ) then SetBacklightColor(255, 55, 0); --M1 = orange end if ( arg==2 ) then SetBacklightColor(255, 152, 154); --M2 = pink end if ( arg==3 ) then SetBacklightColor(129, 255, 129); --M3 = white end end if (event=="PROFILE_DEACTIVATED" ) then --when the game shuts down SetBacklightColor(129, 255, 129); --set backlighting color to white (my default) end end

 

 

 

 

And my script for constantly changing colors:

 

function OnEvent(event, arg) local r = 0 local g = 255 local b = 125 rdir = 1 gdir = 1 bdir = 1 repeat r = RedCycle(r); g = GreenCycle(g); b = BlueCycle(b); SetBacklightColor(r, g, b); until ( event=="PROFILE_DEACTIVATED" ) SetBacklightColor(129, 255, 129); --white end function RedCycle(r) if (r >= 255) then rdir = 0 r = 254 Sleep(150); return r elseif (r <= 0) then rdir = 1 r = 1 Sleep(100); return r elseif (r < 255) then if (rdir == 1) then r = r + 1 Sleep(15); return r elseif (rdir == 0) then r = r - 1 Sleep(45); return r end end end function GreenCycle(g) if (g >= 255) then gdir = 0 g = 254 Sleep(150); return g elseif (g <= 0) then gdir = 1 g = 1 Sleep(100); return g elseif (g < 255) then if (gdir == 1) then g = g + 1 Sleep(25); return g elseif (gdir == 0) then g = g - 1 Sleep(55); return g end end end function BlueCycle(b) if (b >= 255) then bdir = 0 b = 254 Sleep(100); return b elseif (b <= 0) then bdir = 1 b = 1 Sleep(100); return b elseif (b < 255) then if (bdir == 1) then b = b + 1 Sleep(55); return b elseif (bdir == 0) then b = b - 1 Sleep(15); return b end end end

 

Logi Nu
HooDoo
Posts: 2
Registered: ‎07-11-2009
0

Re: Colored Profiles..

This solved my problem perfectly!

 

Thank you Very much!

Logi Guru
Trusselo
Posts: 1,323
Registered: ‎04-04-2009
0

Re: Colored Profiles..

hey i just started using your script for constantly changing colors and ever since LGDcore.exe has been locking up and not switching profiles when it used to work fine.  i have to use task man to shut down and restart the Core.exe.

I am also trying to use this with the G13 calculator script. i just pasted it at the end of the calc script. is that propor or is my lack of scpriting knoledge cause my problem by causing some loop? should i paste it before the last end?


My G13 Pofile Folder

Help me out. Get a Drop box account!
Logi Guru
Trusselo
Posts: 1,323
Registered: ‎04-04-2009
0

Re: Colored Profiles..

at the moment im trying it with out the calc script see how it goes.

is there a script command for inverting the colors on the screen?


My G13 Pofile Folder

Help me out. Get a Drop box account!
Logi Team
Chris_P
Posts: 421
Registered: ‎02-08-2007
0

Re: Colored Profiles..

[ Edited ]
To be honest I haven't tested it outside of a game, so I don't know how it would behave with other stuff running at the same time.  That's just active while I'm playing Diablo 2, and D2 is not super system-intensive.  Additionally, it's probably not the cleanest way to do what I'm trying to do.  I just thought it was kind of fun.
Message Edited by Chris_P on 07-12-2009 07:41 PM