Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Test outlook open?
Message
De
08/01/2010 09:19:08
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01442564
Message ID:
01442761
Vues:
63
>thanks so much for example code Greg. i read in the premable that this searches window titles - my window title is 'inbox - microsoft outlook' - since that is the default i have outlook set to for appearance - so another computer may have some other setting.
>
>it doesn't seem that this will detect programs running but rather windows opened. maybe i'm getting getting wires crossed. i have tried variation of this without being able to get .f. reading.
>
>k

Ok, how about this one.
* The PEM of the Win32_Process class
* http://msdn.microsoft.com/en-us/library/aa394372(VS.85).aspx

LPARAMETERS  tcPattern
LOCAL loCIMV2, loProcesses
loCIMV2        = GETOBJECT("winmgmts://localhost/root/cimv2")
loProcesses    = loCIMV2.ExecQuery("SELECT * FROM Win32_Process where Name like '"+tcPattern+"'")
*!*	FOR EACH objProcess IN loProcesses
*!*		*-- read PEM
*!*	NEXT
RETURN loProcesses.COUNT>0
and the test...
? isRunning("Outlook.exe")
Greg Reichert
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform