Sign in to follow this  
Followers 0
cromag76

@SW_HIDE and x64/x86 conflict

3 posts in this topic

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

Share this post


Link to post
Share on other sites



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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

Share this post


Link to post
Share on other sites

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

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
Sign in to follow this  
Followers 0