Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42215

VS 2010 Programmatically click the Yes (Save) button after calling Process.CloseMainWindow()

$
0
0
Hi,
I'm a VB.net newbie developing an script in Visual Studio 2012. I'm launching Qlikview (a dashboard app) and closing it using the following code. When Qlikview is launched, new data is automatically loaded into the app and it needs to be saved when Qlikview is closed. Calling Process.CloseMainWindow results in a windows form popping up that asks If I'd like to save changes to the document (Yes, No, Cancel buttons). I need to programmatically click Yes as no humans or aliens will be present when the script runs. Any ideas or suggestions? Thanx in advance.

code snippet...

Dim oProc As Process = New Process
oProc.StartInfo.UseShellExecute = True
oProc.StartInfo.FileName = sSandboxPath + "\" + sQVDoc
oProc.Start()
' Close Qlikview...
oProc.CloseMainWindow()
' Save the changes
' ???
oProc.WaitForExit(60000)
If Not oProc.HasExited Then
.....

Viewing all articles
Browse latest Browse all 42215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>