kyuzumaki Posted February 25, 2015 Posted February 25, 2015 (edited) I have a simple script that clicks on a few bits of a gui in solidworks. This works fine when run native windows but when I run within vmware (which is preferable to bootcamp) the mouse and all commands stop working when solidworks is brought into the foreground. I've played with all the vmware compatibility settings I can find but nothing seems to work. Im not sure how autoit sends the commands but could it be the vmware drivers? Is there a compatible mouse driver for autoit I can install? I'm using the standard MouseClick command heres a test function I'm using that clicks in a circle. func ClickCircle() $Radius=25 $Xclick=$Radius*2 $Yclick=$Radius*2 $theta=0 for $theta=0 To 360 step 1 ;rotate point around centre $X $Y $thetaRad=$theta*$fDegToRad $XclickP=(cos($thetaRad)*$Xclick)+(sin($thetaRad)*$Yclick) $YclickP=(cos($thetaRad)*$Yclick)-(sin($thetaRad)*$Xclick) MouseClick("left",$X+$XclickP+$Radius,$Y+$YclickP+$Radius,1,5) next endfunc Edited February 25, 2015 by kyuzumaki
jdelaney Posted February 25, 2015 Posted February 25, 2015 Why would you run through a VMware client, and not on the vm directly? More reliable that way. Look up powercli to see how to copy a file, and then execute it. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
kyuzumaki Posted February 25, 2015 Author Posted February 25, 2015 (edited) PowerCLI is not free for me, using VM Fusion 7. Is your suggestion to scrap autoit entirely and rewirte the script for this tool? I'm downloading the trial now to see if the trial does what I need. EDIT: How daft, i just solved the problem using WinActivate("SolidWorks"), it seems that vmware directs the inputs somehow to the active window only. So the simulated click that activates the window on native windows goes nowhere in the VM. Anyway thanks for the info will still check out the PowerCli thing it looks useful Edited February 25, 2015 by kyuzumaki
jdelaney Posted February 25, 2015 Posted February 25, 2015 I was suggesting creating an au3 (converted to exe) and run it locally on the vm via powercli. If you open remoting on the vm, paexec(free) would do the job also. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now