Monday 21 April 2014

How to close a Syspro Window using VBScript

Function CustomizedPane_OnToolbarButton1Clicked()
    Dim WshShell
    set WshShell = CreateObject("WScript.Shell")
    WshShell.SendKeys "%{F4}"
    ' WshShell.SendKeys "{ESCAPE}" ' Can use this too
    set WshShell = nothing

End Function

Good sendkeys reference:http://www.devguru.com/technologies/wsh/quickref/wshshell_SendKeys.html

No comments:

Post a Comment