Sign in with
Sign up | Sign in
Your question

Emulate keystrokes function.

Last response: in Windows 95/98/ME
Share
Anonymous
May 23, 2005 3:16:41 PM

Archived from groups: microsoft.public.win98.gen_discussion (More info?)

Bill Blanton Wrote:
> "Dave Smith" Dave.Smith.1pe0bz@news.win98banter.com wrote in message
> news:D ave.Smith.1pe0bz@news.win98banter.com...-
>
> I have 2 pc's (win xp and win98) for which I use one mouse and
> keyboard.
> The Belkin KVM switch enables me to do this by entering:
> 'Scroll lock' twice followed bythe 'arrow down' key to switch between
> them.
>
> I consantly flick between the 2 pc's - sometimes while holding the
> phone - so I would like to simplify this.
>
> My keyboard can have files assigned to the 'multimedia' buttons.
>
> I am hoping there is a simple batch/script file I could make up on
> the
> lines of:
>
> File change_pc.sh
>
> Begin
> keystroke(ScrlLock,ScrlLock,down)
> end;
>
> and then assign change_pc.sh to say the 'refresh' key which I don't
> use.-
>
>
> Don't know if this will work, but you can try it. Save this as
> change_pc.vbs
> and run it. (May require WSH 5.6?)
> http://tinyurl.com/7zh0
>
>
>
> Set oWShell = WScript.CreateObject("WScript.Shell")
> oWShell.Sendkeys("{SCROLLLOCK}{SCROLLLOCK}{DOWN}")
>
>
> I didn't see the scroll light light up unless I put a time delay in
> it.
>
>
>
> Set oWShell = WScript.CreateObject("WScript.Shell")
> oWShell.Sendkeys("{SCROLLLOCK}")
> WScript.Sleep(500) '# milliseconds (1/2 second)
> oWShell.Sendkeys("{SCROLLLOCK}")
> WScript.Sleep(500) '# milliseconds (1/2 second)
> oWShell.Sendkeys("{DOWN}")

Hi Bill,
This is spot on to what I was thinking of.
I don't think it will work in light of Ingeborgs comment that
keystrokes are resolved in kvm switch, not p.c.
Anyway - gave it a try and double clicked file name from 'explore' to
execute.
Message received: 'Malicious code detected high risk'.
I did vb prgramming 10 years ago. This isn't compiled - presumably
doesn't neeed it?

Do you think I should abort, pending belkins confirmation that
keystrokes are resolved in kvm switch?

Thanks for your help.
Dave.


--
Dave Smith
Anonymous
May 23, 2005 5:14:21 PM

Archived from groups: microsoft.public.win98.gen_discussion (More info?)

The warning is from your AV app, correct? If it is then you need to either
configure it to allow script, choose to run the code once or allow only that
particular script to run if you have that choice. If it's not your AV app then
it's a security setting elsewhere.

FWIW, don't bother with it unless Bill has a suggested way to execute the Down
command. I tried it on my XP Pro and it simply won't work no matter what changes
I made to the script, which I'm not well versed in. The Scolllocks work but you
never get the Beep after the second one from the switch. Without the
acknowledgement from the switch the Down won't execute.

--

Brian A. Sesko
{ MS MVP_Shell/User }
Conflicts start where information lacks.
http://www.dts-l.org/goodpost.htm
http://basconotw.mvps.org/



