When setting the WSH .Hotkey property how is the hotkey value set to the
default "None"? Whatever I use becomes the hotkey since the value assigned
to this property must be a string.

Dim oShell As New IWshShell_Class
Dim oShortCut As New IWshShortcut_Class

oShortCut.Hotkey = ??? 'Default..."None"
oShortCut.Save

Set oShell = Nothing
Set oShortCut = Nothing

I cant simply not refer to the hotkey property because it is overwriting an
already existing shortcut that has a hotkey in place but needs to be
overwritten.

Re: WSH Hotkey by tlavedas

tlavedas
Mon Nov 28 12:17:57 CST 2005

As far as I can tell, the HotKey property is of subtype string and is
merely a zero length string when it is undefined.

Even though the shortcut definition created by setting the hotkey
property to an empty string fails to display the word 'None' in the
resulting shortcut, for all practical purposes, that's what the
shortcut is - None. That is, there is no key or combination of keys
that will activate the shortcut.

So, just use ...

.hotkey = "" ' or Empty

to clear an existing definition.

Tom Lavedas
=============
http://my.fcc.net/~tglbatch (new URL - old content)

FM wrote:
> When setting the WSH .Hotkey property how is the hotkey value set to the
> default "None"? Whatever I use becomes the hotkey since the value assigned
> to this property must be a string.
>
> Dim oShell As New IWshShell_Class
> Dim oShortCut As New IWshShortcut_Class
>
> oShortCut.Hotkey = ??? 'Default..."None"
> oShortCut.Save
>
> Set oShell = Nothing
> Set oShortCut = Nothing
>
> I cant simply not refer to the hotkey property because it is overwriting an
> already existing shortcut that has a hotkey in place but needs to be
> overwritten.


Re: WSH Hotkey by FM

FM
Mon Nov 28 14:56:45 CST 2005

Is it possible to display the word 'None' in the resulting shortcut when an
existing definition is cleared?


> Even though the shortcut definition created by setting the hotkey
> property to an empty string fails to display the word 'None' in the
> resulting shortcut, for all practical purposes, that's what the
> shortcut is - None. That is, there is no key or combination of keys
> that will activate the shortcut.
>
> So, just use ...
>
> .hotkey = "" ' or Empty
>
> to clear an existing definition.
>
> Tom Lavedas
> =============
> http://my.fcc.net/~tglbatch (new URL - old content)



Re: WSH Hotkey by tlavedas

tlavedas
Mon Nov 28 16:29:14 CST 2005

I can't figure out a way.

Tom Lavedas
=============
http://my.fcc.net/~tglbatch (new URL - old content)

FM wrote:
> Is it possible to display the word 'None' in the resulting shortcut when an
> existing definition is cleared?
>
>
> > Even though the shortcut definition created by setting the hotkey
> > property to an empty string fails to display the word 'None' in the
> > resulting shortcut, for all practical purposes, that's what the
> > shortcut is - None. That is, there is no key or combination of keys
> > that will activate the shortcut.
> >
> > So, just use ...
> >
> > .hotkey = "" ' or Empty
> >
> > to clear an existing definition.
> >
> > Tom Lavedas
> > =============
> > http://my.fcc.net/~tglbatch (new URL - old content)