Hot key needed

  • Thread starter Thread starter sherwindu
  • Start date Start date
Pegasus,

I have assumed that all this discussion pertains to Windows 2000, plus I
mentioned
that is my operating system, up front. In checking on "cscript", it appears to
be a
Windows XP tool. Can I expect it to work in Windows 2000?

Sherwin
 
Sherwin,

I tried it here and it works fine but you have to have Notepad open.

In Notepad I copied the following......

Set ws=CreateObject("WScript.Shell")
ws.sendkeys("%{Tab}")
wscript.sleep(500)
ws.sendkeys("John Doe{Tab}MyPassword")

I saved it as MyName.vbs in my Windows Folder.

I then right click on my Desktop and select New Shortcut.
In the "Type the location of the item" I select the Browse button.
I point that to the Windows folder, find and click on the \MyName.vbs and
then click Next. I left the default name for the shortcut as \MyName.vbs

I then right click my new shortcut and select Properties.
In the Target I pasted the following...
%windir%\system32\cscript.exe //nologo c:\Windows\MyName.vbs

Start in: %windir%

In the Shortcut key: place your curser in that field and press Shift then
Alt then Z and select Apply or OK.

Open Notepad then double click your new shortcut. You will briefly see a Dos
window and then your name password will appear in Notepad.

All the best,
SG
 
sherwindu said:
Pegasus,

I have assumed that all this discussion pertains to Windows 2000, plus I
mentioned
that is my operating system, up front. In checking on "cscript", it
appears to
be a
Windows XP tool. Can I expect it to work in Windows 2000?

Sherwin

I tested it both on my WinXP and Win2000 PCs. If cscript.exe is
present then the script will work. Remember that you used cscript.exe
in Test #1?
 
SG said:
Sherwin,

I tried it here and it works fine but you have to have Notepad open.

In Notepad I copied the following......

Set ws=CreateObject("WScript.Shell")
ws.sendkeys("%{Tab}")
wscript.sleep(500)
ws.sendkeys("John Doe{Tab}MyPassword")

I saved it as MyName.vbs in my Windows Folder.

I then right click on my Desktop and select New Shortcut.
In the "Type the location of the item" I select the Browse button.
I point that to the Windows folder, find and click on the \MyName.vbs and
then click Next. I left the default name for the shortcut as \MyName.vbs

I then right click my new shortcut and select Properties.
In the Target I pasted the following...
%windir%\system32\cscript.exe //nologo c:\Windows\MyName.vbs

Start in: %windir%

In the Shortcut key: place your curser in that field and press Shift then
Alt then Z and select Apply or OK.

Open Notepad then double click your new shortcut. You will briefly see a Dos
window and then your name password will appear in Notepad.

All the best,
SG

Hi,

Yes, I have been able to get similar results. However, the whole purpose of
this exercise
is to get the keyboard keys to kick off the script, and that ain't
happening. I'm having
doubts that Pegasus was ever able to get this to work.

Sherwin
 
sherwindu said:
Hi,

Yes, I have been able to get similar results. However, the whole purpose
of
this exercise
is to get the keyboard keys to kick off the script, and that ain't
happening. I'm having
doubts that Pegasus was ever able to get this to work.


Sherwin

Please do not insult me. Any script I write is fully tested, and I
mentioned that it worked both under Win2000 and WinXP.
Furthermore there happens to be a similar thread titled
'Controlled "SIGN IN" with constant SCREENNAME'
in Microsoft.public.windowsxp.general that dealt with exactly
the same question. That poster got it to work immediately
after he understood the general principles.

You also appear to overlook that it worked for SG too.

The problem is on your own machine and I suspect a simple
typographical error.
 
similar results??

Can you explain that please.
It works as Pegasus said it would, so I don't see how similar results fit
in. What did you do get something close, but yet you say the keyboard keys
don't work.

All the best,
SG
 
SG said:
similar results??

Can you explain that please.
It works as Pegasus said it would, so I don't see how similar results fit
in. What did you do get something close, but yet you say the keyboard keys
don't work.

