VBSCript Code Snippets for Syspro

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

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s