Jump to content

Recommended Posts

Posted (edited)

I have many very short scripts which will be called in Autohotkey script once in a while.

To increase the efficiency, I want to keep an instance of autoit.exe always in memory, and then when running an autoit script, I want to use this instance to run the autoit script, other than starting up another new instance of autoit.exe. In this way, the time of loading autoit.exe to run my script is saved--when the script is short, this part of time is significant compared to the total runtime of the script.

Is there a way to implement what I want? Thank you very much!

Edited by steadycookie
Posted

Thanks for help!

Your method is feasible. However, is there a way I want (keep autoit.exe in memory to run different scripts)?

Best way would be to make one script with your stuff and your hotkeys and just keep that running.

Posted (edited)

OK. Thanks! My requirements seem easy, but they turn out to be impossible.

I wonder what would happen if you wrapped it in one of those "run any exe as a service" utilities?

Also if you had a script that just idled in the tray, wouldn't the OS just duplicate the exe image already in ram to feed to the new script? (I don't know the answers,.. I'm just asking... not rhetorically) :)

Edited by MilesAhead
Posted

run a script like this

while 1

slepp(1000)

wend

only that in the background with no end...

that way the it will sleightly be in memory and hardly take up processor :)

i thnink thats what you mean ?

Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D

Posted (edited)

... wouldn't the OS just duplicate the exe image already in ram to feed to the new script? ...

Each new instance comes from the drive - at least in XP.

Edit: I've been hunting for the reference where I read this on a MS site, but cannot locate it - so for now, file this under "my guess".

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Posted

run a script like this

while 1

sleep(1000)

wend

only that in the background with no end...

that way the it will sleightly be in memory and hardly take up processor :)

i thnink thats what you mean ?

Each new script loads a new instance of AutoIt, so keeping this code running would just increase the odds that the OS has pushed another copy of AutoIt from RAM.

[size="1"][font="Arial"].[u].[/u][/font][/size]

Posted

fair enuth :)

Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D

Posted (edited)

Steadycookie, I believe what you really want is speed, right?

You want the script to be loaded in the memory and so when the script is called it would be faster than called on normal harddisk.

Maybe you can use RAM Drive to create a drive space taken from your RAM. It is many times faster than normal harddisk, but it cannot store data on restart.

I don't know how significant the usage of RAM Drive on the script as the script is relatively very small in size.

Edited by MDCT

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
×
×
  • Create New...