illidan333 Posted August 27, 2021 Share Posted August 27, 2021 I am struggling to even get the very first step done. This should be something really simple. If I code: Run("C:\Windows\System32\notepad.exe") or Run("notepad.exe") it will work. but if i try to run the program i want to run: Run("D:\Program Files (x86)\Sgsc10th\Sgsc10th.exe") it won't work FYI, if i copy the full path D:\Program Files (x86)\Sgsc10th\Sgsc10th.exe into the Windows Explorer, it will run it. Please help. also, is it possible to generate the code based on user input? for example, i run a program, then click on a few buttons, then the autoit code for these actions are generated for me as a starting point of my code (i can then add logics like what to do if a certain pixel is found etc) thanks Link to comment Share on other sites More sharing options...
illidan333 Posted August 27, 2021 Author Share Posted August 27, 2021 nvm, I figured it out I need to add #RequireAdmin because the program i needed to run has to be run as an administrator I found it on google. this is such an important information that is missing in the documentation Link to comment Share on other sites More sharing options...
Developers Jos Posted August 27, 2021 Developers Share Posted August 27, 2021 1 hour ago, illidan333 said: this is such an important information that is missing in the documentation Which part exactly is missing in the documentation ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Solution Musashi Posted August 27, 2021 Solution Share Posted August 27, 2021 (edited) 1 hour ago, illidan333 said: ... also, is it possible to generate the code based on user input? It is possible, but not an easy task (especially for novices). The SciTE-Editor has an (often underestimated) feature -> keyword "Abbreviations". Open https://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3.html and click on -> SciTE4AutoIt3 -> Abbreviation List. There you will find standard abbreviations, which you can extend by self-defined ones. How this is done in detail requires only some research from your side. Example : Open a script in the Scite editor, type ifelse and press the space bar. Edited August 27, 2021 by Musashi typo "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
illidan333 Posted August 27, 2021 Author Share Posted August 27, 2021 9 hours ago, Jos said: Which part exactly is missing in the documentation ? sorry. i was wrong, it is actually in the doc, i just found Link to comment Share on other sites More sharing options...
illidan333 Posted August 27, 2021 Author Share Posted August 27, 2021 9 hours ago, Musashi said: It is possible, but not an easy task (especially for novices). The SciTE-Editor has an (often underestimated) feature -> keyword "Abbreviations". Open https://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3.html and click on -> SciTE4AutoIt3 -> Abbreviation List. There you will find standard abbreviations, which you can extend by self-defined ones. How this is done in detail requires only some research from your side. Example : Open a script in the Scite editor, type ifelse and press the space bar. thanks! i will give it a shot Link to comment Share on other sites More sharing options...
illidan333 Posted August 27, 2021 Author Share Posted August 27, 2021 2 hours ago, illidan333 said: sorry. i was wrong, it is actually in the doc, i just found @Jos the info is in the doc, but i feel it is not so obvious. it is kind of tricky for new autoit users to know what to search for. I would recommend adding https://www.autoitscript.com/autoit3/docs/keywords/RequireAdmin.htm as a reference link in https://www.autoitscript.com/autoit3/docs/functions/Run.htm so that when new coders tries to run a program as an admin, they will have an easier time figuring out the fact that they need to add a #RequireAdmin to their code is it possible for me to contribute to the autoit project? for exmaple, fixing bug or improving the documentation? Link to comment Share on other sites More sharing options...
Developers Jos Posted August 27, 2021 Developers Share Posted August 27, 2021 (edited) There is not just a relation to run() but rather all operations performed by the script itself as it is the script that get the elevated rights. Edited August 27, 2021 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
illidan333 Posted August 27, 2021 Author Share Posted August 27, 2021 1 hour ago, Jos said: There is not just a relation to run() but rather all operations performed by the script itself as it is the script that get the elevated rights. I see. Thanks for the explaination 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