Sign in with
Sign up | Sign in
Your question

Programming my function key F2

Last response: in Windows XP
Share
January 25, 2005 8:56:53 AM

Archived from groups: microsoft.public.windowsxp.customize (More info?)

I test a software on XP, and I have to type in the username, password
about 100 times a day. So I made a search on the net on how to program
my function keys, it works, but when I put my vb script on my startup
folder, along with my shortcut to start Outlook, things get really
screed up. What is weird is that it worked for several weeks, I didn't
change anything, now when Outlook starts, I display my first, message
over and over again, even after I closed it 50 times (need to kill
outlook), and yesterday, Outlook started a new message, and I saw my
username/password being typed in my message automatically, over and
over again. What is going on?

Here is my script. (not real passwords). I have a shortcut mapping
this script to CTRL + ALT + 1 (F2). I copy the shortcut in my start
folder.

Set WshShell = WScript.CreateObject("WScript.Shell")

if 1 then
WshShell.SendKeys "USER1{ENTER}"
WshShell.SendKeys "PASS1{ENTER}"
end if

if 0 then
WshShell.SendKeys "USER2{ENTER}"
WshShell.SendKeys "PASS2{ENTER}"
end if
Anonymous
January 26, 2005 12:33:23 PM

Archived from groups: microsoft.public.windowsxp.customize (More info?)

Your script is wrong and why is it in Startup - it will be spewing out these keys at logon,

"if 1 then"

If what is 1?

If 1 = True then

is what it means but True IS 1 so this section of code will ALWAYS run

Conversly 0 is false so

If 0 = true then

is always false as 0 is false so this part of the code will NEVER run.
--
----------------------------------------------------------
http://www.uscricket.com
"tellme" <guhar1@yahoo.com> wrote in message news:a5c469b9.0501250556.4d1375f4@posting.google.com...
>I test a software on XP, and I have to type in the username, password
> about 100 times a day. So I made a search on the net on how to program
> my function keys, it works, but when I put my vb script on my startup
> folder, along with my shortcut to start Outlook, things get really
> screed up. What is weird is that it worked for several weeks, I didn't
> change anything, now when Outlook starts, I display my first, message
> over and over again, even after I closed it 50 times (need to kill
> outlook), and yesterday, Outlook started a new message, and I saw my
> username/password being typed in my message automatically, over and
> over again. What is going on?
>
> Here is my script. (not real passwords). I have a shortcut mapping
> this script to CTRL + ALT + 1 (F2). I copy the shortcut in my start
> folder.
>
> Set WshShell = WScript.CreateObject("WScript.Shell")
>
> if 1 then
> WshShell.SendKeys "USER1{ENTER}"
> WshShell.SendKeys "PASS1{ENTER}"
> end if
>
> if 0 then
> WshShell.SendKeys "USER2{ENTER}"
> WshShell.SendKeys "PASS2{ENTER}"
> end if
Anonymous
January 26, 2005 1:07:35 PM

Archived from groups: microsoft.public.windowsxp.customize (More info?)

The IF 1 THEN is for me to select which login password I need to use. I
only use one pair at a time. So when I want my F2 key to spew such
passord then I edit my SendKey.vbs and put a 1 instead of 0. Placing my
SendKey.vbs and shortcut in my startup is the only way I found to
activate my F2 reprogramming. Right, now its on my desktop and the F2
key does nothing.
Related resources
Anonymous
January 27, 2005 11:44:08 AM

Archived from groups: microsoft.public.windowsxp.customize (More info?)

David Candy wrote:
>Does assigning another key work?

Weird. It works now. I re-opened my shortcut, look at the key mapping,
was ALT+CTRL+1 (?). I deleted this and typed F2. F2 appeared as the new
mapping. And now it works fine, even after reboot, and even if my
shortup in only on my desktop. Dont get it, it worked for two
months...the old way?. Must be all these windows update I have every
morning, which I answer yes, out of being fed up with them...

Thanks.
Anonymous
January 27, 2005 2:11:35 PM

Archived from groups: microsoft.public.windowsxp.customize (More info?)

Fair enough. Most people cut and paste the line and put a comment character at the buginning of one line or another.

Have you rebooted. (all you need do is restart explorer, here's a way -

Ctrl + Alt + Shift and Close or Cancel in the Shutdown dialog
Closes down Window's shell. Use Task Manager's File - Run dialog to start Explorer to restart the shell.).

Hotkeys are read at explorer's startup. If it doesn't take your key there could be another shortcut with that key. The first shoutcut to claim a key wins it. Maybe you are first in startup but something else is when on the desktop. EG Explorer looks at start for hotkeys before lt looks on the desktop. Does assigning another key work?



--
----------------------------------------------------------
http://www.uscricket.com
<guhar1@yahoo.com> wrote in message news:1106762855.444391.255120@f14g2000cwb.googlegroups.com...
> The IF 1 THEN is for me to select which login password I need to use. I
> only use one pair at a time. So when I want my F2 key to spew such
> passord then I edit my SendKey.vbs and put a 1 instead of 0. Placing my
> SendKey.vbs and shortcut in my startup is the only way I found to
> activate my F2 reprogramming. Right, now its on my desktop and the F2
> key does nothing.
>
!