5/10/2011 12:32 PM | |
Joined: 10/3/2010 Last visit: 10/31/2024 Posts: 1563 Rating: (192) |
Quite easy with some sample code found online with google. Make a new picture, add a button with a Mouse action (VBS) and try following script: [code] Sub OnClick(ByVal Item) Dim AllProcess Dim Process Dim strFoundProcess strFoundProcess = False Set AllProcess = GetObject("winmgmts:") 'create object For Each Process In AllProcess.InstancesOf("Win32_process") 'Get running processes If (InStr (Ucase(Process.Name),"TASKMGR.EXE") = 1) Then 'Made all uppercase to remove ambiguity. Replace TASKMGR.EXE with your application name in CAPS. MsgBox "Application is already running!" 'You can replace this with Reporter.ReportEvent strFoundProcess = True Exit For End If Next If strFoundProcess = False Then MsgBox "Go ahead!Application is not running" 'You can replace this with Reporter.ReportEvent End If Set AllProcess = Nothing End Sub [/code] Tested on WinCC 7.02 update 3 & working. |
B r g d s , |
|
This contribution was helpful to2 thankful Users |
Follow us on