Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

(VBScript) After using "CATIA.StartCommand" method, how to auto-click the ok button in VBS

Status
Not open for further replies.

tpalsl125

Automotive
Apr 24, 2015
44
DE
Hello, All

I found the code to use the Catia function in VBScript.

But I want to know, if I use this code: "CATIA.StartCommand ("Assemble")",

the assemble box will pop up with 3 buttons, "OK", "Cancel" and "Preview".

In here, I want to put the code to automatically click the "OK" button.

I've already gotten the "sendkeys" method.

But as far as I searched, this can use in only VBA.

Can anybody tell me how to make it?
 
Replies continue below

Recommended for you

Hi, Ferdo

Thank you for your reply.

Yes, I've already known your script.

Here is actually what I want to make.

Please, link to my Youtube.

In here, I want to click automatically the Yes button and OK button.
 
Hi, ferdo

Thank you for your reply.

Your link is the way to use 'sendkeys' method in vba, right?

I really think the way is very nice way.

But I'd like to know in only vbscript.

Because to use a 'sendkeys' method always seperatly needs a vba file. This means to use it need two files.

One is VBScript, another is VBA.

Do you have any other idea?
 
Hi, Ferdo, thank you for your reply.

Yes, I'm sorry but I've already checked all replies carefully and tried.

And I can't use the 'vbs' seperatly in my Catia environment.

This means that I have to solve only with 'VBScript'.

I think to change the 'CATIA.StartCommand' method to other way, don't I?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top