joepesce

Script don't send CTRL key

9 posts in this topic

Hi I'm making a simple script to send some hotkeys to control vmware software, but every function with CTRL + key doesn't seem to work

for example:

Run("C:\Program Files (x86)\VMware\VMware Workstation\vmware.exe")
Sleep(3000)
WinActivate("VMware Workstation")
ControlSend("VMware Workstation", "", 10002, "^o")
Sleep(1000)
ClipPut("C:\006\006.vmx")
Send("^v")
Send("{ENTER}")
Sleep(3000)
WinActivate("VMware Workstation")
ControlSend("VMware Workstation", "", 10002, "^b")
Sleep(50000)
ControlSend("VMware Workstation", "", 10002, "^e")

 

please anyone can help me? 

Share this post


Link to post
Share on other sites



Have you tried it manuel with fingers on Keyboard? Did this work?

Share this post


Link to post
Share on other sites

yes, with keyboard works perfectly

Share this post


Link to post
Share on other sites

10002 is the box on the left when you open vmware

Share this post


Link to post
Share on other sites

Wait.... You're just sending a path to the Open dialog. Why not just use ControlSetText?

Also I'm pretty sure if you use Run("C:\006\006.vmx") it should automatically open the .vmx in the vmware.

And finally, I'm sure there's a command line parameter you can launch vmware with to automatically open that machine. If I had to guess

ShellExecute("Vmware exe", "C:\006\006.vmx", "directory to vmware")

Here are the command line parameters you can pass to vmware.exe

https://pubs.vmware.com/workstation-9/index.jsp?topic=%2Fcom.vmware.ws.using.doc%2FGUID-7369457F-FE1D-40FE-97B6-B29CA4916CCD.html

Share this post


Link to post
Share on other sites

try

#RequireAdmin

at the beginning of your code.

Share this post


Link to post
Share on other sites

You already have it active, try just Send instead of Control Send.

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