Jump to content

Attemptting to start a program not working


deanP
 Share

Recommended Posts

Hello,

 

I am attempting to start a particular program with Audoit and have been working for two days and still no success. I have followed the tutorials and have been able to open notepad; and using the same format I have opened two other programs, no problem.

Here is the basic script I am attempting:

Opt("TrayAutoPause",0)

Run("C:\Program Files\3SpaceSensor\3SpaceSuite.exe")

WinWaitActive("3-Space Sensor Suite")

 

Thank you for any help,

 

DeanP

3spacesensor.au3

Link to comment
Share on other sites

13 hours ago, deanP said:

Hello,

 

I am attempting to start a particular program with Audoit and have been working for two days and still no success. I have followed the tutorials and have been able to open notepad; and using the same format I have opened two other programs, no problem.

Here is the basic script I am attempting:

Opt("TrayAutoPause",0)

Run("C:\Program Files\3SpaceSensor\3SpaceSuite.exe")

WinWaitActive("3-Space Sensor Suite")

 

Thank you for any help,

 

DeanP

3spacesensor.au3

Hello Dean.  You are not the first to experience confusion in regards to run vs shellexecute, so I wanted offer some clarification for you.  Think of "Run" as the run prompt you see when pressing "Win + R" and can also be used to launch base command line exectuables (Ususally in C:\Windows\System32).  However, if you open your run prompt and input the full path to the application exe that launches the application, that would also not work.  What you can do, if for some reason you absolutely needed to use run, is use run in conjunction with the macro "@Comspec" to run the command prompt and pass the application to the command prompt as a parameter, which will launch the application:
Run( @Comspec & " /c C:\Program Files\3SpaceSensor\3SpaceSuite.exe" )

Link to comment
Share on other sites

Hi Matt,

Thank you for explaining and sharing the method to work through the dos window. When I apply this method I can see the dos window for a split second with the script run but to no avail, the program does not open. I have tried many variations of the following, see the screen shots below.  When I click on the program icon and open the program I can see two processes in my task manger that start and stay as long as the program is in use. When I use run or shell from autoit to open the program, I can see these processes start but soon after (a few seconds) the processes go away and the program does not start. The screen shot of the task manager is of the proceess that seem to start when I run autoit but the second process never gets past ~103,00 k both process quit. I am new to using Autoit, downloaded to my windows 7 this week.

Thank you for you help and please write back if you have another insight.

 

DeanP

 

Link to comment
Share on other sites

Just now, deanP said:

Hi Matt,

Thank you for explaining and sharing the method to work through the dos window. When I apply this method I can see the dos window for a split second with the script run but to no avail, the program does not open. I have tried many variations of the following, see the screen shots below.  When I click on the program icon and open the program I can see two processes in my task manger that start and stay as long as the program is in use. When I use run or shell from autoit to open the program, I can see these processes start but soon after (a few seconds) the processes go away and the program does not start. The screen shot of the task manager is of the proceess of the program when I open it with a mouse click. When I try and run the program through start or shell the second process in the picture sometimes makes it just  past ~103,00 k both process quit. I am new to using Autoit, downloaded to my windows 7 this week. Also someone suggested ading sleep delays which I did but to no Avail.

Thank you for you help and please write back if you have another insight.

 

DeanP

 

 

 

 

Link to comment
Share on other sites

3 minutes ago, deanP said:

Hi Matt,

Thank you for explaining and sharing the method to work through the dos window. When I apply this method I can see the dos window for a split second with the script run but to no avail, the program does not open. I have tried many variations of the following, see the screen shots below.  When I click on the program icon and open the program I can see two processes in my task manger that start and stay as long as the program is in use. When I use run or shell from autoit to open the program, I can see these processes start but soon after (a few seconds) the processes go away and the program does not start. The screen shot of the task manager is of the proceess that seem to start when I run autoit but the second process never gets past ~103,00 k both process quit. I am new to using Autoit, downloaded to my windows 7 this week.

Thank you for you help and please write back if you have another insight.

 

DeanP

 

 

 

Hmm.  I did not see any screen shot, but I will still attempt to help.  Are you compiling the script to run with administrative privileges?  That could be your issue.

 

2016-10-21 17_39_04-AutoIt3Wrapper GUI to Compile AutotIt3 Script (ver 16.612.1119.0).png

Link to comment
Share on other sites

Just now, deanP said:

 

 

3 minutes ago, deanP said:

Hi Matt,

Thank you for explaining and sharing the method to work through the dos window. When I apply this method I can see the dos window for a split second with the script run but to no avail, the program does not open.

I have tried many variations of the Run & Shell: see the screen shots below. Also when I click on the program icon and open the program I can see two processes in my task manger that start and stay as long as the program is in use.

 

When I use run or shell from autoit to open the program, I can see these processes start but soon after (a few seconds) the processes go away and the program does not start. One screen shot below is of the task manager showing the process that seem to start when I run the program from a mouse click  When I try to run the program via Run or Shell the second process, seen below, never gets past ~103,00 k both process quit. I am new to using Autoit, downloaded to my windows 7 this week.

Thank you for you help and please write back if you have another insight.

 

DeanP

 

 

 

 

Link to comment
Share on other sites

Hi Matt,

Thank you for the help and showing me to set file to run with  administrator.

I compiled and tried all three version as in my screen shot; both run versions and also the shell version. I still have the same thing going on, the processes will start as seen in the task manger and then go away without the program starting.

DeanP

 

 

Link to comment
Share on other sites

So how are you launching the script?  From the editor window menu item or by launching the executable that that is generated by the compiler?  Launching the script from the editor's menu item does not include the admin credentials I walked you through enabling.  If you followed the instructions in the word file, then in the same folder that your script is in, there should be an "exe" with the same name.  Double click it.

Edited by MattHiggs
Link to comment
Share on other sites

Hi Matt,

 

Not knowing any better it does appear that the file is starting to open per seeing the two processes names after the program opening; the same two that open when I click to open the program.  Thus it seems the start of the Script is causing the file to start to open; and it seems something is stopping this as its on its way to opening.

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...