deanP Posted October 21, 2016 Share Posted October 21, 2016 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 More sharing options...
l3ill Posted October 21, 2016 Share Posted October 21, 2016 Hi DeanP, And welcome.. Give ShellExcecute a try... Bill deanP 1 My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example Link to comment Share on other sites More sharing options...
deanP Posted October 21, 2016 Author Share Posted October 21, 2016 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 Link to comment Share on other sites More sharing options...
MattHiggs Posted October 21, 2016 Share Posted October 21, 2016 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" ) deanP 1 Link to comment Share on other sites More sharing options...
deanP Posted October 21, 2016 Author Share Posted October 21, 2016 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 More sharing options...
deanP Posted October 21, 2016 Author Share Posted October 21, 2016 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 More sharing options...
MattHiggs Posted October 21, 2016 Share Posted October 21, 2016 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. Link to comment Share on other sites More sharing options...
deanP Posted October 21, 2016 Author Share Posted October 21, 2016 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 More sharing options...
deanP Posted October 21, 2016 Author Share Posted October 21, 2016 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 Link to comment Share on other sites More sharing options...
deanP Posted October 21, 2016 Author Share Posted October 21, 2016 Hi Matt, Here are the screen shots I mentioned. Link to comment Share on other sites More sharing options...
MattHiggs Posted October 21, 2016 Share Posted October 21, 2016 (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 October 21, 2016 by MattHiggs Link to comment Share on other sites More sharing options...
deanP Posted October 21, 2016 Author Share Posted October 21, 2016 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 More sharing options...
MattHiggs Posted October 21, 2016 Share Posted October 21, 2016 (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 October 21, 2016 by MattHiggs Link to comment Share on other sites More sharing options...
deanP Posted October 21, 2016 Author Share Posted October 21, 2016 Hi Matt, I am going to the folder where the file is and double clicking on it. Link to comment Share on other sites More sharing options...
MattHiggs Posted October 21, 2016 Share Posted October 21, 2016 When you launch the application without using the script, does it launch successfully? Link to comment Share on other sites More sharing options...
deanP Posted October 21, 2016 Author Share Posted October 21, 2016 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 Link to comment Share on other sites More sharing options...
MattHiggs Posted October 21, 2016 Share Posted October 21, 2016 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? Link to comment Share on other sites More sharing options...
deanP Posted October 21, 2016 Author Share Posted October 21, 2016 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 Link to comment Share on other sites More sharing options...
deanP Posted October 21, 2016 Author Share Posted October 21, 2016 Hi Matt, Yes the path is correct, as copied from properties. "C:\Program Files\3SpaceSensor\3SpaceSuite.exe" Link to comment Share on other sites More sharing options...
deanP Posted October 21, 2016 Author Share Posted October 21, 2016 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 More sharing options...
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