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