Jump to content

getting error in set oAutoIt = WScript.CreateObject("AutoItX3.Control")


Recommended Posts

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

Link to post
Share on other sites

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 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.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 (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

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

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

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

Link to post
Share on other sites

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 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.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 (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

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

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

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

Link to post
Share on other sites

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...