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

Advanced Macro Recorder/Editor.

Moderator: Pulover

hasantr
Posts: 933
Joined: 05 Apr 2016, 14:18
Location: İstanbul

Re: Sürüm Güncelleme: 5.2.9

18 Oct 2020, 15:18

Pulover wrote:
17 Oct 2020, 11:23
higrm wrote:
16 Oct 2020, 16:47
With the last update, I have ran into a problem that I have finally been able to resolve.
There was indeed a bug with the last update. I didn't test the change as I should I made a mistake... really should have went to bad before releasing that update late at night. :lol:

The bug should be fixed now with v5.3.0 but be aware that this is a breaking change. You should now use expression format in the value field, so you should change your code accordingly, e.g. If (GearSelector = r) should become If (GearSelector = "r") to work. Also don't enclose variables in percent signs here.
Wouldn't it be better to use two equals with AHK_L syntax?
If (GearSelector == r)
User avatar
Pulover
Posts: 612
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Sürüm Güncelleme: 5.2.9

18 Oct 2020, 16:48

hasantr wrote:
18 Oct 2020, 15:18
Wouldn't it be better to use two equals with AHK_L syntax?
If (GearSelector == r)
In fact both are AHK syntax. = is equal and == is case-sensitive-equal.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
bluefire
Posts: 35
Joined: 15 Dec 2018, 11:17
Location: Türkiye

Re: Pulover's Macro Creator v5.3.0 - The Complete Automation Tool

22 Oct 2020, 03:43

The following codes in version 5.3.0 do not work properly if block.
Code running in 5.2.8 and earlier versions now pass without any evaluation

Code: Select all

