Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Thu Nov 21, 2024 3:25 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: run only when active window?
Thanked: 0 time(s)  Unread post Posted: Tue Apr 19, 2016 4:44 am 
New User
New User



Joined: Tue Mar 29, 2016 10:30 pm
Posts: 12
Been thanked: 0 time(s)
Has thanked: 0 time(s)
Contribution Points: 28
any idea how to run the only macro on active window ??
and it will ignore if not in active window?
example sometimes i rest a bit after playing my favorite game. like browsing the internet,music, editing..
sometimes i accidentally hit my right click mouse while browsing in the internet and the whole macro is triggered lol.


if Mouse.Button is pressed("right")
begin
Keyboard.Hold keys("r")
Macro.Pause("50")
Keyboard.Release keys("r")
Keyboard.Hold keys("t")
Macro.Pause("50")
Keyboard.Release keys("t")
Keyboard.Hold keys("2")
Macro.Pause("53")
Keyboard.Release keys("2")
end
Macro.Restart("Yes")
end


Top
 Profile  
Reply with quote  
 Post subject: Re: run only when active window?
Thanked: 0 time(s)  Unread post Posted: Tue Apr 19, 2016 12:15 pm 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 2259
Location: USA
Been thanked: 535 time(s)
Has thanked: 38 time(s)
Contribution Points: 17741
You could use this: viewtopic.php?f=172&t=609 to always have your game as the active window or you can set triggers to start/stop your macro. That way if you accidentally click on a different window, you can hit your "stop" trigger, click on your game, and hit the "start" trigger to restart it.

There's other more complicated ways to do it. You can script BEM to get the active window name, if the active window matches your game (the intended macro destination), then begin macro (if not, do nothing until the game becomes the active window).

_________________
----------------------------------------Syrifina---------------------------------------------------
PM me for licenses and/or licensing information: Click Here
[Be sure to include and update your profile with your BE ID]

Forum Rules
Reminder of rules regarding Contribution points
Getting started in 1, 2, 3
Virtual Drivers; Manual Installers


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group