NEWBIE ??? How do I run functions after certain times...
Moderator: Pulover
NEWBIE ??? How do I run functions after certain times...
Hey there!
I just started using PMC and I have NO experience with any type of coding. This tool is REALLY nice and I'm looking forward to learning more and more!
I am creating a macro for a game in bluestacks. I want to "farm" items in the 1st macro and then have different functions run and repeat during that time.
For example:
I have a space ship set to attack any hostile that comes near me and this is looping continuously. I have functions like help alliance members and collect random gifts that I want to run every 2 - 10 minutes depending on the function. How would I structure this in the main macro for PMC?
Also, I have functions that scroll the screen left, right, up and down. How do I call these functions to run randomly? Using the scenario above; I have my space ship attack a hostile and scan for another. If it doesn't find one I have it call the specific direction function to scroll the screen to find another hostile. How can I make that call to a specific driection do a random direction in PMC?
Again, please remember that I'm SERIOUSLY new to this and so please keep it simple.
Thanks in advance for your help!!!
-Hanszilla
I just started using PMC and I have NO experience with any type of coding. This tool is REALLY nice and I'm looking forward to learning more and more!
I am creating a macro for a game in bluestacks. I want to "farm" items in the 1st macro and then have different functions run and repeat during that time.
For example:
I have a space ship set to attack any hostile that comes near me and this is looping continuously. I have functions like help alliance members and collect random gifts that I want to run every 2 - 10 minutes depending on the function. How would I structure this in the main macro for PMC?
Also, I have functions that scroll the screen left, right, up and down. How do I call these functions to run randomly? Using the scenario above; I have my space ship attack a hostile and scan for another. If it doesn't find one I have it call the specific direction function to scroll the screen to find another hostile. How can I make that call to a specific driection do a random direction in PMC?
Again, please remember that I'm SERIOUSLY new to this and so please keep it simple.
Thanks in advance for your help!!!
-Hanszilla
Re: NEWBIE ??? How do I run functions after certain times...
- Commands -> Run / File / String / Misc. -> Random
- Commands > Set timer

Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Re: NEWBIE ??? How do I run functions after certain times...
THANK YOU! The timer control works perfectly! I can't wait to incorporate it! I am still very confused on the variables though. I read through the link you posted and it made me dizzy. Would it be possible for you to give me an example of the syntax I would use or how to set up the direction functions as variables? Below is a brief sample of my macro to scan for a hostile. Right now it scans and if it doesn't find the image/pixel it goes through ALL the directions. I would like it to randomly go in one direction and then scan for a hostile.
Re: NEWBIE ??? How do I run functions after certain times...
Why don't you show us what you've done and we'll help you get what you want?
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Re: NEWBIE ??? How do I run functions after certain times...
Here's the code I have so far for the ship attack portion... I have created move screen functions and other macros. So what I want to do is have lines 9-12 be random if a ship isn't found. If a ship isn't found first, it will move randomly in one direction, scan the screen for a hostile and attack if it's found. If it's not found it goes to another random direction and on an and...
Thank you SO much for the help! I really appreciate it!
Thank you SO much for the help! I really appreciate it!
Re: NEWBIE ??? How do I run functions after certain times...
Use the Random command to create the variables and put them in the coordinates enclosed in percent signs.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Re: NEWBIE ??? How do I run functions after certain times...
@pulover Can you give me an example please?
Re: NEWBIE ??? How do I run functions after certain times...
The link I gave you has an example using Random and Click right off in the introduction.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Re: NEWBIE ??? How do I run functions after certain times...
What is this screenshot of? A custom gui you made? Or is it a macro viewer?Hanszi11a wrote: ↑16 Nov 2020, 10:33Here's the code I have so far for the ship attack portion... I have created move screen functions and other macros. So what I want to do is have lines 9-12 be random if a ship isn't found. If a ship isn't found first, it will move randomly in one direction, scan the screen for a hostile and attack if it's found. If it's not found it goes to another random direction and on an and...
Thank you SO much for the help! I really appreciate it!
image.png
EDIT: Pulover macro creator. Pretty neat. Thanks for the image which sparked my interest.
Re: NEWBIE ??? How do I run functions after certain times...
The screen capture is from Pulover's Macro creator. It's pretty awesome, although I am still wrestling with how to make random directions. Other than my own lack of knowledge in coding it's pretty great! 
