Num Lock on, but the Num Lock LED off - led

I want to have Num Lock on (be able to use the numbers), but have the LED indicator on my keyboard turned off. I don't know what way I want to do this (Autoit, AutoHotKey, C#...).
I found this link and tested the code from evl, but it doesn't seem to do anything for me.

Windows-only solution:
Just add the following remappings to your AutoHotkey script:
NumpadIns:: Send 0
NumpadEnd:: Send 1
NumpadDown:: Send 2
NumpadPgDn:: Send 3
NumpadLeft:: Send 4
NumpadClear:: Send 5
NumpadRight:: Send 6
NumpadHome:: Send 7
NumpadUp:: Send 8
NumpadPgUp:: Send 9
NumpadDel:: Send .
This way, no matter whether NumLock is on or off, pressing the numbers on the numeric keypad will always type the numbers (and . instead of Del).
Enjoy your light-free keyboard!
PS: You can find the key list on Autohotkey's Help (right click on your script's icon on the taskbar and click Help) under Usage and Syntax, Key List (Keyboard, Mouse, Joystick).

Related

Logitech Gaming Software & G600 - Double click issue - possible fix?

I want to understand if it is possible to fix LGS bugs, with scripts.
(I'm using a G600 mouse that has gshift ( shiftstate= ? ), holding that on the mouse turns on a certain 2nd layer for all buttons until I release.
The problem: if I assign to the 2nd layer (gshift pressed/holded), double click on MOUSE_BUTTON 1 (lmb).
Then LGS starts sending a double click, all the time, regardless of profile, or gshift state.
Also there is same problem: by default MOUSE_BUTTON 5 and 4, are assigned as "forward", "backward". And they send a double click by default.
If by activating the 2nd layer (gshift), we assign something else to them (any other keyboard character), the double click disappears. But until we activate another profile which still has the previous settings.
That is, if we assign any option in gshift to Mouse_buttons 1-6, it can cause double click.
Any ideas to solve the problem would be welcome!
P.s. I don't want to use G-Hub as I also use 2 older devices (G13,G510) which are not supported by Ghub
tried edit XML file, but no luck

AUTOHOTKEY: Problem with code which suspend script after clicking key and unsuspend it after clicking 2 another keys. Doing 2 things at the same time

In game chat start with t key and I want that after pressing t on keyboard my script will be suspend and I will can normally write on chat but if I press enter or esc my script will be unsuspended (esc - close chat, enter - send message on chat).
I have problem with this code:
t::
Suspend On
Loop
{
GetKeyState, state, Enter, P
GetKeyState, state2, Escape, P
if (state = Enter){
Suspend Off
break
}
else if (state2 = Escape){
Suspend Off
break
}
}
return
Main problem with this code is loop which not work, and I don't know how to repair it or replace it something more useful or better solution.
Another problem is t key which work but I must click it 2 times, why? First click suspends script, second click runs chat. I want after clicking 1 time t key chat will run and script will suspend. I want the same with enter and esc, to make 2 functions at the same time (enter - unsuspends script and send message on chat, esc - close chat and unsuspends script)
The problem is with the usage of the (deprecated legacy) GetKeyState command, but I must say, the whole solution could be implemented a lot better.
The output value of the command doesn't contain key names, it contains D for down, or U for up, as stated in the documentation. And also you'd need to "quote" your strings.
And the problem with your T key not working on the first press, is of course because you have a hotkey that is capturing the press of the T key.
To not consume the T key press when the hotkey runs, you want to use the ~ modifier(docs).
But anyway, I think a better implementation would be just that a press of the keys simply suspends/unsuspends.
Like so:
~t::Suspend, On
~Enter::
~Esc::Suspend, Off
As a bonus:
The usage of #IfWinActive(docs) might be desirable so the hotkeys only work when your game is active.
#IfWinActive, ahk_exe ExeOfMyGame.exe
~t::Suspend, On
~Enter::
~Esc::Suspend, Off
#IfWinActive
I change code to this:
~t::
Suspend On
Loop
if (GetKeyState("Enter", "P") || GetKeyState("Escape", "P"))
break
Suspend Off
return
Why? Because in #0x464e code was that problem when I suspended script manually and click enter / esc it unsuspended it, I needed after click T it suspend and only enter / esc will unsuspend it. When I manually suspend it in code which is above enter / esc do not unsuspend it.

My script for Double clicking, Pasting, Enter then Looping isn't working

How do I make a script that in order
Double Left Clicks
Then
Pastes from Clipboard (Like CTRL+V)
Then
Presses Enter
Then
Loops over and over.
I tried but it doesn't work.
+LButton::
send {LButton 2}
Return
Send %clipboard%
send {Enter}
Loop 5
You can do it with Batch Programming.
However, there are many tools available. Make use of Auto-IT to easily achieve this in seconds. I use this very often. Auto-IT

Install4j's default back button behaviour is incompatible with loops. What's the workaround?

Can someone shed some light on how Install4j's back button actually works? I should note at this point that I'm using install4j Multi-Platform Edition 5.1.2 (build 5492).
Loop Example
This example is based on a screen group containing 2 screens ('Screen 1' and 'Screen 2').
Start screen
Screen 1 (in the looped group)
Screen 2 (in the looped group)
End screen
Screen group properties:
Loop index start: 0
Loop index step: 1
Loop expression: (Integer)context.getVariable("i") < 2
Loop index variable name: i
As expected, clicking next repeatedly results in the following screen flow:
Start screen
Screen 1 (i=0)
Screen 2 (i=0)
Screen 1 (i=1)
Screen 2 (i=1)
Screen 1 (i=2)
Screen 2 (i=2)
End screen
I would expect the back button to step backwards through the history listed above. However, the actual behaviour is as follows:
End screen
Screen 2 (i=3)
Screen 1 (i=3)
Screen 1 (i=3)
Screen 1 (i=3)
Start screen
Clearly this is not what any rational user would expect. To complicate matters further, the change Log Install4j for 5.1 Build 5435 includes the following:
Fixed wrong behavior when going back in the screen history where
screen loops were present
The other issue raised in this example, is how do you decrement the loop counter when stepping backwards? It would appear there's no practical way of doing this when using a looped screen group.
If this is case, the only way of implementing a loop which can be stepped through backwards is to implement your own screens in order to override previous(). The side effect being that you have to hand code your screens just to get the correct back button behaviour for loops, which seems ridiculous.
Has anyone else found a decent workaround for this problem? The install4j manual is pretty lame in that the word 'history' only appears once. There's no specification for how the back button works whatsoever.
This is a bug, it will be fixed in 5.1.4. Please contact support#ej-technologies.com to get the current build where it is fixed.
The other issue raised in this example, is how do you decrement the
loop counter when stepping backwards? It would appear there's no
practical way of doing this when using a looped screen group.
This will work automatically in 5.1.4.

How to make a scroller on a micro-processor/-controller?

I would like to write a text scroller on a micro-processor with 4 5x7 displays in ANSI-C.
Does anyone know of example source code or anything that can help me get started?
Update
This is the user manual for the micro-processor board I have. On PDF page 17 is a picture of the board with the displays.
The code is written in an IDE called "zds2_Z8Encore493.exe" and then flashed to the micro-controller over serial port.
I would like the text to cascade from one to the next to the next column-by-column, so it is smooth.
There may be a better way, but I would store the text in a block of RAM, and in the routines that update the displays I would include a value to offset the starting point, possibly with a wrap-around to the start. The you store a counter which increments the "global" offset (scrolling).
You can then use string[offset + display-width + scroll_position] as the start pointer, but you need to detect the end and wrap round or just stop.

Resources