"Dave Smith" <Dave.Smith.1phpnz@news.win98banter.com> wrote in message
news:D ave.Smith.1phpnz@news.win98banter.com...
>
> Bill Blanton Wrote:
>> "Dave Smith" Dave.Smith.1pe0bz@news.win98banter.com wrote in message
>> news:D ave.Smith.1pe0bz@news.win98banter.com...-
>>
>> I have 2 pc's (win xp and win98) for which I use one mouse and
>> keyboard.
>> The Belkin KVM switch enables me to do this by entering:
>> 'Scroll lock' twice followed bythe 'arrow down' key to switch between
>> them.
>>
>> I consantly flick between the 2 pc's - sometimes while holding the
>> phone - so I would like to simplify this.
>>
>> My keyboard can have files assigned to the 'multimedia' buttons.
>>
>> I am hoping there is a simple batch/script file I could make up on
>> the
>> lines of:
>>
>> File change_pc.sh
>>
>> Begin
>> keystroke(ScrlLock,ScrlLock,down)
>> end;
>>
>> and then assign change_pc.sh to say the 'refresh' key which I don't
>> use.-
>>
>>
>> Don't know if this will work, but you can try it. Save this as
>> change_pc.vbs
>> and run it. (May require WSH 5.6?)
>> http://tinyurl.com/7zh0
>>
>>
>>
>> Set oWShell = WScript.CreateObject("WScript.Shell")
>> oWShell.Sendkeys("{SCROLLLOCK}{SCROLLLOCK}{DOWN}")
>>
>>
>> I didn't see the scroll light light up unless I put a time delay in
>> it.
>>
>>
>>
>> Set oWShell = WScript.CreateObject("WScript.Shell")
>> oWShell.Sendkeys("{SCROLLLOCK}")
>> WScript.Sleep(500) '# milliseconds (1/2 second)
>> oWShell.Sendkeys("{SCROLLLOCK}")
>> WScript.Sleep(500) '# milliseconds (1/2 second)
>> oWShell.Sendkeys("{DOWN}")
>
> Hi Bill,
> This is spot on to what I was thinking of.
> I don't think it will work in light of Ingeborgs comment that
> keystrokes are resolved in kvm switch, not p.c.
> Anyway - gave it a try and double clicked file name from 'explore' to
> execute.
> Message received: 'Malicious code detected high risk'.
> I did vb prgramming 10 years ago. This isn't compiled - presumably
> doesn't neeed it?
>
> Do you think I should abort, pending belkins confirmation that
> keystrokes are resolved in kvm switch?
>
> Thanks for your help.
> Dave.
>
>
> --
> Dave Smith
Anonymous
May 23, 2005 8:31:54 PM

Archived from groups: microsoft.public.win98.gen_discussion (More info?)

Nope, that's all I got. I have no way to test it with the switch. The only
way I could test it was to run it from my editor, and watch the scrolllock
light go on/off, and then watch the cursor move down one line (as the editor
had the focus).

I don't know anything about this "switch".. if it's hardware then I'm not
surprised it won't work. If it's a software driver that hooks the keyboard
services, it ~might~ work.

It could be worth a shot to send the keystrokes to the BIOS keyboard
interrupt.


>> Message received: 'Malicious code detected high risk'.
>> I did vb prgramming 10 years ago. This isn't compiled - presumably
>> doesn't neeed it?
>>

It's "interpreted"..or you could say compiled by the window's scripting host
interpreter at run time. That's a pretty aggressive AV setting...



"Brian A." <gonefish'n@afarawaylake> wrote in message news:o AQU9M8XFHA.2508@TK2MSFTNGP15.phx.gbl...
> The warning is from your AV app, correct? If it is then you need to either configure it to allow script, choose to run the code
> once or allow only that particular script to run if you have that choice. If it's not your AV app then it's a security setting
> elsewhere.
>
> FWIW, don't bother with it unless Bill has a suggested way to execute the Down command. I tried it on my XP Pro and it simply
> won't work no matter what changes I made to the script, which I'm not well versed in. The Scolllocks work but you never get the
> Beep after the second one from the switch. Without the acknowledgement from the switch the Down won't execute.
>

> "Dave Smith" <Dave.Smith.1phpnz@news.win98banter.com> wrote in message news:D ave.Smith.1phpnz@news.win98banter.com...
>>
>> Bill Blanton Wrote:
>>> "Dave Smith" Dave.Smith.1pe0bz@news.win98banter.com wrote in message
>>> news:D ave.Smith.1pe0bz@news.win98banter.com...-
>>>
>>> I have 2 pc's (win xp and win98) for which I use one mouse and
>>> keyboard.
>>> The Belkin KVM switch enables me to do this by entering:
>>> 'Scroll lock' twice followed bythe 'arrow down' key to switch between
>>> them.
>>>
>>> I consantly flick between the 2 pc's - sometimes while holding the
>>> phone - so I would like to simplify this.
>>>
>>> My keyboard can have files assigned to the 'multimedia' buttons.
>>>
>>> I am hoping there is a simple batch/script file I could make up on
>>> the
>>> lines of:
>>>
>>> File change_pc.sh
>>>
>>> Begin
>>> keystroke(ScrlLock,ScrlLock,down)
>>> end;
>>>
>>> and then assign change_pc.sh to say the 'refresh' key which I don't
>>> use.-
>>>
>>>
>>> Don't know if this will work, but you can try it. Save this as
>>> change_pc.vbs
>>> and run it. (May require WSH 5.6?)
>>> http://tinyurl.com/7zh0
>>>
>>>
>>>
>>> Set oWShell = WScript.CreateObject("WScript.Shell")
>>> oWShell.Sendkeys("{SCROLLLOCK}{SCROLLLOCK}{DOWN}")
>>>
>>>
>>> I didn't see the scroll light light up unless I put a time delay in
>>> it.
>>>
>>>
>>>
>>> Set oWShell = WScript.CreateObject("WScript.Shell")
>>> oWShell.Sendkeys("{SCROLLLOCK}")
>>> WScript.Sleep(500) '# milliseconds (1/2 second)
>>> oWShell.Sendkeys("{SCROLLLOCK}")
>>> WScript.Sleep(500) '# milliseconds (1/2 second)
>>> oWShell.Sendkeys("{DOWN}")
>>
>> Hi Bill,
>> This is spot on to what I was thinking of.
>> I don't think it will work in light of Ingeborgs comment that
>> keystrokes are resolved in kvm switch, not p.c.
>> Anyway - gave it a try and double clicked file name from 'explore' to
>> execute.
>> Message received: 'Malicious code detected high risk'.
>> I did vb prgramming 10 years ago. This isn't compiled - presumably
>> doesn't neeed it?
>>
>> Do you think I should abort, pending belkins confirmation that
>> keystrokes are resolved in kvm switch?
>>
>> Thanks for your help.
>> Dave.
>>
>>
>> --
>> Dave Smith
>
Related resources
Anonymous
May 23, 2005 10:57:43 PM

