Jump to content

Recommended Posts

Posted

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

Posted

You try to use AutoItX. AutoItx allows to call AutoIt functions from other languages. That means that you can't use AutoIt to compile the source.

Can you please describe what you want to to.

BTW: You posted in the wrong forum. This kind of thread belongs to the "Help and Support" forum.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted (edited)

That code and that error are unrelated. The code you posted is using AutoItX while the error you posted could only come from an executing script.

Edit: Wait are you trying to compile that source in AutoIt? That makes even less sense.

Edited by Richard Robertson
Posted

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

Posted

Your code is a mixture of VB and AutoIt. VB calls AutoIt. Therefore you have to execute the script in a VB environment because ScitTE4AutoIt doesn't understand VB.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...