CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2016
    Posts
    1

    Clicking a button on a application is not working through VBscript

    Hi I am trying to click the next button on an application using VB script but the next button dialog box is getting highlighted but it is not proceeding please see the code below and provide me some suggestion,
    Dim objShell
    Set objShell = WScript.CreateObject("WScript.Shell")
    Wscript.Sleep 4000
    objShell.SendKeys "%{N}"

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Clicking a button on a application is not working through VBscript

    Have you tried sending space after the button is highlighted?

    If I am not mistaken the spacebar will press a button if it has focus.
    Always use [code][/code] tags when posting code.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured