Page 1 of 1

Macro working on selected window

Posted: 08 Aug 2022, 14:09
by wealo
I'm looking for a way to play made macro on selected app ID without interfering with possibility to normally use machine.
So far it is going well , but while using my macro i can't really do anything else meanwhile it is working

Re: Macro working on selected window

Posted: 09 Aug 2022, 09:36
by Ben the Coder
Is your script doing anything very power/RAM/CPU/GPU intensive?

Re: Macro working on selected window

Posted: 09 Aug 2022, 13:32
by wealo
@Ben the Coder
No , it does not really do anything fancy .
It's pretty much simply repeating actions on app that doesn't really use a lot of computing power .
It loops after around 5 mins .

Re: Macro working on selected window

Posted: 09 Aug 2022, 20:02
by Ben the Coder
That's funny.
Try using the following commands at the beginning of your script:

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.  If you have upgraded your version of AHK or are using AHK 2.0 (the beta version), this may be helpful.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.  This will help speed up your script as well as help it take up less system resources.
SetWorkingDir %A_ScriptDir%  ; This will make the script's working dir (where it does all it's processing) in the same area of your script (if you have multiple drives or have many files on your computer, this may help).
Try that.

Re: Macro working on selected window

Posted: 09 Aug 2022, 22:20
by boiler
Ben the Coder wrote:

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.  If you have upgraded your version of AHK or are using AHK 2.0 (the beta version), this may be helpful.
How could this be helpful for v2? It doesn't exist in v2.

Ben the Coder wrote:

Code: Select all

SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.  This will help speed up your script as well as help it take up less system resources.
Basis for the claim of taking up fewer resources?

Ben the Coder wrote:

Code: Select all

SetWorkingDir %A_ScriptDir%  ; This will make the script's working dir (where it does all it's processing) in the same area of your script (if you have multiple drives or have many files on your computer, this may help).
This does not help in this way. After the initial load, the processor accesses RAM when executing a script, not on a drive. If it does access the drive, there's not anything inherently faster about the script's directory.

Re: Macro working on selected window

Posted: 09 Aug 2022, 22:45
by gregster
Sounds like the original poster is asking for ControlSend/ControlClick.
But this is about Pulover's Macro Creator, I have no idea how these commands are implemented there.