Hi! I need a script to continuously right click and press
"f". Is it possible? Thanks

Re: Right click with vbscript? by Christoph

Christoph
Wed May 26 07:27:40 CDT 2004

26.05.2004 13:15, Marco Maier schrieb:
> Hi! I need a script to continuously right click and press
> "f". Is it possible? Thanks

right-click's are simulated with shift+F10 keycodes most
often, raising the context-menu of the active window or
selection.

set ws = createobject("wscript.shell")
while 1 'infinite loop
ws.sendkeys "(+{F10})"
WScript.Sleep 50
ws.sendkeys "f"
WScript.Sleep 1000 ' wait 1 sec for next loop
wend

Also hiddensoft's AutoItX-ctrl supports a RightClick
method, which may be more accurate under certain
circumstances. AutoItX also supports a Send-Method and
some AppActivate-equivalents, which are more
reliable/robust compared to WSHs AppActivate, especially
in making a window active _and_ bringing it to foreground.

--
Gruesse, Christoph

Re: Right click with vbscript? by Marco

Marco
Wed May 26 08:00:11 CDT 2004

Christoph Basedau wrote in message
<news:40b48f90$0$26348$9b4e6d93@newsread4.arcor-online.net> :

> some AppActivate-equivalents, which are more
> reliable/robust compared to WSHs AppActivate, especially
> in making a window active _and_ bringing it to foreground.

Thank you. The first script doesn't work in my case,it opens
the wrong context menu in the currently active window.
I'll try the second solution

Marco