-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProcessChecker.fprg
34 lines (34 loc) · 1.88 KB
/
ProcessChecker.fprg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?xml version="1.0"?>
<flowgorithm fileversion="2.0">
<attributes>
<attribute name="name" value=""/>
<attribute name="authors" value="Ray"/>
<attribute name="about" value=""/>
<attribute name="saved" value="2017-07-16 08:45:53 PM"/>
<attribute name="created" value="UmF5OyBSQVlOSUVWQTI7IDIwMTctMDYtMDI7IDA1OjE2OjU1IFBNOyAyMzM3"/>
<attribute name="edited" value="UmF5OyBSQVlOSUVWQTI7IDIwMTctMDctMTY7IDA4OjQ1OjUzIFBNOyAyMzQ2"/>
</attributes>
<function name="Main" type="None" variable="">
<parameters/>
<body>
<comment text="Check to see if a process or Window is running or open "Network and Sharing Center"."/>
<output expression=""Check to see if a process is running or a Window is open Network and Sharing Center""/>
<declare name="X" type="Integer" array="False" size="" variables="X"/>
<comment text="WinExists is an AutoIT function that will result in 1 if a Window exists or produce a 0 if it does not exist."/>
<call expression="WinExists(1)"/>
<assign variable="X" expression="1"/>
<if expression="X=1">
<then>
<output expression=""Network and Sharing Center is Open""/>
<comment text="If process is running (Window minimized or hidden) bring to forefront."/>
<call expression="WinActivate("Network and Sharing Center")"/>
</then>
<else>
<output expression=""Network and Sharing Center is NOT open""/>
<comment text="Using AutoIT and running ClassID to invoke Network and Sharing Center"/>
<call expression="Run ("explorer shell:::{CLSID}")"/>
</else>
</if>
</body>
</function>
</flowgorithm>