Sign in to follow this  
Followers 0
benny12

Vmware + autoit

32 posts in this topic

Hello everyone, I need some advice to automate my vmware
 
What should I write in order to select the portion of the window number 1 and then send keyboard commands?
 
it's correct?
WinActivate ("[CLASS: ATL: SysTreeView32]")
Send ("{} Numpad1")

64QQn4K.jpg

 

Share this post


Link to post
Share on other sites



Did you test it?

If you are calling directly to an application you may try using ControlSend() instead of just Send() as well.

Share this post


Link to post
Share on other sites

there seems to be a blank space between 

ATL: SysTreeView32

but in the autoit info there's no blank space ???

Share this post


Link to post
Share on other sites

WinActivate("VMware Workstation")
ControlSend("VMware Workstation", "", 10002, "CentOS")
Works on my VMWare, change the send to what keys your trying to use.

Share this post


Link to post
Share on other sites

there seems to be a blank space between 

ATL: SysTreeView32

but in the autoit info there's no blank space ???

yes, but don't work equally

WinActivate("VMware Workstation")
ControlSend("VMware Workstation", "", 10002, "CentOS")
Works on my VMWare, change the send to what keys your trying to use.

 

then to select that portion of the program do not have to put ATL: SysTreeView32 ... but just ("VMware Workstation") ?

it's possible to use au3recorder?

Share this post


Link to post
Share on other sites

Can you please explain exactly what you're trying to do (launch a vm, revert to snapshot, etc.?)


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

I did a complet script to automate envelope creation with the envelope configuration if you want to use it at your own... i am gonna share later PM me

probably need some modification

Share this post


Link to post
Share on other sites

Can you please explain exactly what you're trying to do (launch a vm, revert to snapshot, etc.?)

 

for example: i want to open the 15th folder, select all machines, power on and open. Then, will close the program (or all tabs opened) and do the same with the others folders (1,2,3, ecc)

I think it is difficult, but I would to have some tips :P

WLazdHQ.jpg

Share this post


Link to post
Share on other sites

Why don't you use the command line interface to do all of that?


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Why don't you use the command line interface to do all of that?

I need to automate because too many computers to use

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

I need to automate because too many computers to use

"Why don't you use the command line interface to do all of that" , to automate the vmware, no need to use the graphic interface to automate that, ...or do you ?

https://www.vmware.com/support/ws55/doc/ws_learning_cli_vmrun.html

C:\Program Files (x86)\VMware\VMware Workstation>vmrun list
Total running VMs: 1
G:\VMs\Xp Stock\XP Stock.vmx

use "vmrun /?" for more examples

Edited by argumentum

Share this post


Link to post
Share on other sites

I need to automate because too many computers to use

What exactly do you mean by this? You have too many virtual machines to do this? That doesn't make a lot of sense. Using a string of Run commands that actually do what you want to do is a lot better than trying to get some ControlSends to hopefully work isn't it? After all, you can be assured that the VMWare's CLI is going to do what you're attempting where the Send/ControlSend might not, and will be easier.

1 person likes this

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

"Why don't you use the command line interface to do all of that" , to automate the vmware, no need to use the graphic interface to automate that, ...or do you ?

https://www.vmware.com/support/ws55/doc/ws_learning_cli_vmrun.html

C:\Program Files (x86)\VMware\VMware Workstation>vmrun list
Total running VMs: 1
G:\VMs\Xp Stock\XP Stock.vmx

use "vmrun /?" for more examples

it seems too complicated,  I would to use with autoit to fix for some problems

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

Using the command line, specifically designed to interact with the product, seems to be more complicated than manipulating the GUI?

Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

It's less complicated than ControlSend to the interface, the commands are all laid out and explained, all you need to do is run them.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Using the command line, specifically designed to interact with the product, seems to be more complicated than manipulating the GUI?

 

It's less complicated than ControlSend to the interface, the commands are all laid out and explained, all you need to do is run them.

 

mmm ok

What should I type to start the folder number 1?

LO6q9bn.jpg

Share this post


Link to post
Share on other sites

mmm ok

 

What should I type to start the folder number 1?

Maybe you should read the link that was posted earlier perhaps?

 

start

Start a virtual machine or team. [Path to .vmx file (virtual machine)]  or [Path to .vmtm file (team)]


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Maybe you should read the link that was posted earlier perhaps?

 

I read...but I have no virtual machines structured in team.

they are in multiple folder

folder1 has others 20 sub folders

folder2, the same, etc

Share this post


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
Sign in to follow this  
Followers 0