Jump to content
AC Tool Forums
Sign in to follow this  
Samir98

Action every X minutes while the script does other things

Recommended Posts

Hi guys, I hope you can help me. I have created a script that repeatedly performs control actions, do you think it is possible to add an action to this script to be performed indiscriminately every 10 minutes?

Message translated with google

Share this post


Link to post
Share on other sites

If this is for a AC Tool script, then I would suggest that you read the AC Tool Help file since you have not done that yet. I would recommend that you read up on Procedure .. End and ProcessMessages.

 

Share this post


Link to post
Share on other sites

We need to see the code to see what you would like help with. We will help, but without any code, it is useless us inputting information on something we cannot see.

Share this post


Link to post
Share on other sites

Hello and thanks for the reply. I've already tried reading the AC tool help file, but couldn't find the one that's right for me.

To explain better I am attaching an example of what I am trying to do:

While 1=1
 
     IsWhite  500, 500
          // Do these commands if true
          Call test
    Else
          // Do these commands if false 
    End


     Call Alpha
End

Procedure Alpha every 10 Min
    keys a
End

In this case I tried to create a script that constantly checked that at specific coordinates there is the white color and only every 10 minutes must the "a" key be pressed. With this code I get a constant spam of "a" and that's not what I'm trying to do.

I hope I explained myself better, thanks again for your help. (Message translated with google)

Edited by Samir98

Share this post


Link to post
Share on other sites

While 1 = 1
  ProcessMessages
  delay 10 min
End

 

There's a hint.

Share this post


Link to post
Share on other sites

Hi, I have studied the operation of the ProcessMessages command better and I have solved my problems. Thanks everyone for the help.

Share this post


Link to post
Share on other sites

Well, I do seem to remember stating in my previous post. That I recommend that you read up on Procedure .. End and ProcessMessages. I guess that you had not could that.

It is good that you did eventually read up on it, after ego had given you a snipped of code, and had gotten you script to work properly.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and to our Privacy Policy.