Executing a macro in the background?
Moderators: JRL, Dorian (MJT support)
Executing a macro in the background?
Hi, is there any way to exec my macro and have it working in the background so I can still use my mouse and keyboard? or is that pushing it too far?
It would be nice to use my mouse and keyboard still while a macro is working on an app in the background hehe
I have another question while I'm here....
I'm having a slight issue with something that probably has an easy fix.
I'm using WaitPixelColor, but the issue I'm running into is I need this command to recognize TWO colors on the same coordinate! Either one or the other I want to be recognized.
So I'm looking for a command that allows "this color code OR that color code". I need an 'either-or' action to be taken on this.
Look below to see what I mean.
WaitPixelColor>9479616,515,255,1
WaitPixelColor>10927853,515,255,1
As you can see, the coords are exactly the same on these two lines. However, the color code is different because it will depend on the application I'm using if either color code will appear ,and it's random.
So how do I incorporate these two color codes together? I need the macro to recognize either one or the other.
I tried this....
WaitPixelColor>9479616; 10927853,515,255,1 (this did not work)
WaitPixelColor>9479616-10927853,515,255,1 (this did not work)
WaitPixelColor>9479616/10927853,515,255,1 (this did not work)
WaitPixelColor>(9479616;10927853),515,255,1 (this did not work)
I can easily get the macro to recognize one color, but the application i'm working on has 2 different color codes at those coords and it's random whic one appears, yet I need to recognize either 1 or the other.
Thanks in advance!
It would be nice to use my mouse and keyboard still while a macro is working on an app in the background hehe
I have another question while I'm here....
I'm having a slight issue with something that probably has an easy fix.
I'm using WaitPixelColor, but the issue I'm running into is I need this command to recognize TWO colors on the same coordinate! Either one or the other I want to be recognized.
So I'm looking for a command that allows "this color code OR that color code". I need an 'either-or' action to be taken on this.
Look below to see what I mean.
WaitPixelColor>9479616,515,255,1
WaitPixelColor>10927853,515,255,1
As you can see, the coords are exactly the same on these two lines. However, the color code is different because it will depend on the application I'm using if either color code will appear ,and it's random.
So how do I incorporate these two color codes together? I need the macro to recognize either one or the other.
I tried this....
WaitPixelColor>9479616; 10927853,515,255,1 (this did not work)
WaitPixelColor>9479616-10927853,515,255,1 (this did not work)
WaitPixelColor>9479616/10927853,515,255,1 (this did not work)
WaitPixelColor>(9479616;10927853),515,255,1 (this did not work)
I can easily get the macro to recognize one color, but the application i'm working on has 2 different color codes at those coords and it's random whic one appears, yet I need to recognize either 1 or the other.
Thanks in advance!
It depends, a window has to be visible (Or at least the X,Y coordinates) for Macro Scheduler to detect the pixel color...the same goes for the image recognition commands. If you can't see the color then Macro Scheduler can't see it either. Makes sense?
I have written numerous scripts that run in the background but none of them use any Pixel or image recognitions commands.
I have written numerous scripts that run in the background but none of them use any Pixel or image recognitions commands.
Oh yeah, I understand about the image recognition and GetPixel and how they need to be visible for the script to execute properly. However, speaking of scripts in general, how can you get them to run without tying up your mouse and keyboard?Rain wrote:It depends, a window has to be visible (Or at least the X,Y coordinates) for Macro Scheduler to detect the pixel color...the same goes for the image recognition commands. If you can't see the color then Macro Scheduler can't see it either. Makes sense?
I have written numerous scripts that run in the background but none of them use any Pixel or image recognitions commands.
Is there a simple command I need to use in my scripts? I'm new to this, so I was hoping it was something simple but I'm willing to study up a bit on it.
Thanks a lot for your help

I really do appreciate it, including the reply in my other topic.
- CyberCitizen
- Automation Wizard
- Posts: 724
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia
I'm trying to do even the most basic of things. Something that involves a lot of mouse movement and mouse clicks. I'm just wondering if Macro Scheduler can execute these by a method or process that doesn't involve tying up your mouse and keyboard.CyberCitizen wrote:Really depends on what you want to do. Macro Scheduler emulates the user. Somethings can be run as a background task but if your doing things like mouse clicks. Then not normally. What are you trying to do / automate?
I want an effect much like autoit by doing even the most basic things, not having to tie up my mouse or keyboard. However, I guess that's asking for too much from a macro program but Macro Scheduler is SO good for a macro that it almost has me believing that it can pull off miracles as if it wasn't a macro lol
I apologize to everyone for asking such a silly question =]
You can have MS execute seemingly invisible mouse moves and clicks by getting the cursor position before executing the mouse move and click and then returning the mouse to its original position.
Like so:
Like so:
Code: Select all
GetCursorPos>XPos,YPos
MouseMove>500,500
LClick
MouseMove>XPos,YPos
-
- Macro Veteran
- Posts: 267
- Joined: Mon Sep 27, 2010 8:57 pm
- Location: Seattle, WA
For your 2 colors, can you use a loop?
(syntax may not be quite correct - I am free handing this and can't test it right now)
(syntax may not be quite correct - I am free handing this and can't test it right now)
Code: Select all
Let>ColorFound=False
Let>cnt=0
While>(ColorFound=False)and(cnt LESSTHANSYMBOL 100)
WaitPixelColor>9479616,515,255,1
Let>ColorFound=WPC_RESULT
If>ColorFound=False
WaitPixelColor>10927853,515,255,1
Let>ColorFound=WPC_RESULT
Endif
Let>cnt=cnt+1
Endwhile
@ Jerry Thomas
Good suggestion. But if I may suggest, if you're going to use a loop then waitpixelcolor is not needed. Why not just use GetPixelColor?
Also, you could have this macro call the macro that needs to execute based on the color.
PepsiHog
Good suggestion. But if I may suggest, if you're going to use a loop then waitpixelcolor is not needed. Why not just use GetPixelColor?
Code: Select all
Let>ColorFound=0
Let>cnt=0
While>(ColorFound=0)and(cnt<100)
GetPixelColor>515,255,ColorFound
If>{(%ColorFound%=9479616)or(%ColorFound%=10927853)}
// Do Something.........
Endif
Let>cnt=cnt+1
Endwhile
PepsiHog
Windows 7
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!
PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)
The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!