Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Create exe; command line run script
#1
I have 2 questions:

1/ How do you build the script into an executable?
2/ How do you run the script from the command line?
#2
1. In Properties select role exeProgram. Optionally change outputPath. Then compile or run.
2. https://www.quickmacros.com/au/help/edit...0line.html
#3
Thanks Gintaras.
Is the compiled files located in "%documents%/Au/Main/.compiled" folder? I saw a lot of numbered files in there but none of them ended with .EXE extension. How could I execute them?
#4
"%documents%/Au/Main/bin", but you can change it in Properties / outputPath.
#5
QM3 creates several files.
ScriptX.dll - contains compiled script code.
ScriptX.exe - unmanaged .NET Core app host program that loads the dll.
Au.dll - automation library.
64\AuCpp.dll and 32\AuCpp.dll - unmanaged dlls used by Au.dll in 64-bit and 32-bit processes.

Currently cannot create single .exe file.
#6
Somehow I don't see the "bin" folder under "/Au/Main" directory. The only folders I've seen under /Au/Main folder are:
.compiled
.temp
files
and files.xml and state.db files.
My current windows OS is Windows Server 2019 Essentials.
#7
What is the first line of the script? Should be like
C# code:
/*/ role exeProgram; outputPath %AFolders.Workspace%\bin; /*/ //.

Let the script show a dialog. Then in Windows Task Manager right click the process and select "Open file location". The process is named like the script.
#8
Thanks Gintaras.
When I put the line you've mentioned as the first line in my script then I could see the "bin" folder now.
I don't know why when I click on the "New Script" button on the menu bar, the new script does not have that line at all.
#9
That line is added by the Properties dialog when in it you select role exeProgram. Also you can change outputPath. OK, Compile, and you have ScriptX.exe in outputPath folder.
#10
Thanks Gintaras, I could set the outputPath like you said and in my script I could see that line was added in.
But that option is not saved at all, I have to set the outputPath every time I create a new script. Is there a way to set it permanently?
#11
Why?
#12
I don't know, somehow it does not remember the new option for outputPath.
When I click "New Script", that option is blank again.
#13
Default outputPath value currently cannot be changed. But do you really want to create exe file for each script? Why not use the default role miniProgram?
#14
Actually I usually use the default role in miniProgram but when I want to create an EXE, I have to manually set the outputPath to the "bin" folder, 'cause it always blank there.


Forum Jump:


Users browsing this thread: 1 Guest(s)