deanP

Attemptting to start a program not working

30 posts in this topic

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

Share this post


Link to post
Share on other sites



Hi Bill,

 

Thank you for your help. I will be back home with my system later and I will post my latest attempts using ShellExcecute .

 

DeanP

Share this post


Link to post
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" )

1 person likes this

Share this post


Link to post
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

 

Share this post


Link to post
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

 

 

 

 

Share this post


Link to post
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

Share this post


Link to post
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

 

 

 

 

Share this post


Link to post
Share on other sites

Hi Matt,

I am not sure if I am set as administrator. How do I get to the control screen you are showing me?

 

Thanks,

 

DeanP

Share this post


Link to post
Share on other sites

#10 ·  Posted

Hi Matt,

 

Here are the screen shots I mentioned.

 

 

2016-10-21 17_50_20-C__Users_Julie_Desktop_New folder (3)_3spacesensorrev1million.au3 - SciTE [3 of .png2016-10-21 17_50_20-C__Users_Julie_Desktop_New folder (3)_3spacesensorrev1million.au3 - SciTE [3 of .png

2016-10-21 17_49_50-Windows Task Manager.png

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

take a look at this

compile as admin.docx

Then after you compile the script, launch the executable that is created and see if that works.

Edited by MattHiggs

Share this post


Link to post
Share on other sites

#12 ·  Posted

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

 

 

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#14 ·  Posted

Hi Matt,

 

I am going to the folder where the file is and double clicking on it.

 

Share this post


Link to post
Share on other sites

#15 ·  Posted

When you launch the application without using the script, does it launch successfully?

Share this post


Link to post
Share on other sites

#16 ·  Posted

Hi Matt,

 

I am going to the folder where the file is and double clicking on it.

 

Also the program runs fine if I just open it with a mouse click on the shortcut or the executable in program folder

 

Share this post


Link to post
Share on other sites

#17 ·  Posted

Right click the shortcut on your desktop and select "properties".  Is the content in the "target" input the same as what you have in your script?

Share this post


Link to post
Share on other sites

#18 ·  Posted

Hi Matt,

 

I am going to the folder where the file is and double clicking on it.

 

Also the program runs fine if I just open it with a mouse click on the shortcut or the executable in program folder

 

Share this post


Link to post
Share on other sites

#19 ·  Posted

Hi Matt,

 

Yes the path is correct, as copied from properties. "C:\Program Files\3SpaceSensor\3SpaceSuite.exe"

Share this post


Link to post
Share on other sites

#20 ·  Posted

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.

 

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