Jump to content

Recommended Posts

Posted

Hello, I'm new in autoit and i learn new functions everyday. Today i wanted to make 2 loops working at the same time but i have no idea how to make it. It should be working like:

- every 10 sec click RMB

- every 4 sec click LMB

Could you help me, please? :)

  • Moderators
Posted

Crafter,

Welcome to the AutoIt forum. :)

For something like this I would suggest using Adlib. But if you can give us some more details as to why you need to do this we might be able to offer more focused help. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted

Hello Melba23. I'm trying to make macro to scan if someone type to me on skype and auto reply on msg but first i need to learn how to make 2 independend loops :) 

I found timer function.

HotKeySet("{PAUSE}", "Terminate")

Dim $nTimer1 = TimerInit()
Dim $nTimer2 = TimerInit(), $nTimer2_diff = Random(8000,11000,1)

While 1
   If TimerDiff($nTimer1) > 120000 Then
      MouseClick("left")
      $nTimer1 = TimerInit()
   EndIf
   
   If TimerDiff($nTimer2) > $nTimer2_diff Then
      Send("{F12}"))
      $nTimer2 = TimerInit()
      $nTimer2_diff = Random(8000,11000,1)
   EndIf
   Sleep(10)
WEnd

Func Terminate()
   Exit 0
EndFunc

Does it look good?

Posted
  On 2/14/2014 at 1:23 PM, Crafter said:

Hello Melba23. I'm trying to make macro to scan if someone type to me on skype and auto reply on msg but first i need to learn how to make 2 independend loops :)

 

That's a really cool idea. I can't work on this at work, but I'll put my mind to this when I get home

Thanks for your time

 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...