Page 36 of 51

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

Posted: 14 Aug 2016, 18:33
by click-click
I have a .vbs file that sets a variable to either true or false depending whether a network connection is available. Is there any way to query this variable from within the macro?

Right now I use RUN to launch the .vbs which creates a file that I check by using If file exist. I would like to avoid creating the file.

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

Posted: 15 Aug 2016, 11:27
by Pulover
You can run vb using COM. Check out Sinkfaze's tutorial https://autohotkey.com/boards/viewtopic.php?p=474#p474

Don't know how to go about copying a variable content though.

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

Posted: 17 Aug 2016, 16:04
by click-click
Is it possible to disable Ctrl+ESC using macrocreator?

Edit: I created an .ahk > exe and run that on startup.

Code: Select all

#NoTrayIcon
LWin::Return  ; Disable WinKey
^Esc::Return  ; Disable Ctrl+Esc
<^>!Pause::Suspend, Toggle ; AltGr+Pause will Toggle Hotkeys On/Off
<^>!q::ExitApp ; AltGr+q will exit Autohotkey app

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

Posted: 23 Aug 2016, 18:06
by macrobabby36
Is there any function in PMC to run other programs from the command line?

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

Posted: 24 Aug 2016, 18:42
by macrobabby36
Actually, to clarify my previous question, I am trying to end/close a process using PMC. I know how to do it from the command prompt, so I want to either do it through PMC or the command prompt.

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

Posted: 26 Aug 2016, 14:53
by David08SM
This is a wonderful tool.

I was wondering if anyone could help me out with how I would go about doing this?

"If Image A is not found and Image B is not found, then execute this code. Else, if either one or the other, or both are found, break."

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

Posted: 28 Aug 2016, 15:53
by ThuyHoang
Hello,

You have a great program here, I use it all the time. I have a problem though. I can't get Image Search to work.

Here's is a pic of how I set up Image Search:
Image

Here's a pic of part of a web page that contains the image I'm searching for:
Image

I run the macro and it pops up with msg that says image not found. Someone please help me, thanks.

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

Posted: 02 Sep 2016, 09:49
by SilverFut
Hi,
I'm completely novice at any of this and need some help to know if the following can be automated with macros and hopefully some pointers in how I should go about learning to do it if its possible.

Application - Futures Trading platforms that support the use of macros.

My issue is that I'm trying to see if it can function as I need if I try and setup a trading keyboard (http://www.keyboardtrader.com/customize ... board.html) with 3 separate macros for each key press/switch that will then send the same action to 3 separate platforms.
(1 = Sierra Charts (SIM), 2 = Sierra Charts (LIVE), 3 = NinjaTrader 8 (SIM).)
I've switch the majority of my trading over to Sierra Charts but I've had to keep NT for some 3rd party add ons that I can't find on any other platform which I use to find entries/exits. I've been executing on (2) Sierra Charts (LIVE) but I'm finding it difficult when scalping to track the exact price level of my live order entry and stop price level (that's on SC) while looking at the Jigsaw DOM on NT.

So I started looking around for some option that would allow a macro button solution so that when I entered a live trade on (2) Sierra Charts (LIVE), that same order would be entered as a SIM trade on (1) Sierra Charts (SIM) and (3) NT8 (SIM) and show the same order price levels on the Jigsaw DOM as the order price levels on the live trade on Sierra Charts that is executing the live trade to the broker. Then I only need to closely watch one screen and it will have the same order entry price levels showing as the LIVE order.


