7 Replies Latest reply: Jul 8, 2016 9:35 AM by Marcus Sommer RSS

    VBScript: AppActivate / Restore Window not working

      Hi All,


      I'm trying to restore a window that has been minimised but I can't get the VBScript working?


      This should work:


      sub restore
      Set WshShell = WScript.CreateObject("WScript.Shell")
      WshShell.AppActivate "Untitled - Notepad"
      success = WshShell.appactivate("Untitled - Notepad")
      if success then WshShell.sendkeys "% r"
      end sub


      Any ideas, to where I've gone wrong?