10-21-2011, 02:30 PM
Try using this:
Code:
Set qtpApp = CreateObject("QuickTest.Application")
qtpApp.Launch()
qtpApp.Visible = False
'qtpApp.WindowState = "Minimized"
qtpApp.ActivateView("ExpertView")
qtpApp.Visible = False
' qtpApp.New()
WScript.Sleep(1000)
qtpApp.ActivateView("ExpertView")
'qtApp.Visible = True
Set WshShell = CreateObject("Wscript.Shell")
WScript.Sleep(10000)
qtpApp.Visible = True
qtpApp.WindowState = "Maximized"
WScript.Sleep(500)
WshShell.SendKeys("{F3}")
WScript.Sleep(100)
WshShell.SendKeys("{enter}")
qtpApp.WindowState = "Minimized"
qtpApp.Visible = False
WScript.Sleep(800)