Jump to content

Recommended Posts

Posted

Hai all..

Im nubie here, just want to learning autoit.

Hmmm, i want to ask how i can running 2 function in a parrarel (same time)

its look like,

While 1

func1()

func2()

wend

How its works:

- Func1 is some code like macro(looping).

- func2 is while func1 running no matter what, every 10minutes it will refresh the page (browser) and after the browser refreshed Func will running again

- Loop every process above

===============================

Can anyone give me example?

Thx alot

Posted (edited)

I couldn't figure out callback function syntax again real quick.

Will this help you? You can add your macro processing to the "while 1" loop.

main()
func main()
   func1()
EndFunc;main

func func1()
   local $time= TimerInit()
   while 1
      if TimerDiff($time)>= 10*60*1000 then;Ten minutes?
         $time= func2()
      endif;timerdiff(time)
      sleep(50);Don't overheat Idk.
   wend;while 1
EndFunc;func1

func func2()
   ;send("{f5}")
   beep()
   return TimerInit()
EndFunc;func2
Edited by Xandy
  • Moderators
Posted (edited)

HaNdLoRdz,

Use an Adlib function to refresh the page. :)

And please give your threads sensible titles - everyone here is looking for help. ;)

M23

Edit: I almost forgot - © water for the above!

Edited by Melba23

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
  On 7/16/2014 at 6:10 AM, Melba23 said:

And please give your threads sensible titles - everyone her is looking for help. ;)

That's what I just wanted to post ;)

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted (edited)

Like this maybe?

AdlibRegister(func2, 600000) ;600000ms=600s=10min

while 1
    Call('func1')
    sleep(50)
wend

func func1()
      sleep(50)
EndFunc;func1

func func2()
   beep()
EndFunc;func2
Edited by careca
  Reveal hidden contents

IUIAutomation - Topic with framework and examples

Au3Record.exe

  • Moderators
Posted

careca,

Exactly what I meant. Although why are you using Call? :huh:

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

Because, seems more refined than just "func1()"

  Reveal hidden contents

IUIAutomation - Topic with framework and examples

Au3Record.exe

  • Moderators
Posted

careca,

Well, it is not. ;)

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

 

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...