Accessing .au3 file from .au3 file
How can I access a .au3 file in "My Documents/Downloads" folder from another .au3 file?
I know how to access the file from the desktop from this code:
Run(@AutoItExe & ' "' & @ScriptD开发者_运维百科ir & '\file2.au3"')
But I can't access it in "My Document/Downloads" folder. Basically I want to recursively call the same .au3 file again and again.
Just as an alternative, the way to run a program in the folder you want is:
Run(@AutoItExe & ' "' & @MyDocumentsDir & '\Downloads\file2.au3"')
Furthermore, if you want a method like the other one then you could use #include inside the loop.
Calling an au3 file from in another au3 file seems to be a little redundant. Couldn't you just copy the code you need from the au3 file into your same file and then put it in a loop? For example, the following ode would run the code 10 times.
For $i = 1 to 10
;Code from file2.au3
MsgBox(0,"", $i)
Next
MsgBox(0,"", "Done!")
精彩评论