DPManualStart:
WinActivate, DP
Sleep, 333
Input, KEY, L1, , A,B,C,E,F,G,I,i,P,Y,T
If KEY = A
{
    Departman := "A"
}
Else
{
    If KEY = B
    {
        Departman := "B"
    }
    Else
    {
        If KEY = C
        {
            Departman := "C"
        }
        Else
        {
            If KEY = E
            {
                Departman := "E"
            }
            Else
            {
                If KEY = F
                {
                    Departman := "F"
                }
                Else
                {
                    If KEY = G
                    {
                        Departman := "G"
                    }
                    Else
                    {
                        If KEY = I
                        {
                            Departman := "I"
                        }
                        Else
                        {
                            If KEY = i
                            {
                                Departman := "I"
                            }
                            Else
                            {
                                If KEY = P
                                {
                                    Departman := "P"
                                }
                                Else
                                {
                                    If KEY = Y
                                    {
                                        Departman := "Y"
                                    }
                                    Else
                                    {
                                        If KEY = T
                                        {
                                            Departman := "T"
                                        }
                                        Else
                                        {
                                            If KEY != A,B,C,E,F,G,I,Y,P,i,T
                                            {
                                                MsgBox, 48, SELECT DEPARTMAN..!, (A-B-C-E-G-I-P-Y)  SELECT..!
                                                Goto, DPManualStart
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
Send, {Control Down}{o}{Control Up}
Sleep, 100
DepartmanDeployCursor:
If A_CaretX !=
{
    Sleep, 200
    Send, {Tab}
    Sleep, 200
    SendRaw, %Departman%+OFFICE
    Sleep, 200
    Sleep, 300
    Loop
    {
        CoordMode, Pixel, Window
        ImageSearch, FoundX, FoundY, 0, 0, 1920, 1080, D:\Macros\PMC_images\DPAddButon.png
        CenterImgSrchCoords("D:\Macros\PMC_images\DPAddButon.png", FoundX, FoundY)
        If ErrorLevel = 0
        	Click, %FoundX%, %FoundY% Left, 1
        Sleep, 200
    }
    Until ErrorLevel = 0
    Sleep, 300
    Loop
    {
        CoordMode, Pixel, Window
        ImageSearch, FoundX, FoundY, 0, 0, 1920, 1080, D:\Macros\PMC_images\DPWaiting.png
        CenterImgSrchCoords("D:\Macros\PMC_images\DPWaiting.png", FoundX, FoundY)
        Sleep, 200
    }
    Until ErrorLevel = 0
    If ErrorLevel = 0
    {
    }
}
Else
{
    Goto, DepartmanDeployCursor
}
Sleep, 300
Loop
{
    CoordMode, Pixel, Window
    ImageSearch, PersonDeployX, PersonDeployY, 0, 0, 1920, 1080, D:\Macros\PMC_images\DPPersonDeploy.png
    CenterImgSrchCoords("D:\Macros\PMC_images\DPPersonDeploy.png", PersonDeployX, PersonDeployY)
    If ErrorLevel = 0
    	Click, %PersonDeployX%, %PersonDeployY% Left, 1
    Sleep, 300
}
Until ErrorLevel = 0
Sleep, 300
Loop, 2
{
    Click, Rel PersonDeployX, PersonDeployY Left, 1
    Sleep, 100
}
Sleep, 300
PersonDeployCursor:
Sleep, 300
If A_CaretX !=
{
    Sleep, 200
    Send, {Tab 2}
    Sleep, 200
    SendRaw, %Departman%
    Sleep, 200
    Sleep, 500
    Loop
    {
        CoordMode, Pixel, Window
        ImageSearch, FoundX, FoundY, 0, 0, 1920, 1080, D:\Macros\PMC_images\DPAddButon.png
        CenterImgSrchCoords("D:\Macros\PMC_images\DPAddButon.png", FoundX, FoundY)
        If ErrorLevel = 0
        	Click, %FoundX%, %FoundY% Left, 1
        Sleep, 300
    }
    Until ErrorLevel = 0
    Sleep, 300
    Loop
    {
        CoordMode, Pixel, Window
        ImageSearch, FoundX, FoundY, 0, 0, 1920, 1080, D:\Macros\PMC_images\DPPersonWaiting.png
        CenterImgSrchCoords("D:\Macros\PMC_images\DPPersonWaiting.png", FoundX, FoundY)
        Sleep, 200
    }
    Until ErrorLevel = 0
    If ErrorLevel = 0
    {
    }
    Click, %FoundX%, %FoundY% Left, 1
    Sleep, 10
}
Else
{
    Goto, PersonDeployCursor
}
CoordMode, Pixel, Window
ImageSearch, RedX, RedY, 0, 0, 1920, 1080, D:\Macros\PMC_images\DPRedButon.png
CenterImgSrchCoords("D:\Macros\PMC_images\DPRedButon.png", RedX, RedY)
Sleep, 200
If ErrorLevel = 0
{
    RedX += 30
    Click, %RedX%, %RedY% Left, 1
    Sleep, 10
}
Information worth everything....
User avatar
Pulover
Posts: 612
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Pulover's Macro Creator v5.3.0 - The Complete Automation Tool

22 Oct 2020, 05:00

bluefire wrote:
22 Oct 2020, 03:43
The following codes in version 5.3.0 do not work properly if block.
Code running in 5.2.8 and earlier versions now pass without any evaluation
Update your statements to use Expressions format.

https://www.autohotkey.com/boards/viewtopic.php?f=63&t=143&start=1100#p358472
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
bluefire
Posts: 35
Joined: 15 Dec 2018, 11:17
Location: Türkiye

Re: Pulover's Macro Creator v5.3.0 - The Complete Automation Tool

22 Oct 2020, 06:44

Pulover wrote:
22 Oct 2020, 05:00
bluefire wrote:
22 Oct 2020, 03:43
The following codes in version 5.3.0 do not work properly if block.
Code running in 5.2.8 and earlier versions now pass without any evaluation
Update your statements to use Expressions format.

https://www.autohotkey.com/boards/viewtopic.php?f=63&t=143&start=1100#p358472
this was very bad. I will have to change many expressions.
Information worth everything....
User avatar
Pulover
Posts: 612
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Pulover's Macro Creator v5.3.0 - The Complete Automation Tool

22 Oct 2020, 06:57

@bluefire, your whole series of statements could be simplified into one.

Code: Select all

Input, KEY, L1, , A`,B`,C`,E`,F`,G`,I`,i`,P`,Y`,T
If KEY in A,B,C,E,F,G,I,i,P,Y,T
{
    Departman := KEY
}
Else
{
    MsgBox, 16, SELECT DEPARTMAN..!, (A-B-C-E-G-I-P-Y)  SELECT..!
    Return
}
MsgBox, 0, , Departman is %Departman%

Code: Select all

[PMC Code v5.3.0]|F3|F6|1|Window,2,Fast,0,1,Input,-1,-1,1|1|Macro1
Context=None||None|
Groups=Start:1
1|Input|KEY, L1, , A``,B``,C``,E``,F``,G``,I``,i``,P``,Y``,T|1|0|Input|||||1|
2|Compare Variables|KEY in A`,B`,C`,E`,F`,G`,I`,i`,P`,Y`,T|1|0|If_Statement|||||2|
3|[Assign Variable]|Departman := KEY|1|0|Variable|Expression||||4|
4|[Else]|Else|1|0|If_Statement|||||5|
5|[MsgBox]|(A-B-C-E-G-I-P-Y)  SELECT..!|1|0|MsgBox|16|SELECT DEPARTMAN..!|||8|
6|Return||1|0|Return|||||9|
7|[End If]|EndIf|1|0|If_Statement|||||10|
8|[MsgBox]|Departman is %Departman%|1|0|MsgBox|0||||11|

Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
bluefire
Posts: 35
Joined: 15 Dec 2018, 11:17
Location: Türkiye

Re: Pulover's Macro Creator v5.3.0 - The Complete Automation Tool

22 Oct 2020, 07:42

thanks Rodolfo;
I think it will be better to do the code like this. It was a situation I had done a long time ago but was lazy to edit.
Pulover wrote:
22 Oct 2020, 06:57
@bluefire, your whole series of statements could be simplified into one.

Code: Select all

Input, KEY, L1, , A`,B`,C`,E`,F`,G`,I`,i`,P`,Y`,T
If KEY in A,B,C,E,F,G,I,i,P,Y,T
{
    Departman := KEY
}
Else
{
    MsgBox, 16, SELECT DEPARTMAN..!, (A-B-C-E-G-I-P-Y)  SELECT..!
    Return
}
MsgBox, 0, , Departman is %Departman%

Code: Select all

[PMC Code v5.3.0]|F3|F6|1|Window,2,Fast,0,1,Input,-1,-1,1|1|Macro1
Context=None||None|
Groups=Start:1
1|Input|KEY, L1, , A``,B``,C``,E``,F``,G``,I``,i``,P``,Y``,T|1|0|Input|||||1|
2|Compare Variables|KEY in A`,B`,C`,E`,F`,G`,I`,i`,P`,Y`,T|1|0|If_Statement|||||2|
3|[Assign Variable]|Departman := KEY|1|0|Variable|Expression||||4|
4|[Else]|Else|1|0|If_Statement|||||5|
5|[MsgBox]|(A-B-C-E-G-I-P-Y)  SELECT..!|1|0|MsgBox|16|SELECT DEPARTMAN..!|||8|
6|Return||1|0|Return|||||9|
7|[End If]|EndIf|1|0|If_Statement|||||10|
8|[MsgBox]|Departman is %Departman%|1|0|MsgBox|0||||11|

Information worth everything....
bluefire
Posts: 35
Joined: 15 Dec 2018, 11:17
Location: Türkiye

Re: Pulover's Macro Creator v5.2.8 - The Complete Automation Tool

22 Oct 2020, 09:23

no answer on the topic?
bluefire wrote:
14 Oct 2020, 15:20
How can I make a selection in sub menus of TOOLSTRIP1 control?
Information worth everything....
User avatar
Pulover
Posts: 612
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Pulover's Macro Creator v5.2.8 - The Complete Automation Tool

22 Oct 2020, 09:28

bluefire wrote:
22 Oct 2020, 09:23
no answer on the topic?
bluefire wrote:
14 Oct 2020, 15:20
How can I make a selection in sub menus of TOOLSTRIP1 control?
This is not the right place. Post it in the Ask for help forum and add more details to your question.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
hasantr
Posts: 933
Joined: 05 Apr 2016, 14:18
Location: İstanbul

Re: Pulover's Macro Creator v5.3.0 - The Complete Automation Tool

25 Oct 2020, 00:22

Selam Pulover. Aklıma biraz geç geldi bu. Resim arama özelliğini kullanırken resimleri hep aynı yere kaydediyor. Scriptin bulunduğu dizindeki bir "images" klasörü oluşturup otomatik olarak o klasöre kaydetme seçeneği de olabilir mi? And is it possible to automatically delete my pictures whose command is removed from the Pulovers interface?
Thanks for everything.
User avatar
Pulover
Posts: 612
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Pulover's Macro Creator v5.3.0 - The Complete Automation Tool

25 Oct 2020, 04:57

hasantr wrote:
25 Oct 2020, 00:22
Hi Pulover. It came to me a little late. When using the image search feature, it always saves the pictures in the same place. Could there be an option to create an "images" folder in the directory where the script is located and automatically save it to that folder?
You can change the screenshot folder to the folder where you save your files. Or create a script to move the pictures.
hasantr wrote:
25 Oct 2020, 00:22
And is it possible to automatically delete my pictures whose command is removed from the Pulovers interface?
No. You'll have to do that yourself.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
User avatar
Pulover
Posts: 612
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Version Update: 5.3.1

27 Oct 2020, 16:40

Version Update!

Version 5.3.1
  • Added Random coordinates option in Mouse command window.
  • Added Custom icon option for exported EXE in Export window.
  • Fixed bug in Compare variables of If Statements window with built-in variables.
  • Fixed bugs in subtraction operations in expressions.
  • Fixed bug in scoped variables in functions.
  • Fixed ListVars not showing local variables inside functions.
  • Fixed OutputVars of MouseGetPos not showing in ListVars.
Download version 5.3.1
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
bluefire
Posts: 35
Joined: 15 Dec 2018, 11:17
Location: Türkiye

Re: Pulover's Macro Creator v5.2.8 - The Complete Automation Tool

27 Oct 2020, 17:31

Pulover wrote:
22 Oct 2020, 09:28
bluefire wrote:
22 Oct 2020, 09:23
no answer on the topic?
bluefire wrote:
14 Oct 2020, 15:20
How can I make a selection in sub menus of TOOLSTRIP1 control?
This is not the right place. Post it in the Ask for help forum and add more details to your question.

I could not find detailed help content on the topic in the forum.
Information worth everything....
burque505
Posts: 1747
Joined: 22 Jan 2017, 19:37

Re: Pulover's Macro Creator v5.3.1 - The Complete Automation Tool

27 Oct 2020, 17:37

@bluefire: Try the extensive help and tutorials at the Macro Creator website.
Regards,
burque505
User avatar
Pulover
Posts: 612
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Pulover's Macro Creator v5.2.8 - The Complete Automation Tool

27 Oct 2020, 19:14

bluefire wrote:
27 Oct 2020, 17:31
Pulover wrote:
22 Oct 2020, 09:28
bluefire wrote:
22 Oct 2020, 09:23
no answer on the topic?
bluefire wrote:
14 Oct 2020, 15:20
How can I make a selection in sub menus of TOOLSTRIP1 control?
This is not the right place. Post it in the Ask for help forum and add more details to your question.

I could not find detailed help content on the topic in the forum.
You've asked the same question 3 times in this thread, on github and private message. Why do you think I'm gonna change my answer if you keep asking it again and again? I am busy. I cannot help you with that... I told you to POST the question in the Ask for help forum. Did you do that? Stop posting it here, please.

@bluefire
THIS IS NOT A GENERAL ASK FOR HELP FORUM
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
User avatar
Pulover
Posts: 612
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Version Update: 5.3.2

27 Oct 2020, 22:18

Version Update!

Version 5.3.2
  • Fixed bug in Function Return.
Download version 5.3.2
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
mons3fa
Posts: 16
Joined: 20 May 2017, 19:33

Re: Pulover's Macro Creator v5.3.2 - The Complete Automation Tool

29 Oct 2020, 01:30

I believe that functions set to assume global mode are not working properly, when assigning a variable inside a global function to a User Global Variable, it does not assign that value to the variable. When you run ListVars it only assigns the variable to the local variables.

Local Variables for evaluateTrend()
--------------------------------------------------
DailyMaxSet: 1

Global Variables (alphabetical)
--------------------------------------------------
afibdetect: 0
DailyMaxSet: 0
DailyMinSet: 0
ecatST: prelim
operatorInit: MOE

Code: Select all

; Start
evaluateTrend()
{
	global
	If (DailyMaxSet = 0 AND DailyMinSet = 0)
	{
		MsgBox, 262148, Trend Strip, Is this a Maximum Daily?
		IfMsgBox, Yes
		{
			DailyMaxSet := 1
			DailyMaxSet := DailyMaxTrend()
			ListVars
		}
		Else IfMsgBox, No
		{
			MsgBox, 262148, , Is this a Daily Minimum?
			IfMsgBox, Yes
			{
				DailyMinSet := 1
				DailyMinSet := DailyMinTrend()
				ListVars
			}
			Else IfMsgBox, No
			{
				ListVars
				Sleep, 100
				AverageTrend()
			}
		}
	}
	Else If (DailyMaxSet = 1 and DailyMinSet = 0)
	{
		MsgBox, 262148, , Is this a Daily Minimum?
		IfMsgBox, Yes
		{
			DailyMinSet := 1
			DailyMinSet := DailyMinTrend()
			ListVars
		}
	}
	Else If (DailyMaxSet = 0 and DailyMinSet = 1)
	{
		MsgBox, 262148, , Is this a Daily Maximum?
		IfMsgBox, Yes
		{
			DailyMinSet := 1
			DailyMinSet := DailyMinTrend()
			ListVars
		}
	}
	Else If (DailyMinSet = 1 and DailyMaxSet =1)
	{
		AverageTrend()
	}
}
Is it required to expressly define the globals on the first line?
“There is only one good, knowledge, and one evil, ignorance.”
“I cannot teach anybody anything. I can only make them think”
-Socrates
User avatar
Pulover
Posts: 612
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Pulover's Macro Creator v5.3.2 - The Complete Automation Tool

29 Oct 2020, 05:42

@mons3fa
I can see now that the problem is with the ListVars command. I'll have to check the code to fix it, but since it must be updating global vars at function return so it displays the initially stored values of the global variables. I can understand now why you think there's a problem, but it's an issue in my code to display the variables, not with the variables themselves.

I'm going to fix for the next release but you can check the values using MsgBox to see that they are being correctly set both inside and outside of functions. Note: User Global Variables are Super-global, that means they are going to be global inside any function, even with local scope.

Test code:

Code: Select all

[PMC Code v5.3.2]|F4||1|Window,2,Fast,0,1,Input,-1,-1,1|1|AskVars
Context=None||None|
Groups=Start:1
1|[MsgBox]|%DailyMax% / %DailyMin%|1|0|MsgBox|0||||1|
2|InputBox|DailyMax, DailyMax, Set DailyMax, , , , , , , , %DailyMax%|1|0|InputBox|||||2|
3|InputBox|DailyMin, DailyMin, Set DailyMin, , , , , , , , %DailyMin%|1|0|InputBox|||||3|
4|MyFunc1|result := |1|0|Function|||||4|
5|[MsgBox]|%DailyMax% + %DailyMin% = %result%|1|0|MsgBox|0||||5|

[PMC Code v5.3.2]|F5||1|Window,2,Fast,0,1,Input,-1,-1,1|1|SameVars
Context=None||None|
Groups=Start:1
1|MyFunc1|_null := |1|0|Function|||||1|

[PMC Code v5.3.2]|||1|Window,2,Fast,0,1,Input,-1,-1,1|1|MyFunc1()
Context=None||None|
Groups=Start:1
1|[FunctionStart]|MyFunc1|1|0|UserFunction|Global| / |||1|
2|[MsgBox]|%DailyMax% / %DailyMin%|1|0|MsgBox|0||||4|
3|Evaluate Expression|DailyMax == 0 AND DailyMin == 0|1|0|If_Statement|Local||||5|
4|[Assign Variable]|DailyMax := 1|1|0|Variable|Expression||||7|
5|[MsgBox]|Question: %DailyMax% x %DailyMin%|1|0|MsgBox|32||||8|
6|[ElseIf] Evaluate Expression|DailyMax == 1 AND DailyMin == 0|1|0|If_Statement|32||||9|
7|[Assign Variable]|DailyMin := 1|1|0|Variable|Expression||||12|
8|[MsgBox]|DailyMax: %DailyMax% x %DailyMin%|1|0|MsgBox|0||||13|
9|[ElseIf] Evaluate Expression|DailyMin == 1 AND DailyMax == 0|1|0|If_Statement|0||||14|
10|[Assign Variable]|DailyMax := 1|1|0|Variable|Expression||||17|
11|[MsgBox]|DailyMin: %DailyMax% x %DailyMin%|1|0|MsgBox|0||||18|
12|[Else]|Else|1|0|If_Statement|||||19|
13|[MsgBox]|Something else: %DailyMax% x %DailyMin%|1|0|MsgBox|0||||22|
14|[End If]|EndIf|1|0|If_Statement|||||23|
015|ListVars||1|0|ListVars|||||24|
16|[FuncReturn]|DailyMax + DailyMin|1|0|FuncReturn|||||26|

Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
mons3fa
Posts: 16
Joined: 20 May 2017, 19:33

Re: Pulover's Macro Creator v5.3.2 - The Complete Automation Tool

29 Oct 2020, 10:25

Ok but when I call the function the second time around to evaluate those same global variables the values are not updated.
“There is only one good, knowledge, and one evil, ignorance.”
“I cannot teach anybody anything. I can only make them think”
-Socrates
User avatar
Pulover
Posts: 612
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Pulover's Macro Creator v5.3.2 - The Complete Automation Tool

29 Oct 2020, 10:33

mons3fa wrote:
29 Oct 2020, 10:25
Ok but when I call the function the second time around to evaluate those same global variables the values are not updated.
The test code I posted shows that the global variables keep their values between calls. Post your whole pmc file here or send it to me via email so I can see what's wrong.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)

Return to “Pulovers Macro Creator”

Who is online

Users browsing this forum: No registered users and 13 guests