Archived from groups: microsoft.public.win98.gen_discussion (More info?)

"Bill Blanton" <bblanton@REMOVEmagicnet.net> wrote in message
news:%23iApzZ9XFHA.3584@TK2MSFTNGP14.phx.gbl...
> Nope, that's all I got. I have no way to test it with the switch. The only
> way I could test it was to run it from my editor, and watch the scrolllock
> light go on/off, and then watch the cursor move down one line (as the editor
> had the focus).
>
> I don't know anything about this "switch".. if it's hardware then I'm not
> surprised it won't work. If it's a software driver that hooks the keyboard
> services, it ~might~ work.

It's not software. It's external, has it's own chip/firmware and is powered by
the PC (no wall outlet).
This is the one I use and I paid much less than they offer it for.
http://catalog.belkin.com/IWCatProductPage.process?Merc...

>
> It could be worth a shot to send the keystrokes to the BIOS keyboard
> interrupt.
>
>
>>> Message received: 'Malicious code detected high risk'.
>>> I did vb prgramming 10 years ago. This isn't compiled - presumably
>>> doesn't neeed it?
>>>
>
> It's "interpreted"..or you could say compiled by the window's scripting host
> interpreter at run time. That's a pretty aggressive AV setting...

Yup it is and I wouldn't have it any other way. A prompt is nice to have the
option for deny/allow, that way I know if any tries to slip by without my
knowledge. My prompt options are to: Stop this script, Allow this activity
once, Allow this entire script once, Quarantine this script and Authorize this
script.

I do have the option in my apps config not to allow any script without the
input prompt even asking.

--

Brian A. Sesko
{ MS MVP_Shell/User }
Conflicts start where information lacks.
http://www.dts-l.org/goodpost.htm
http://basconotw.mvps.org/
Anonymous
May 24, 2005 2:35:15 AM

Archived from groups: microsoft.public.win98.gen_discussion (More info?)

"Brian A." <gonefish'n@afarawaylake> wrote in message news:unMm0M$XFHA.2420@TK2MSFTNGP12.phx.gbl...
> "Bill Blanton" <bblanton@REMOVEmagicnet.net> wrote in message news:%23iApzZ9XFHA.3584@TK2MSFTNGP14.phx.gbl...
>> Nope, that's all I got. I have no way to test it with the switch. The only
>> way I could test it was to run it from my editor, and watch the scrolllock
>> light go on/off, and then watch the cursor move down one line (as the editor
>> had the focus).
>>
>> I don't know anything about this "switch".. if it's hardware then I'm not
>> surprised it won't work. If it's a software driver that hooks the keyboard
>> services, it ~might~ work.
>
> It's not software. It's external, has it's own chip/firmware and is powered by the PC (no wall outlet).
> This is the one I use and I paid much less than they offer it for.
> http://catalog.belkin.com/IWCatProductPage.process?Merc...

I can see how that could be useful.. (and I think I might need one now ;-)
Not too cheap though..
Anonymous
May 24, 2005 2:50:21 AM

Archived from groups: microsoft.public.win98.gen_discussion (More info?)

