Pulover's Macro Creator v5.0.5 - The Complete Automation Tool

Post your working scripts, libraries and tools
Bugs
Posts: 3
Joined: 21 Jan 2014, 12:26

Re: Macro Creator v4.1.1 - Automation Tool (Recorder & Write

17 Feb 2014, 12:54

I understand that there may be to many situations to cover.

These Example files should be helpful to me and anyone else. I would urge you to make a link from your tutorial page.

What is the best way to link or reference the a ahk file and pmc file ? Do recommend a certain file naming convention ?
Any suggestions would be appreciated.
User avatar
Pulover
Posts: 365
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Macro Creator v4.1.1 - Automation Tool (Recorder & Write

19 Feb 2014, 07:02

Bugs wrote:I understand that there may be to many situations to cover.

These Example files should be helpful to me and anyone else. I would urge you to make a link from your tutorial page.

I'll put a direct link in the tutorial page. Thanks for the suggestion!

Bugs wrote:What is the best way to link or reference the a ahk file and pmc file ? Do recommend a certain file naming convention ?
Any suggestions would be appreciated.

Not sure what you mean, there isn't any convention for naming ahk files AFAIK. You might just use the one you find best.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
m00c0w
Posts: 5
Joined: 21 Feb 2014, 08:01

Re: Macro Creator v4.1.1 - Automation Tool (Recorder & Write

21 Feb 2014, 08:07

Hi,
I am trying to do one thing if a pixel is found, and a different thing if the pixel is not found. I have an 'If image/pixel found' and an 'If image/pixel not found' however it only seems to be doing the code that for pixel not found. Could it have something to do with the Pixel searcher settings as I have it so if the pixel is and isn't found, they are both Continue, but I can't find an alternative to this. I know that the pixel is there, but for some reason the Pixel searcher isn't finding it.

Another thought, this Pixel search is inside another pixel search (which is working). Could that affect it?
Thanks.
User avatar
Pulover
Posts: 365
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Macro Creator v4.1.1 - Automation Tool (Recorder & Write

21 Feb 2014, 08:40

m00c0w wrote:Hi,
I am trying to do one thing if a pixel is found, and a different thing if the pixel is not found. I have an 'If image/pixel found' and an 'If image/pixel not found' however it only seems to be doing the code that for pixel not found. Could it have something to do with the Pixel searcher settings as I have it so if the pixel is and isn't found, they are both Continue, but I can't find an alternative to this. I know that the pixel is there, but for some reason the Pixel searcher isn't finding it.

Another thought, this Pixel search is inside another pixel search (which is working). Could that affect it?
Thanks.

I won't know what is wrong if I can't see what you are doing... Post the pmc code here so I can see if it's correct.
Open the pmc file with notepad, copy the text and paste here inside code block, like this:

Code: [Select all] [Download] GeSHi © Codebox Plus

[code]
Paste pmc code here...
[/code]
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
m00c0w
Posts: 5
Joined: 21 Feb 2014, 08:01

Re: Macro Creator v4.1.1 - Automation Tool (Recorder & Write

21 Feb 2014, 09:33

Sorry, here it is:

Code: [Select all] [Expand] [Download] (Script.ahk)GeSHi © Codebox Plus

User avatar
Pulover
Posts: 365
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Macro Creator v4.1.1 - Automation Tool (Recorder & Write

21 Feb 2014, 12:09

It is wrong indeed. You're putting the check for 'If not found' inside the 'If found', that will never work... You need to put the 'If not found' after the 'End if' or put the action for not found after an Else statement between the 'If found' and 'End if'.

Here's to illustrate:

Code: [Select all] [Expand] [Download] (PixelSearchExample.pmc)GeSHi © Codebox Plus

Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
m00c0w
Posts: 5
Joined: 21 Feb 2014, 08:01

Re: Macro Creator v4.1.1 - Automation Tool (Recorder & Write

21 Feb 2014, 12:25

The 'If not found' is meant to be in the first 'If found' as there are two checks, I just put the code for the 'If not found' before the 'If found' (line 53) for the second check. Unless I am misinterpreting what you meant.
dytanaka
Posts: 10
Joined: 23 Nov 2013, 13:46

Re: Macro Creator v4.1.1 - Automation Tool (Recorder & Write

21 Feb 2014, 20:54

Hey Rudolfo,

I am having a little issue and can't figure it out. I am creating a loop and want to break out when a if statement is true. But for some reason it ignores the break statement. Your thoughts?
The code is below.
Thanks

David


loop.jpg


From Converted Window

Code: [Select all] [Expand] [Download] (Script.ahk)GeSHi © Codebox Plus

Atreus41
Posts: 2
Joined: 26 Feb 2014, 22:43

Re: Macro Creator v4.1.1 - Automation Tool (Recorder & Write

26 Feb 2014, 22:59

Sorry if this has been answered already somewhere. I haven't been able to find the answer by searching myself.

Is there any way you can get the recorder to record mouse button up/down states just like keyboard up/down states? Without this, all click and drag functionality is useless.
User avatar
Pulover
Posts: 365
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Macro Creator v4.1.1 - Automation Tool (Recorder & Write

27 Feb 2014, 06:06

m00c0w wrote:The 'If not found' is meant to be in the first 'If found' as there are two checks, I just put the code for the 'If not found' before the 'If found' (line 53) for the second check. Unless I am misinterpreting what you meant.

Sorry about the late reply...

I think you didn't understand the logic. The if statement will execute all commands after it until it hits its 'EndIf', so if you put the 'If not found' inside the 'If found' block it will never be true. Follow the examples I posted, you just need some adjustments.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
User avatar
Pulover
Posts: 365
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Macro Creator v4.1.1 - Automation Tool (Recorder & Write

27 Feb 2014, 06:08

dytanaka wrote:Hey Rudolfo,

I am having a little issue and can't figure it out. I am creating a loop and want to break out when a if statement is true. But for some reason it ignores the break statement. Your thoughts?
The code is below.
Thanks

David


This might be a bug... can you send me a small version of the macro to test?
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
User avatar
Pulover
Posts: 365
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Macro Creator v4.1.1 - Automation Tool (Recorder & Write

27 Feb 2014, 06:10

Atreus41 wrote:Sorry if this has been answered already somewhere. I haven't been able to find the answer by searching myself.

Is there any way you can get the recorder to record mouse button up/down states just like keyboard up/down states? Without this, all click and drag functionality is useless.

The recorder always records mouse clicks as down and up. Why do you think it doesn't? o.O ...Why would I make an useless recorder anyway?
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Atreus41
Posts: 2
Joined: 26 Feb 2014, 22:43

Re: Macro Creator v4.1.1 - Automation Tool (Recorder & Write

27 Feb 2014, 07:37

Pulover wrote:
Atreus41 wrote:Sorry if this has been answered already somewhere. I haven't been able to find the answer by searching myself.

Is there any way you can get the recorder to record mouse button up/down states just like keyboard up/down states? Without this, all click and drag functionality is useless.

The recorder always records mouse clicks as down and up. Why do you think it doesn't? o.O ...Why would I make an useless recorder anyway?


I figured that you wouldn't make a recorder without that functionality. For some reason, every time I've tried using it, click and drag has failed, so it seemed to me that it wasn't recording mouse up/down states. I will try it again now that I know it's supposed to work.
User avatar
Pulover
Posts: 365
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Macro Creator v4.1.1 - Automation Tool (Recorder & Write

27 Feb 2014, 07:45

Atreus41 wrote:
Pulover wrote:
Atreus41 wrote:Sorry if this has been answered already somewhere. I haven't been able to find the answer by searching myself.

Is there any way you can get the recorder to record mouse button up/down states just like keyboard up/down states? Without this, all click and drag functionality is useless.

The recorder always records mouse clicks as down and up. Why do you think it doesn't? o.O ...Why would I make an useless recorder anyway?


I figured that you wouldn't make a recorder without that functionality. For some reason, every time I've tried using it, click and drag has failed, so it seemed to me that it wasn't recording mouse up/down states. I will try it again now that I know it's supposed to work.

Ok. If it doesn't work for you send me some details about your system so I can try to simulate here. Thanks.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
m00c0w
Posts: 5
Joined: 21 Feb 2014, 08:01

Re: Macro Creator v4.1.1 - Automation Tool (Recorder & Write

27 Feb 2014, 12:53

Pulover wrote:
m00c0w wrote:The 'If not found' is meant to be in the first 'If found' as there are two checks, I just put the code for the 'If not found' before the 'If found' (line 53) for the second check. Unless I am misinterpreting what you meant.

Sorry about the late reply...

I think you didn't understand the logic. The if statement will execute all commands after it until it hits its 'EndIf', so if you put the 'If not found' inside the 'If found' block it will never be true. Follow the examples I posted, you just need some adjustments.

So are you saying that you can't have an pixel search inside a pixel search? What I am trying to do is something like this:
1. If I press 1, there is a chance the screen will go black.
2. If the screen does go black, there is then a chance that the screen will either go red, or some other colour.
3. If the screen goes red after going black, I want to do something (called x)
4. If the screen goes some other colour after going black, I want to do 'y'
5. If the screen does not go black, I want to repeat the entire thing.

I don't see the adjustments I would have to make. The second colour checks are within the first colour check (which they are meant to, both the 'if' and 'if not'). Which 'If not found' is inside the wrong 'if found' block? Sorry if I'm just being stupid.

On a side note, I don't seem to be able to type a 0 when the macro creator is open, unless I use the 0 on the numpad.
User avatar
Pulover
Posts: 365
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Macro Creator v4.1.1 - Automation Tool (Recorder & Write

27 Feb 2014, 14:59

m00c0w wrote:So are you saying that you can't have an pixel search inside a pixel search? What I am trying to do is something like this:

Shame on me... I was the one misunderstanding the code :oops: Sorry about that, I guess all work and no play makes jack a dull boy.

You're not wrong to put an if statement for pixel search inside one of image search, but you're missing part of the logic. If you check the output script window you'll see that it uses the same variable to check image and pixel results (ErrorLevel) and this is why I have only one statement for both. When the first image search returns true, it will search the pixel, but if the pixel returns false when the next if statement is reached, which is if image not found, it will be evaluated as true. This is why you need an 'Else statement' to take care of the "conflict".

Try it like this:

Code: [Select all] [Expand] [Download] (search.pmc)GeSHi © Codebox Plus


m00c0w wrote:On a side note, I don't seem to be able to type a 0 when the macro creator is open, unless I use the 0 on the numpad.

You've probably upgraded from version 3. Go to menu View > Hotkeys and check all of them. Pause hotkey is probably set to 0.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
m00c0w
Posts: 5
Joined: 21 Feb 2014, 08:01

Re: Macro Creator v4.1.1 - Automation Tool (Recorder & Write

01 Mar 2014, 17:23

The problem still seems to be occuring. Is it possible to force the second image check to use a different variable?

Thanks for your help! The pause hotkey was set to 0 as you suspected.
User avatar
Pulover
Posts: 365
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Macro Creator v4.1.1 - Automation Tool (Recorder & Write

01 Mar 2014, 19:34

m00c0w wrote:The problem still seems to be occuring. Is it possible to force the second image check to use a different variable?

No, it's not... and wouldn't help you I think. I've tested here and the else statement works ok... test each statement separately and if you really find a bug, post a short version for me to test, please.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
click-click
Posts: 14
Joined: 18 Oct 2013, 06:35

Re: Macro Creator v4.1.1 - Automation Tool (Recorder & Write

07 Mar 2014, 06:09

I am trying to combine 2 macros. I open the first one, then import the 2nd one. Select all on the 2nd macro and use copy to macro1. The problem
is that none of the comments are being copied over. Is this the right way to combine macros?
User avatar
Pulover
Posts: 365
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Macro Creator v4.1.1 - Automation Tool (Recorder & Write

07 Mar 2014, 06:18

click-click wrote:I am trying to combine 2 macros. I open the first one, then import the 2nd one. Select all on the 2nd macro and use copy to macro1. The problem
is that none of the comments are being copied over. Is this the right way to combine macros?

Congratulations! You've found another bug! :lol:

Thanks for reporting, bro. I'll put it in the todo list. Meanwhile you can use copy and paste as it's based on my LV_Rows class and there's no way it won't copy a column.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 24 guests