| View previous topic :: View next topic |
| Author |
Message |
biotech
Joined: 23 Feb 2006 Posts: 155
|
Posted: Wed Aug 20, 2008 9:54 am Post subject: problems with scroll lock |
|
|
hi
i am using a KVM switch to work on two computers with one keyboard,mouse and monitor..it is very nice and handy except the fact that hotkey for switching to other computer is scrolllock x 2 then F1 (it sadly interupts with
automated tasks i have scripted over some time) so i want to replace that with another hotkey
i tried with:
^!s::
Send, {SCROLLLOCK}
Sleep, 100
Send, {SCROLLLOCK}
Sleep, 100
Send, {F1}
RETURN
but it doesnt work why? |
|
| Back to top |
|
 |
Razlin
Joined: 05 Nov 2007 Posts: 434 Location: canada
|
Posted: Wed Aug 20, 2008 12:37 pm Post subject: |
|
|
try
| Code: |
^!s::
SetScrollLockState , Off
sleep 10
SetScrollLockState , On
sleep 10
SetScrollLockState , Off
sleep 10
SetScrollLockState , On
sleep 10
SetScrollLockState , Off
sleep 10
send {F1}
return
|
_________________ -=Raz=- |
|
| Back to top |
|
 |
biotech as guest Guest
|
Posted: Wed Aug 20, 2008 2:10 pm Post subject: |
|
|
| hmmm, it doesn't work... thanks for the effort |
|
| Back to top |
|
 |
Razlin
Joined: 05 Nov 2007 Posts: 434 Location: canada
|
Posted: Wed Aug 20, 2008 2:51 pm Post subject: |
|
|
not sure if you have written other scripts before but if you do
| Code: |
^!s::
msgbox, hello.
SetScrollLockState , Off
sleep 10
SetScrollLockState , On
sleep 10
SetScrollLockState , Off
sleep 10
SetScrollLockState , On
sleep 10
SetScrollLockState , Off
sleep 10
send {F1}
return |
Do you see the msgbox? _________________ -=Raz=- |
|
| Back to top |
|
 |
biotech as guest Guest
|
Posted: Wed Aug 20, 2008 5:03 pm Post subject: |
|
|
oh, i have written some scripts before, i didnt try this with msgbox
but i can tell you that led flashes for scroll lock twice, that is the proof
that it works but it doesnt switch to another coputer.
also when i manually press scroll lock twice in a row i hear beep, and that is
the notification that i need to press F1 or F2 to switch between computers
from autohotkey that doesnt work, it maybe is hardware related...just a guess
is there another way of doing this...it is a shame they hardwired this hotkey since there is no software or driver of anykind |
|
| Back to top |
|
 |
Sivvy
Joined: 21 Jul 2008 Posts: 711 Location: Calgary, AB, Canada
|
Posted: Wed Aug 20, 2008 5:12 pm Post subject: |
|
|
| Maybe try a Keyboard Hook and check the keys... Maybe they aren't sending what you think. Never know. |
|
| Back to top |
|
 |
crxvfr
Joined: 10 Mar 2006 Posts: 55
|
Posted: Wed Aug 20, 2008 5:17 pm Post subject: |
|
|
try using sendinput. I don't know if it will work but it works better in many situations.
...also, we had one of the kvm switches for two windows system and a unix server. It didn't work very well. It tended to get stuck where the scroll lock keys didn't change the pc and it broke within a months use.
I've found the ones with a manual switch to work better (for me). |
|
| Back to top |
|
 |
[VxE]
Joined: 07 Oct 2006 Posts: 1496
|
Posted: Wed Aug 20, 2008 8:40 pm Post subject: |
|
|
Sometimes, KVMs trigger based on the actual signal from the keyboard, which puts the switching mechanism several inches beyond AHK's reach. _________________ My Home Thread
More Common Answers: [1]. It's in the FAQ [2]. Ternary ( a ? b : c ) guide [3]. Post code inside [code][/code] tags ! |
|
| Back to top |
|
 |
biotech as guest Guest
|
Posted: Wed Aug 20, 2008 10:09 pm Post subject: |
|
|
| i was afraid that is the case... |
|
| Back to top |
|
 |
Razlin
Joined: 05 Nov 2007 Posts: 434 Location: canada
|
Posted: Thu Aug 21, 2008 12:32 pm Post subject: |
|
|
Did you try sendplay or changing the keys you require to switch. _________________ -=Raz=- |
|
| Back to top |
|
 |
|