dcjohnston Posted October 18, 2004 Posted October 18, 2004 (edited) Hey, I am using a VB front end to call an autoit exe file. However if VB is running auto it exe files will not execute. PlatformApp = Shell("c:\platformup.exe", 1) ' Start Application AppActivate PlatformApp I see the Autoit icon pop up but for a millisecond. Help. Dave Edited October 18, 2004 by dcjohnston
bshoenhair Posted October 18, 2004 Posted October 18, 2004 Must be something wrong with your coding. Give an example of your code.
dcjohnston Posted October 18, 2004 Author Posted October 18, 2004 This is the full Code with error handler. If I close VB then the the autoit.exe file works fine. Private Sub Command3_Click() On Error GoTo ErrorHandler PlatformApp = Shell("c:\platformup.exe", 1) ' Start Application AppActivate PlatformApp ErrorHandler: ' Error-handling routine. Select Case Err.Number ' Evaluate error number. Case 75 Close #1 ' Close open file. Resume Next Case 53 MsgBox "The Platform App was not found at C:\." Resume Next Case 5 Resume Next Case Else End Select End Sub Thanks
bshoenhair Posted October 18, 2004 Posted October 18, 2004 I tested in VBA and in Excel VB with a simple script and it works fine for me. Must be an issue in your coding in "platformup.exe".
JSThePatriot Posted October 18, 2004 Posted October 18, 2004 If you could post the code for the script that would help us tell you the problem... It sounds like you have an If statement in your code (the fact that the autoit icon shows for a split second means that the code tried to run but it was exited before it could do anything) that is exiting because of a parameter that you supplied. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
dcjohnston Posted October 18, 2004 Author Posted October 18, 2004 Yup it was this code.... from the platformup.exe. This is the code from the examples in the help so everyone take note if you are using it. $g_szVersion = "Platform Upgrade" If WinExists($g_szVersion) Then Exit; It's already running AutoItWinSetTitle($g_szVersion) It was to keep the app from running multiple instances. Very interesting. Thanks for your time. Dave
this-is-me Posted October 18, 2004 Posted October 18, 2004 Is the title of your VB gui "Platform Upgrade" ? If so, you just shot yourself in the foot. Who else would I be?
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