cromag76 Posted June 4, 2014 Posted June 4, 2014 I am trying to write what I thought was going to be a very simple script... I am trying to start a completely hidden program 1 (x64) then after a period of 2 seconds, shut down that program. After the first program shuts down, I would like to start a second program (x86). I have a software issue that requires this order of operations or the second program generates a BSOD... The first issue is that I have had to generate 2 separate executables, as the x86 program only responds to x86 scripting, while the same is true for the x64 program... Is there a better solution to this? Secondly, I am trying to use the @SW_HIDE but it is not working. I seen that there was another user that experienced something similar and were able to get working, but I have not been able to figure that out. Your assistance is greatly appreciated!!! ;Startup 1st program (x64) completely hidden. Run(@ProgramFilesDir & "\Folder1\Folder2\Program1.exe", "", @SW_HIDE) Sleep(500) $handle = WinGetHandle("[TITLE:Program1]");Get handle to gently close progam. ;MsgBox(1, "Handle", WinGetTitle($handle)) Sleep(2000) WinClose($handle) ;Call next executable to start second progam (x86) Run("trial71.exe", "", @SW_MAXIMIZE) #comments-start trial71.exe Run(@ProgramFilesDir & "\FolderA\FolderB\Program2.exe", "", @SW_MAXIMIZE) #comments-end
Moderators Melba23 Posted June 4, 2014 Moderators Posted June 4, 2014 cromag76,Welcome to the AutoIt forums. I am trying to start a completely hidden program 1 (x64) then after a period of 2 seconds, shut down that program. After the first program shuts down, I would like to start a second program (x86). I have a software issue that requires this order of operations or the second program generates a BSOD...How about a bit more information on these "programs"? At the moment the fact that you deliberately obscure their identities does nothing to inspire confidence. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
cromag76 Posted June 4, 2014 Author Posted June 4, 2014 Ok... No problem... Program 1 is called QCapture_x64.exe while program 2 is Scentis.exe. This is for a digital camera and image analysis system. The camera manufacturer has the software that ships with the camera (QCapture) which is a firewire camera. The Scentis program is supposed to integrate fully with the camera to control items like exposure, white balance, etc. If I start the computer up from scratch and run Scentis, as soon as I click on any camera control I get a BSOD. Opening and then closing the QCapture program before running the Scentis program gets around this issue. You cannot run both at the same time as only one program can control a camera at a time. Also, I tried to use a ControlSend() command but I think that you need the CLASS field, but that changes for QCapture every time it is started and is a long string like... "Afx:000007FEE2BE0000:8:0000000000010003:0000000000000000:00000000014105E1" with a Control CLASS of: MDIClient... I am attaching the exact coding I am currently using... ;Startup 1st program (x64) completely hidden. Run(@ProgramFilesDir & "\QImaging\QCapture Suite\QCapture_x64.exe", "", @SW_HIDE) Sleep(500) $handle = WinGetHandle("[TITLE:QCapture]");Get handle to gently close progam. ;MsgBox(1, "Handle", WinGetTitle($handle)) Sleep(2000) WinClose($handle) ;Call next executable to start second progam (x86) Run("trial71.exe", "", @SW_MAXIMIZE) #comments-start trial71.exe Run(@ProgramFilesDir & "\Struers\Scentis\Scentis.exe", "", @SW_MAXIMIZE) #comments-end
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