Hi Tyler,
Here is your script with a hotkey added.
I chose the hotkey of Control-Alt-Shift-7 for the 70's.
Then I put the name of the function which I named PlaySounds. This has
to match the function name below.
Then I skipped the lines that don't need to be in the function, such as
client information.
Here is a revised script with the hotkey and function inserted:
clientinformation.scriptversion= "1.0"
clientinformation.scriptdescription= "This script plays a series of
commercials from the 70s, and is associated globally."
Dim myHotkey : Set myHotkey =
Keyboard.RegisterHotkey("Alt-Control-Shift-7","PlaySounds")
Function PlaySounds()
PlaySound "med.wav"
sleep 7000
PlaySound "wistle.wav"
sleep "14000"
PlaySound "crackerjack.wav"
sleep "28000"
End Function
Now the script will quietly load when Window-Eyes starts, and the user
can choose when to hear it by pressing the hotkey
Control-Alt-Shift-7.
I hope this helps.
Jeff Weiss
-----Original Message-----
From: Tylers Scripting [mailto:[email protected]]
Sent: Tuesday, November 10, 2009 10:26 PM
To: [email protected]
Subject: Hot keys? Assigning them?
Good evening,
For all of you that are on the gw-info list, then you've
probably heard about my new script, 70s commercials.
Someone has left me feedback, and they said that they'd like to
see a hotkey to also play these commercials, which I don't know
how to do.
Could someone email me an example of the code you'd use for
this?
Thank you very much.
With Best Regards,
Tyler Juranek