Blue Eye Macro
http://blueeye-macro.com/

Help Request
http://blueeye-macro.com/viewtopic.php?f=42&t=34919
Page 1 of 1

Author:  Sans [ Wed Oct 02, 2019 11:44 am ]
Post subject:  Help Request

So, I've been trying for quite few days now and I seem not to succed.

I need a macro that basically presses one key repeatedly but every two minutes it has to press another key:

Press 1 on loop
Then every two minutes press 2

I thought something like:
Press one and pause for 120 seconds
then
while the "pause" is going on, press 1

Is it possible? I might have explained like a donkey but this is all new to me :D

Author:  Syrifina [ Wed Oct 02, 2019 11:21 pm ]
Post subject:  Re: Help Request

If you're trying to time something, you can use a stopwatch. Here's one way to do it that you can test by opening Notepad after you hit "run":
Code:
 begin
     Macro.Start stopwatch("2min")
     Keyboard.Press key("a")
     Macro.Pause("100")
     Macro.Read stopwatch("2min", "x")
     if  Variable.Is greater than (Math)("x", "1190")
          begin
               Keyboard.Press key("b")
               Macro.Reset stopwatch("2min")
          end
 end
 
So it starts a stopwatch named "2min"
it presses the "a" key and then pauses for 100ms
- I did this to test it because I didn't want it repeating at lightspeed
- so you could use this pause to establish how fast you want it to push your first key
then it reads the stopwatch to see how much time has elapsed
2 minutes would be 120000 ms; for testing I used a shorter time
- also I would put it for greater than 119k or 119999 ms if you need it more exact and not over 2 minutes
If it's over 2min (or whatever time you input) then it presses the "b" key and resets the stopwatch back to zero to start again for the next cycle

Hope that helps

*note: Oh yea, you need to put the macro on "infinite" loops or it will just run once; checkmark on left side when creating macro

Author:  GTomi001 [ Mon Feb 10, 2020 4:32 pm ]
Post subject:  Re: Help Request

Syrifina wrote:
If you're trying to time something, you can use a stopwatch. Here's one way to do it that you can test by opening Notepad after you hit "run":
Code:
 begin
     Macro.Start stopwatch("2min")
     Keyboard.Press key("a")
     Macro.Pause("100")
     Macro.Read stopwatch("2min", "x")
     if  Variable.Is greater than (Math)("x", "1190")
          begin
               Keyboard.Press key("b")
               Macro.Reset stopwatch("2min")
          end
 end
 
So it starts a stopwatch named "2min"
it presses the "a" key and then pauses for 100ms
- I did this to test it because I didn't want it repeating at lightspeed
- so you could use this pause to establish how fast you want it to push your first key
then it reads the stopwatch to see how much time has elapsed
2 minutes would be 120000 ms; for testing I used a shorter time
- also I would put it for greater than 119k or 119999 ms if you need it more exact and not over 2 minutes
If it's over 2min (or whatever time you input) then it presses the "b" key and resets the stopwatch back to zero to start again for the next cycle

Hope that helps

*note: Oh yea, you need to put the macro on "infinite" loops or it will just run once; checkmark on left side when creating macro

I like it

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/