Hi!

Try to adapt to the plugin-style statements.  Always safe and avoids
many problems.

See this modified code of yours:
-------------
 @myproglaunch
 If (anywindow("=myprog") == 0) do
    do("%ProgramFiles%\Myprog\myprog.exe", "")
; // Wait for application
    MiscPlugin.Wait_Window("MyProgCaption! Start")
; // Set password dialog in foreground
    MiscPlugin.Set_ActWnd("MyProgCaption! Start")
; // send the registration number to the input field
    ;Keys {to MyProgCaption! Start}00000000000AAAAAAAAAA{enter}
    win.Keys("{to MyProgCaption! Start}00000000000AAAAAAAAAA{enter}")    
 Elseif (anywindow("=myprog") == 1)
    ;Window Show MyProgCaption AnyText*
    win.Show("MyProgCaption*")
 Endif
Quit
------------



On Wed, 4 Aug 2004 19:31:16 +0200, Thomas Woelk <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> I use the follow lines to start an application via keyboard macro.
> This little script sends the registration number to the the password dialog:
> 
> @myproglaunch
>  If (anywindow("=myprog") == 0) do
>     "%ProgramFiles%\Myprog\myprog.exe"
> ; // Wait for application
>     MiscPlugin.Wait_Window("MyProgCaption! Start")
> ; // Set password dialog in foreground
>     MiscPlugin.Set_ActWnd("MyProgCaption! Start")
> ; // send the registration number to the input field
>     Keys {to MyProgCaption! Start}00000000000AAAAAAAAAA{enter}
>  Elseif (anywindow("=myprog") == 1)
>     Window Show MyProgCaption AnyText*
>  Endif
> Quit
> 
> Always a dialog appears with the message:
> 
> "Cannot find window to change or to send keys to
>  MyProgCaption! Start"
> 
> Error occurred near line 7 which contained:
> Keys {to MyProgCaption! Start}00000000000AAAAAAAAAA{enter}
> Press Cancel to end all running scripts.
> 
> What's wrong? And what can I make better?
>


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~-> 

 
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