--- In [EMAIL PROTECTED], "Matt" <[EMAIL PROTECTED]> wrote:
> ok, to help explain, here's a chunk of the script i'm working on.  
> it's meant to help extend the functionality of the standard windows 
> run box.
> 
> local runHandle
> local _Target
> 
> ;get window handle for run box
> runHandle = win.handle("active")
> ;skip to EOL to allow for autocomplete
> keys {ed}
> ;set _Target to whatever text is in the run box
> _Target = win.childtextbyindex(runHandle,1)
> 
> if _Target doesn't match up against a set of conditions, it's 
> supposed to just be run from the run box.
> 
> ;send ctrl+enter because enter would just trigger the script again
> keys {toany &(runHandle)}^{enter}
> quit
> 
> 
> this always launches the application just the way it's supposed 
to.  
> however... sometimes, it seems to activate a different window, 
> first.  for instance, if i have a maximized notepad window hidden 
> behind a maximised IE window, open a run box, and type something 
in, 
> say, "cmd", it should wind up with a maximised IE with a command 
> prompt on top of it.  sometimes, though, it winds up with a 
maximized 
> notepad window with a command prompt on top of it instead.  any 
idea 
> why it seems to sometimes activate another window before running 
the 
> command?

Do you have any particular reason to use {toany }?
It seems to me because you're using {toany } here.
Use simply {to } which seems enough in this case.

Sean



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~-> 

Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to