Jump to content

Recommended Posts

Posted

I have a script that builds our software projects every night. It's a complicated process but everything works like it should, HOWEVER...

When it opens our Visual Studio C++ Projects and starts the build process it doesn't properly close, so the entire script hangs and skips the

packaging, uploading, etc... processing.

Here's where I'm hanging...

; / BUILD 
ShellExecute("S:\Nightly\Builds\ProjectName.sln")
WinWaitActive("ProjectName")
sleep (27000)  ; Wait for Visual Studio to load all software projects (20+)
; start build
Controlsend ("ProjectName","", "", "^!{F7}")  ; Tell Visual Studio to begin building solution tree
; wait 15 minutes 
Sleep(900000)
ControlSend("ProjectName", "", "", "!f{UP}{ENTER}")  ; Send Alt + F, then move to exit and enter to close VS - this is where I'm hanging
WinWaitClose("ProjectName")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Posted

I have a script that builds our software projects every night. It's a complicated process but everything works like it should, HOWEVER...

When it opens our Visual Studio C++ Projects and starts the build process it doesn't properly close, so the entire script hangs and skips the

packaging, uploading, etc... processing.

Here's where I'm hanging...

; / BUILD 
ShellExecute("S:\Nightly\Builds\ProjectName.sln")
WinWaitActive("ProjectName")
sleep (27000)  ; Wait for Visual Studio to load all software projects (20+)
; start build
Controlsend ("ProjectName","", "", "^!{F7}")  ; Tell Visual Studio to begin building solution tree
; wait 15 minutes 
Sleep(900000)
ControlSend("ProjectName", "", "", "!f{UP}{ENTER}")  ; Send Alt + F, then move to exit and enter to close VS - this is where I'm hanging
WinWaitClose("ProjectName")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Use ProcessExists() to get the process ID and then use a ProcessClose().

[center][/center]

Posted

try

ControlSend("ProjectName", "", "", "!f") ; Send Alt + F, then move to exit and enter to close VS - this is where I'm hanging

ControlSend("ProjectName", "", "", "{UP}")

ControlSend("ProjectName", "", "", "{ENTER}")

WinWaitClose("ProjectName")

Im certain there is a better way, but you give no control id code.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Posted

try

ControlSend("ProjectName", "", "", "!f") ; Send Alt + F, then move to exit and enter to close VS - this is where I'm hanging

ControlSend("ProjectName", "", "", "{UP}")

ControlSend("ProjectName", "", "", "{ENTER}")

WinWaitClose("ProjectName")

Im certain there is a better way, but you give no control id code.

Wouldn't you have to do an "{ALTDOWN}f{ALTUP}" instead of "!f"?

[center][/center]

Posted

Then what if I wanted to send the string "!f" to a control, instead of simulating the Alt+f keypress?

Forgive me for pestering, just curious.

[center][/center]

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
×
×
  • Create New...