"Bill Blanton" <bblanton@REMOVEmagicnet.net> wrote in message news:%23cEy1kAYFHA.3132@TK2MSFTNGP09.phx.gbl...
>
> "Brian A." <gonefish'n@afarawaylake> wrote in message news:unMm0M$XFHA.2420@TK2MSFTNGP12.phx.gbl...
>> "Bill Blanton" <bblanton@REMOVEmagicnet.net> wrote in message news:%23iApzZ9XFHA.3584@TK2MSFTNGP14.phx.gbl...
>>> Nope, that's all I got. I have no way to test it with the switch. The only
>>> way I could test it was to run it from my editor, and watch the scrolllock
>>> light go on/off, and then watch the cursor move down one line (as the editor
>>> had the focus).
>>>
>>> I don't know anything about this "switch".. if it's hardware then I'm not
>>> surprised it won't work. If it's a software driver that hooks the keyboard
>>> services, it ~might~ work.
>>
>> It's not software. It's external, has it's own chip/firmware and is powered by the PC (no wall outlet).
>> This is the one I use and I paid much less than they offer it for.
>> http://catalog.belkin.com/IWCatProductPage.process?Merc...
>
> I can see how that could be useful.. (and I think I might need one now ;-)
> Not too cheap though..

I guess connecting it is pretty straightforward as it is just a switch, but wonder
why it "Supports video resolutions up to 2048x1536@85Hz". That's enough for me,
but I'd think it wouldn't matter?
Anonymous
May 24, 2005 3:24:03 AM

Archived from groups: microsoft.public.win98.gen_discussion (More info?)

"Bill Blanton" <bblanton@REMOVEmagicnet.net> wrote in message
news:%23s0%23RtAYFHA.4000@TK2MSFTNGP10.phx.gbl...
>>
>> I can see how that could be useful.. (and I think I might need one now ;-)
>> Not too cheap though..

They range from cheap to quite expensive.
Check out the many offered at:
http://www.newegg.com/Product/ProductList.asp?Submit=Su...

If you do get one, make sure it has USB and switch buttons instead of simply
hotkeys, most utilize both.

>
> I guess connecting it is pretty straightforward as it is just a switch, but
> wonder
> why it "Supports video resolutions up to 2048x1536@85Hz". That's enough for
> me,
> but I'd think it wouldn't matter?

Most likely because of the larger screened monitors nowadays, lower resolutions
look absolutely awful.
--

Brian A. Sesko
{ MS MVP_Shell/User }
Conflicts start where information lacks.
http://www.dts-l.org/goodpost.htm
http://basconotw.mvps.org/
Anonymous
May 25, 2005 2:50:31 AM

Archived from groups: microsoft.public.win98.gen_discussion (More info?)

"Brian A." <gonefish'n@afarawaylake> wrote in message news:o LtMphBYFHA.3700@TK2MSFTNGP10.phx.gbl...

> "Bill Blanton" <bblanton@REMOVEmagicnet.net> wrote in message news:%23s0%23RtAYFHA.4000@TK2MSFTNGP10.phx.gbl...
>>>>>> I can see how that could be useful.. (and I think I might need one now ;-)
>>> Not too cheap though..
>
> They range from cheap to quite expensive.
> Check out the many offered at:
> http://www.newegg.com/Product/ProductList.asp?Submit=Su...
>
> If you do get one, make sure it has USB and switch buttons instead of simply hotkeys, most utilize both.

Thanks for the tip..the 4-port linksys is nice :) 

>> I guess connecting it is pretty straightforward as it is just a switch, but wonder
>> why it "Supports video resolutions up to 2048x1536@85Hz". That's enough for me,
>> but I'd think it wouldn't matter?
>
> Most likely because of the larger screened monitors nowadays, lower resolutions look absolutely awful.

What I meant was,, why would a switch have anything to do with video
resolutions' and refresh rates? ..thinking about it now, I'd guess the
switch does have to "refresh" the monitor with possibly new settings.
It can't just do a "dumb switch". Maybe..
Anonymous
May 25, 2005 7:04:19 PM

Archived from groups: microsoft.public.win98.gen_discussion (More info?)

"Bill Blanton" <bblanton@REMOVEmagicnet.net> wrote in message
news:%23ITYGSNYFHA.228@TK2MSFTNGP12.phx.gbl...
> What I meant was,, why would a switch have anything to do with video
> resolutions' and refresh rates? ..thinking about it now, I'd guess the
> switch does have to "refresh" the monitor with possibly new settings.
> It can't just do a "dumb switch". Maybe..
>
Might have to push that off on the different types of video chip/adapter in
separate machines being used and the resolution they're set at. I truly can't
say but that's as good a guess as any.


--

Brian A. Sesko
{ MS MVP_Shell/User }
Conflicts start where information lacks.
http://www.dts-l.org/goodpost.htm
http://basconotw.mvps.org/
!