All the best,
SG

SG,

Like I said earlier, I was able to get the text into a notepad file by
placing the
cursor there and double clicking on the shortcut. That is not the same as
hitting
the Ctrl + Alt + userkey mechanism to do the job on web based sign on's.

Sherwin
 
Pegasus (MVP) said:
Please do not insult me.

Didn't mean to, but I'm getting frustrated with this whole thing.

Any script I write is fully tested, and I
mentioned that it worked both under Win2000 and WinXP.
Furthermore there happens to be a similar thread titled
'Controlled "SIGN IN" with constant SCREENNAME'
in Microsoft.public.windowsxp.general that dealt with exactly
the same question. That poster got it to work immediately
after he understood the general principles.

I looked at that.
I don't think he did anything differently from me, except he was
working with Windows XP and I'm on Windows 2000.
You also appear to overlook that it worked for SG too.

He never got his key seqeunce to kick off the VB script,
as far as I know.
The problem is on your own machine and I suspect a simple
typographical error.

Thanks to your rigorous step by step testing, I know the script is
ok. I can double click on my created shortcut and it will insert
the desired id and password into a notepad file to which the
cursor is pointing.

The only missing thing is that I can't kick off this sequence using
the Ctrl + Alt + Z keys I have specified in the shortcut. Why?????



My current target is set to: C:\WINNT\system32\cscript.exe //nologo
c:\Windows\sherwin.vbs
The shortcut is set to: start in c:\windows.
The shortcut key is set to: Ctrl + Alt + Z

My script file is:

Set ws=CreateObject("WScript.Shell")
ws.sendkeys("%{Tab}")
wscript.sleep(1000)
ws.sendkeys("(e-mail address removed){Tab}mypassword")

If this set up worked for you and the guy on the windowsxp newsgroup, the
only commonality
I see is the Windows XP operating system. Are you sure you got it to work on
Windows 2000?

Sherwin
 
*** See below.

sherwindu said:
Didn't mean to, but I'm getting frustrated with this whole thing.

*** OK.
I looked at that.
I don't think he did anything differently from me, except he was
working with Windows XP and I'm on Windows 2000.


He never got his key seqeunce to kick off the VB script,
as far as I know.


Thanks to your rigorous step by step testing, I know the script is
ok. I can double click on my created shortcut and it will insert
the desired id and password into a notepad file to which the
cursor is pointing.

The only missing thing is that I can't kick off this sequence using
the Ctrl + Alt + Z keys I have specified in the shortcut. Why?????

*** You jumped ahead in the test process. Test #2 does NOT
*** involve a shortcut key. It requires you to open Notepad,
*** then click the new shortcut in the QuickLaunch bar.
My current target is set to: C:\WINNT\system32\cscript.exe //nologo
c:\Windows\sherwin.vbs

*** This is fine.
The shortcut is set to: start in c:\windows.
The shortcut key is set to: Ctrl + Alt + Z

*** This comes later.
My script file is:

Set ws=CreateObject("WScript.Shell")
ws.sendkeys("%{Tab}")
wscript.sleep(1000)
ws.sendkeys("(e-mail address removed){Tab}mypassword")

*** This is fine.
If this set up worked for you and the guy on the windowsxp newsgroup,
the
only commonality
I see is the Windows XP operating system. Are you sure you got it to
work on
Windows 2000?

*** Just tested it again. If you increase the "sleep" period to 5000 then
*** you must see the cscript process on the Task Bar for 5 seconds,
*** which shows you that the script is running.

*** I note your persistence. Great! Now add some patience to the mix . . .
 
Pegasus (MVP) said:
*** See below.



*** OK.


*** You jumped ahead in the test process. Test #2 does NOT
*** involve a shortcut key. It requires you to open Notepad,
*** then click the new shortcut in the QuickLaunch bar.


*** This is fine.


*** This comes later.


*** This is fine.


*** Just tested it again. If you increase the "sleep" period to 5000 then
*** you must see the cscript process on the Task Bar for 5 seconds,
*** which shows you that the script is running.


