when we are creating script in autoit and we need to use COM then we need not to use createobject. Directly we can write
Dim $oShell
$oShell=ProcessExists("notepad.exe")
If ($oShell) Then
MsgBox(0,"ashish","Process Exists")
Else
MsgBox(0,"ashish","Process does not open")
EndIf
I executed and it is working.
Thanks to Dear Water and Richard for sincere n quick reply
Regards,
Ashish
If I execute the script in vbsedit then I can successfully execute but I made the changes in the script so that I can execute the script in sciTE4AutoIT editor but I am getting error even I registered the Dll and added the COM component but I am failed to execute the script in scite4AutoIT editor I am learning AutoIt usage with COM objects.
I am not compiling my code I m just executing by pressing F5
Thanks for the replies Water, and Richard
Hi
when i executed the below mentioned code in editor
set oAutoIt = WScript.CreateObject("AutoItX3.Control")
pid=oAutoIt.ProcessExists("notepad.exe")
If (pid) Then
MsgBox(0,"ashish","PRocess Exists")
Else
MsgBox(0,"ashish","Process does not open")
EndIf
error
error in line: set oAutoIt = WScript.CreateObject("AutoItX3.Control")
I m getting error "process_mgmt.au3 (4) : ==> Missing separator character after keyword.:"
Please tell me where i m incorrect
Thanks,
Ashish