(VBScript) After using "CATIA.StartCommand" method, how to auto-click the ok button in VBS
(VBScript) After using "CATIA.StartCommand" method, how to auto-click the ok button in VBS
(OP)
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?
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?





RE: (VBScript) After using "CATIA.StartCommand" method, how to auto-click the ok button in VBS
Don't use it. Instead use
Dim body2 As Body
Set body2 = bodies1.Item("what ever")
Dim assemble1 As Assemble
Set assemble1 = shapeFactory1.AddNewAssemble(body2)
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU
RE: (VBScript) After using "CATIA.StartCommand" method, how to auto-click the ok button in VBS
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.
RE: (VBScript) After using "CATIA.StartCommand" method, how to auto-click the ok button in VBS
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU
RE: (VBScript) After using "CATIA.StartCommand" method, how to auto-click the ok button in VBS
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?
RE: (VBScript) After using "CATIA.StartCommand" method, how to auto-click the ok button in VBS
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU
RE: (VBScript) After using "CATIA.StartCommand" method, how to auto-click the ok button in VBS
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?
RE: (VBScript) After using "CATIA.StartCommand" method, how to auto-click the ok button in VBS
Regards
Fernando
https://picasaweb.google.com/102257836106335725208 - Romania
https://picasaweb.google.com/103462806772634246699... - EU