*** I note your persistence. Great! Now add some patience to the mix . . .

What am I waiting for?

I spent several hours scanning the web and various boards for more details
on this and came up with very little. To your credit, you are the only one
who has given some information on how to acheive this. At this time, I am
running into a brick wall.

Sherwin
 
sherwindu said:
What am I waiting for?

I spent several hours scanning the web and various boards for more
details
on this and came up with very little. To your credit, you are the only
one
who has given some information on how to acheive this. At this time, I
am
running into a brick wall.

Sherwin

One hour ago I wrote this:

*** You jumped ahead in the test process. Test #2 does NOT
*** involve a shortcut key. It requires you to open Notepad,
*** then click the new shortcut in the QuickLaunch bar.

You appear to have overlooked this part of my reply. I suggest you
try it. Alternatively you could discuss the possibility of allowing
remote access to your machine in order to get to the bottom of
this issue, before you lose your mind :-)
 
I spent several hours scanning the web and various boards for more
details
on this and came up with very little. To your credit, you are the only
one
who has given some information on how to acheive this. At this time, I
am
running into a brick wall.

Sherwin

I need to add that it is 10:50 pm where I am. You need to respond
before midnight my time unless you're happy to wait until tomorrow.
 
Pegasus wrote: You also appear to overlook that it worked for SG too.

Sherwin responded: He never got his key sequence to kick off the VB script,
as far as I know.

Huh? where did I say my key sequence didn't work? Everything worked
flawlessly just as Pegasus put together and said it would. You are missing
something somehow Sherwin or it is possible your keyboard sequence just
isn't working. I've seen this before and for whatever reason some just don't
work.

I have tested this on XP Home, XP Pro and Win2000 Pro. I have 4 other
machines in my shop and I'll test them too. BTW, pretty rude of you to say
Pegasus was ever able to get this to work. The man IMO has went out of his
way to help you, be grateful even though you can't get it to work.

All the best,
SG
 
SG said:
Pegasus wrote: You also appear to overlook that it worked for SG too.

Sherwin responded: He never got his key sequence to kick off the VB
script, as far as I know.

Huh? where did I say my key sequence didn't work? Everything worked
flawlessly just as Pegasus put together and said it would. You are missing
something somehow Sherwin or it is possible your keyboard sequence just
isn't working. I've seen this before and for whatever reason some just
don't work.

I have tested this on XP Home, XP Pro and Win2000 Pro. I have 4 other
machines in my shop and I'll test them too. BTW, pretty rude of you to say
Pegasus was ever able to get this to work. The man IMO has went out of his
way to help you, be grateful even though you can't get it to work.

All the best,
SG

Thanks for your support. I think the OP got a bit frazzled but he
has since distanced himself from his remark, so let's leave it at that.
 
Pegasus (MVP) said:
One hour ago I wrote this:

*** You jumped ahead in the test process. Test #2 does NOT
*** involve a shortcut key. It requires you to open Notepad,
*** then click the new shortcut in the QuickLaunch bar.

You appear to have overlooked this part of my reply. I suggest you
try it. Alternatively you could discuss the possibility of allowing
remote access to your machine in order to get to the bottom of
this issue, before you lose your mind :-)

OK, Pegasus,

I ran test #2 and when I clicked on the shortcut in the Quick Launch, it put
the
John Doe MyPassword into the Notepad file. That much works. The
remaining
problem is the hot keys themselves. Is there any independent way I can test

the operation of these keys? I would only consider letting you take control

of my machine as a last resort.

Sherwin
 
OK, Pegasus,

I ran test #2 and when I clicked on the shortcut in the Quick Launch,
it put
the
John Doe MyPassword into the Notepad file. That much works. The
remaining
problem is the hot keys themselves. Is there any independent way I can
test

the operation of these keys? I would only consider letting you take
control

of my machine as a last resort.

Sherwin

No problem - in fact a remote session would now be futile
because my arms are not long enough to press your shortcut
keys! (They must be pressed locally.)

