Jump to content

struggle to get the very first step: the Run() function


Go to solution Solved by Musashi,

Recommended Posts

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

  • Developers
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

  • Solution
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 by Musashi
typo

Musashi-C64.png

"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

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

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

  • Developers

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 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

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...