The software for the keyboard (http://www.access-is.com/softprog.php) allows "layering" (Multiple macros) on the same key.

I've been trying to test the concept using the current keyboard I have (Roccat MK Pro) and setup the same macro key sequence (Buy Market = CTRL+Numpad0) in Sierra Charts and (Buy Market = CTRL+Numpad0) in Ninjatrader 8. (This would not be the case with the dedicated trading keyboard - each platform would get its own unique macro sequence for each task but the 3 unique macros would be bound to the same key press).


The problem I seem to be running into is that it will only execute the macro on whatever chart that has been clicked on to "bring it to the front" in Windows (Running Windows 8.1). So if I first click on Sierra charts chart, then CTRL+Numpad0 it will execute the Buy order on SC. Then if I click on NT8 chart and press CTRL+Numpad0, it will execute the Buy order on NT8.

Each platform forces the chart to be clicked on first to become "active" and only then will it accept the macro sequence. I've talked to Sierra Charts support and they said I should explore trying to find a solution with AutoHotKey.

Is it possible to write a hotkey/script so that when a key is pressed (EG for a Buy market order), it will first make the required platform chart "active" and then execute the order on that platform, and that this same process can be executed for 3 separate platforms?

EG
Buy At Market button =
Make Sierra Charts LIVE chart# "active" - Execute Buy order
Make Sierra Charts SIM chart# "active" - Execute Buy order
Make Ninjatrader 8 SIM chart# "active" - Execute Buy order

Macros ideally would be all tied to one button on the keyboard (linked at start) or if that isn't possible, tie each macro to one key-switch and use dual or quad key caps so that 2 or 4 key-switches are activated at the same time. The keyboard in the above link has software that allows "layering" of macros (2 layers) on the same switch. From what I can gather this should allow 3 macros to a switch. Would that software ( http://www.access-is.com/softprog.php ) be able to be used with AutoHotKey? In the end result, I would like to have a key on the keyboard that would switch all the LIVE platform macros off/on as needed but still allow the others to function as normal but that is some ways off.

Is there a solution or workaround to getting this to all work as I've described? Will AutoHotKey be the right path to start going down?

The trading platforms allow macros for a range of functions EG Order entry, cancel, cancel all, flatten, flatten all and so on. Each function will be tied to a separate key/switch. From what I can gather they will use the same setup in AutoHotkey/Pulover's Macro Creator, but with a change to what platform order specific marco to send.

I'm only trying to trade 1 instrument at a time - 30yr Treasuries ZB. But I also have 10yr and 5yr charts and DOMs running over a total of 4 screens.




So far I have started looking at AutoHotKey and read some limited documentation. I think I need to use
#IfWinExists - to identify if the correct windows is running, then
#WinActivate - to make the correct Window active, then
^numpad0 - CTRL numpad0 to launch the macro that is needed from the platform to enter the trade.

In Pulover's Macro Creator I have found :
Window - command: WinActivate ; WinTitle (Clicked on correct chart in Sierra Charts)
Text - Text with commands: ^Numpad0

I press play and nothing happens. This is the first time I've attempted anything like this and I feel lost in how to approach it.

How do I setup a macro key combination at the start that will then trigger everything else to start? EG: To test the concept on the current keyboard, I'd like to set it up so that when SCROLL Lock is turned ON it will make the keyboard active to trade from and have the "Buy Market" macro launched by pressing "Numpad0" button on the keyboard.
What else am I missing. There has to be fair amount I think.


If there are any more details that might help, please let me know.


Thanks

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

Posted: 02 Sep 2016, 16:13
by SilverFut
It looks like I'm on the right path. I'm testing on 2 platforms that are running in SIM.

I used the record function and did both one after the other. I run into a issue where it would not give the correct WinActivate field for the 2nd platform (ahk_class) and it was launching 2 separate orders on the 1st platform but I fixed it by manually editing the 2nd WinActive and finding the ahk_class that way. Once that was done and I deleted some extra WinActivate lines that had popped up, it launches and executes on both platforms.

Is there anyway to speed up the time or make them launch at both platforms at the same time?

UPDATE -

I've noticed that it will work when first setup and test played in Pulovers Macro creator but whenever either trading program is shut down and re-started, the ahk_class information changes (Not static). I would guess I need a variable here somehow so that the changing ahk_class can be found each time but I have no idea how to do this correctly. The same thing happens if I try using ahk_process, ahk_id, ahk_pid. None of them are static values between start ups. The only static is ahk_title but it does not allow the macros to execute on the trading platforms.

So the ahk_title is static and I think I need to use that to somehow find the changing ahk_class information each time so that it will execute the macros correctly.

Can anyone help explain how to do that please?


Very nice software! I will be donating!

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

Posted: 07 Sep 2016, 14:32
by Gevali
Hi, I wanted to ask, if it is possible to auto merge same keys into one with repeats.

Like:
Send, {Tab}{Tab}{Tab}{Tab}{Tab}{Tab}
into
Send, {Tab 6}

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

Posted: 22 Sep 2016, 19:59
by Barn01
Could someone take a few mins and make this 8 line macro in PMC. Just open an excel sheet and dump some random numbers in Column A for the test.

This code runs fine when I'm running it in SciTE4 but gives me a mismatch array error at "Cells" when I try it in PMC. I'm just wondering if this is a bug? If so I'd love to see it fixed and yes I have donated already :)

Code: Select all

If !IsObject(XL)
	XL := ComObjCreate("Excel.Application")

Sleep, 333
var1 := 1
var2 := 1
While  XL.Cells(var1, var2).Value != ""
{
    thisCell := XL.Cells(var1, var2).Value
    MsgBox, 0, , This Cell = %thisCell%
    var1 := var1 +1
}

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

Posted: 09 Oct 2016, 01:26
by zekerya
my code works in PMC but when i convert it ahk and exe it just work till moving window function.could some one help??

Code: Select all

SendMode, Event
WinSet, AlwaysOnTop, Toggle, MEmu
Sleep, 333
WinMove, MEmu,, 1, 1, 748, 588
Sleep, 333
WinWaitActive, MEmu, , 1
Sleep, 333
Loop, 800
{
    CoordMode, Pixel, Window
    ImageSearch, FoundX, FoundY, 20, 552, 44, 573, *90 C:\Users\KURD\AppData\Roaming\MacroCreator\Screenshots\Screen_20161009003422.png
    CenterImgSrchCoords("*90 C:\Users\KURD\AppData\Roaming\MacroCreator\Screenshots\Screen_20161009003422.png", FoundX, FoundY)
    Sleep, 10
}
Until ErrorLevel = 0
ControlClick, x%FoundX% y%FoundY%, MEmu,, Left, 1,  NA
Sleep, 10
Sleep, 40
ControlClick, x495 y160, MEmu,, Left, 1,  NA
Sleep, 10
Sleep, 20
ControlClick, x492 y189, MEmu,, Left, 1,  NA
Sleep, 10
Loop, 800
{
    CoordMode, Pixel, Window
    ImageSearch, FoundX, FoundY, 59, 538, 620, 551, *85 C:\Users\KURD\AppData\Roaming\MacroCreator\Screenshots\Screen_20161009002458.png
    CenterImgSrchCoords("*85 C:\Users\KURD\AppData\Roaming\MacroCreator\Screenshots\Screen_20161009002458.png", FoundX, FoundY)
    Sleep, 10
}
Until ErrorLevel = 0
If ErrorLevel = 0
{
    ControlClick, x%FoundX% y%FoundY%, MEmu,, Left, 1,  NA
    Sleep, 10
    Sleep, 50
    ControlClick, x236 y152, MEmu,, Left, 1,  NA
    Sleep, 10
    Sleep, 10
    ControlClick, x%FoundX% y%FoundY%, MEmu,, Left, 1,  NA
    Sleep, 10
    Sleep, 50
    ControlClick, x44 y480, MEmu,, Left, 1,  NA
    Sleep, 10
    Sleep, 2500
    ControlClick, x428 y362, MEmu,, Left, 1,  NA
    Sleep, 10
    Sleep, 200
    ControlClick, x354 y465, MEmu,, Left, 1,  NA
    Sleep, 10
}

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

Posted: 16 Oct 2016, 14:49
by adam
same problem

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

Posted: 17 Oct 2016, 12:27
by danielll
adam wrote:same problem
zekerya wrote:my code works in PMC but when i convert it ahk and exe it just work till moving window function.could some one help??

Code: Select all

SendMode, Event
WinSet, AlwaysOnTop, Toggle, MEmu
Sleep, 333
WinMove, MEmu,, 1, 1, 748, 588
Sleep, 333
WinWaitActive, MEmu, , 1
Sleep, 333
Loop, 800
{
    CoordMode, Pixel, Window
    ImageSearch, FoundX, FoundY, 20, 552, 44, 573, *90 C:\Users\KURD\AppData\Roaming\MacroCreator\Screenshots\Screen_20161009003422.png
    CenterImgSrchCoords("*90 C:\Users\KURD\AppData\Roaming\MacroCreator\Screenshots\Screen_20161009003422.png", FoundX, FoundY)
    Sleep, 10
}
Until ErrorLevel = 0
ControlClick, x%FoundX% y%FoundY%, MEmu,, Left, 1,  NA
Sleep, 10
Sleep, 40
ControlClick, x495 y160, MEmu,, Left, 1,  NA
Sleep, 10
Sleep, 20
ControlClick, x492 y189, MEmu,, Left, 1,  NA
Sleep, 10
Loop, 800
{
    CoordMode, Pixel, Window
    ImageSearch, FoundX, FoundY, 59, 538, 620, 551, *85 C:\Users\KURD\AppData\Roaming\MacroCreator\Screenshots\Screen_20161009002458.png
    CenterImgSrchCoords("*85 C:\Users\KURD\AppData\Roaming\MacroCreator\Screenshots\Screen_20161009002458.png", FoundX, FoundY)
    Sleep, 10
}
Until ErrorLevel = 0
If ErrorLevel = 0
{
    ControlClick, x%FoundX% y%FoundY%, MEmu,, Left, 1,  NA
    Sleep, 10
    Sleep, 50
    ControlClick, x236 y152, MEmu,, Left, 1,  NA
    Sleep, 10
    Sleep, 10
    ControlClick, x%FoundX% y%FoundY%, MEmu,, Left, 1,  NA
    Sleep, 10
    Sleep, 50
    ControlClick, x44 y480, MEmu,, Left, 1,  NA
    Sleep, 10
    Sleep, 2500
    ControlClick, x428 y362, MEmu,, Left, 1,  NA
    Sleep, 10
    Sleep, 200
    ControlClick, x354 y465, MEmu,, Left, 1,  NA
    Sleep, 10
}
i got that,just run the .ahk or .exe file as Administrator

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

Posted: 19 Oct 2016, 14:14
by zekerya
PMC is a really great program thanks to pulover.my question is ,is there any way to use Gdip_imagesearch in PMC??
i mean background(inactive windows)image searching .if yes show an example .

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

Posted: 29 Oct 2016, 23:24
by umbralraven
Someone, please fx this little mess I made.
I intended to make a macro that holds the mouse button when HOME is pressed, and to stop when END is pressed.
Now look at my cockup. I'd appreciate if someone cold fix it for me and point out my errors. Thanks. :D

Code: Select all

KeyWait, Home
KeyWait, Home, D
Start:
Loop
{
    Sleep, 0
    Click, Left, , Down
    Sleep, 10
}
KeyWait, End
KeyWait, End, D
Loop
{
    Sleep, 3600000
}
KeyWait, Home
KeyWait, Home, D
Goto, Start

Problems with RegexMatch

Posted: 07 Nov 2016, 13:29
by pbengert
Hi there,
I'm having problems with RegexMatch in Macro Creator, I've been trying to solve it but I could not find a solution.
RegexMatch in Macro Creator does not give me back a subpattern.

Here is a simple example:
Haystack is "123456789", Searchpattern is ("456"), Destination-Variable is Teilmuster.

The following code in MacroCreator has not result:
the text in the parameter field is:

Code: Select all

"123456789",("456"),Teilmuster
Script-Preview in MacroCreator

Code: Select all

RegExMatch("123456789",("456"),Teilmuster)
MsgBox, 0, , %Teilmuster%
Teilmuster is empty

The following code in Autohot gives back the correct result:

Code: Select all

RegExMatch("123456789",("456"),Teilmuster)
MsgBox %Teilmuster%
Any ideas?
Thank you very much!
Peter

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

Posted: 09 Nov 2016, 12:20
by Solid
Hey guys,

I'm having a (admittedly newbie) problem. I can't get my macro to differentiate IE tabs. In other words, I'm going to have multiple tabs open in IE and want to go to different tabs at various points of my macro. How can I do that? I can only get PMC to go to whatever tab is active, but not go to a specified tab.

If you need more information, let me know. Any help is very much appreciated.

Thank you!

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

Posted: 11 Nov 2016, 22:24
by LordAzuRa
Greetings!

From a legal point of view, am I allowed to use that tool for my business, is it a free license?
I can see so many use of it!

It wont contribute to more profit or anything but will allow my employees to save some precious time doing repetitive tasks!

Thanks,
LordAzuRa

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

Posted: 20 Nov 2016, 20:59
by RandomUser
So im relatively new to macros and i need help with one.

I would for the macro to find a specific [Place Color Here] on a pixel and if the pixel is found, move cursor to pixel location and move slightly up and left click. if the pixel is not found then keep searching until it finds the specific color of a pixel and then what is said above. I have tried many things including an if statement and nothing is working. Contact me via [email protected] if you would like to help. Thanks