Test #2 proves that the script works, that the shortcut works and
that the task switching part (Alt+Tab) works. The remaining
problem is the shortcut key assigned to the new shortcut. This
has in essence nothing to do with the script I wrote for you, so
let's forget about the script and concentrate on the shortcut key.
If this was my machine then I would do this:

Test #3
a) Create a new shortcut on the desktop. Get it to launch notepad.exe.
b) Test this new shortcut.
c) Give a shortcut key combination.
d) Press this shortcut key. It should open a note pad.

With respect to item c), note this:
- You must click in the "Shortcut" key field before pressing the
desired shortcut combination.
- The chosen combination must be reflected in the Shortcut field.
- You must try different shortcut key combinations.
- You must disable all other keystroke capturing/modifying software.
- If still unsuccessful, reboot in Safe Mode and try again.
[This is something I have not tried so far]

I will now be off the air for about eight hours. Please let me have
your feedback either way so that I know what might have gone
wrong.
 
Pegasus (MVP) said:
Test #3
a) Create a new shortcut on the desktop. Get it to launch notepad.exe.
b) Test this new shortcut.

It works, launching the notepad window box.
c) Give a shortcut key combination.

I assigned Ctrl + Alt + X
d) Press this shortcut key. It should open a note pad.

It works, and also creates a notepad window box.
With respect to item c), note this:
- You must click in the "Shortcut" key field before pressing the
desired shortcut combination.
- The chosen combination must be reflected in the Shortcut field.
- You must try different shortcut key combinations.
- You must disable all other keystroke capturing/modifying software.
- If still unsuccessful, reboot in Safe Mode and try again.
[This is something I have not tried so far]

Everything in test #3 worked, so there was no need for further testing of
this type.

I also downloaded MS Windows Script version 5.6, but it did not update the
cscript.exe file,
and had no effect on this problem.

Sherwin
 
sherwindu said:
To your credit, you are the only one
who has given some information on how to acheive this.

Not counting, of course, my suggestion of Keyboard Express which you
didn't (and still don't apparently) see fit to acknowledge. Choosing to
ignore some information is not the same that information not being given.
 
Sid

Sorry for not acknowledging your posting. I did look at Keyboard Express and
discounted for two reasons. My problem is not serious enough to warrent
spending
the money for this package. Secondly, this is a challange for me, plus a
learning
experience when I get involved with these difficulties. I am not one to give up

easily and take the easy way out.

Sherwin
 
sherwindu said:
Pegasus (MVP) said:
Test #3
a) Create a new shortcut on the desktop. Get it to launch notepad.exe.
b) Test this new shortcut.

It works, launching the notepad window box.
c) Give a shortcut key combination.

I assigned Ctrl + Alt + X
d) Press this shortcut key. It should open a note pad.

It works, and also creates a notepad window box.
With respect to item c), note this:
- You must click in the "Shortcut" key field before pressing the
desired shortcut combination.
- The chosen combination must be reflected in the Shortcut field.
- You must try different shortcut key combinations.
- You must disable all other keystroke capturing/modifying software.
- If still unsuccessful, reboot in Safe Mode and try again.
[This is something I have not tried so far]

Everything in test #3 worked, so there was no need for further testing
of
this type.

I also downloaded MS Windows Script version 5.6, but it did not update
the
cscript.exe file,
and had no effect on this problem.

Sherwin
I will now be off the air for about eight hours. Please let me have
your feedback either way so that I know what might have gone
wrong.

Thanks for the feedback. When I suggested Test #2, I wrote:
"Seeing the confusion we had before, I'm not going to skip any
steps, even though they may be unnecessary". It appears that
this remark had to opposite effect: It caused you to jump the
gun and skip part of Test #2. I had to ask you two more times
to go through Test #2. Your decision to forge ahead added
many hours to this saga and was a major factor in the frustration
you suffered.

I hope you've learnt this simple lesson from this long-winded
saga: When frustrated by a problem, allow yourself to be led,
and don't lash out at your teacher.
 
Back
Top