AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

problems with scroll lock

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
biotech



Joined: 23 Feb 2006
Posts: 155

PostPosted: Wed Aug 20, 2008 9:54 am    Post subject: problems with scroll lock Reply with quote

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
View user's profile Send private message
Razlin



Joined: 05 Nov 2007
Posts: 434
Location: canada

PostPosted: Wed Aug 20, 2008 12:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
biotech as guest
Guest





PostPosted: Wed Aug 20, 2008 2:10 pm    Post subject: Reply with quote

hmmm, it doesn't work... thanks for the effort
Back to top
Razlin



Joined: 05 Nov 2007
Posts: 434
Location: canada

PostPosted: Wed Aug 20, 2008 2:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
biotech as guest
Guest





PostPosted: Wed Aug 20, 2008 5:03 pm    Post subject: Reply with quote

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

PostPosted: Wed Aug 20, 2008 5:12 pm    Post subject: Reply with quote

Maybe try a Keyboard Hook and check the keys... Maybe they aren't sending what you think. Never know.
Back to top
View user's profile Send private message MSN Messenger
crxvfr



Joined: 10 Mar 2006
Posts: 55

PostPosted: Wed Aug 20, 2008 5:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
[VxE]



Joined: 07 Oct 2006
Posts: 1496

PostPosted: Wed Aug 20, 2008 8:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
biotech as guest
Guest





PostPosted: Wed Aug 20, 2008 10:09 pm    Post subject: Reply with quote

i was afraid that is the case...
Back to top
Razlin



Joined: 05 Nov 2007
Posts: 434
Location: canada

PostPosted: Thu Aug 21, 2008 12:32 pm    Post subject: Reply with quote

Did you try sendplay or changing the keys you require to switch.
_________________
-=Raz=-
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group