Jump to content
Macro Express Forums

Sgordet

Members
  • Posts

    19
  • Joined

  • Last visited

Posts posted by Sgordet

  1. I have moved on; I am happy with my HotKey solution. I use many of my Macro Express macros from Stream Deck and have entered my macro there. I also use a Logitech G609, which has lots of programmable buttons; unfortunately, I use all of them. I was glad when I found this left double click solution for screen grabs. 

     

    It surprises me that Macro Express doesn't have double clicking a mouse button as a standard macro because other programs seem able to incorporate it:

     

    1.  I use a wonderful, free program, Dexpot (www.dexpot.de), for switching screens. Many of its actions can be set from within the program by user-determined macros. One of those macros can be from left button clicks over an icon. I've set one click over the icon to initiate a screen saver, and a double click over the icon to open a window listing of all open desktops from which I can move windows. None of the macros involve any user programming--they can be set from menus..

    2.  I'm a commodities trader. I graph each commodity I'm watching in a separate window. My actions have to be quick because I trade using one-minute charts. The trading program I use is called NinjaTrader. They have an app-sharing forum. A fellow trader posted a program which does a screen grab of the active window by double clicking the left mouse button. I do a screen grab of the active window after each trade for later study, and this seemed like a better solution than the screen grab programs I had tried. NinjaTrader is written in C as is his. His program isn't very complex; I can see that built-in procedures provide most of the logic behind the scenes. His left mouse double click works flawlessly. Unfortunately, it throws an error during the file-saving phase. It creates the file path perfectly, but doesn't actually save the file; however, the double mouse click for instituting the macro seems to work fine.  His program text is very short, so the double click macro had to just need some hooks to built-in C routines. I just discovered the program, but it was written several years ago. I tried messaging the programmer, but he hasn't responded, possible he isn't in the forum any longer. NinjaTrader is always being upgraded, so possibly an upgrade is causing the path issue.
     

    My Solution

    NinjaTrader has a macro (I've set it to Alt-F9) for saving a screen shot of the active window. When the hot key is pressed, NinjaTrader opens a standard "file save as" "window" which defaults to the last directory used and generates a file name consisting of the commodity name and the time. One just hits enter to use the directory and file name defaults. Because of my lack of programming knowledge, my  solution is rather inelegant: I created a MacroExpress macro which left mouse clicks once over the window I'm hovering over, so that the window is selected. It then enters Alt-F9 to raise the window save screen. I then have a 10 ms pause to make certain that the Save As screen is raised, and then an "Enter" which hits the  "OK" to save the image. This works fine. It's fast and unobtrusive except for a momentary white flash during my pause.

     

    Didn't mean to bore anyone, but since several people expressed an interest in this issue, I thought that I'd explain my usage a little more 

    fully. 

     

    Thanks,

    Stephen

     

  2. Thanks so much acantor.

     

    I've added the lines exactly as you've shown them, but I seem to need to do something additional.

    After I save the macro and then re-open it, I see that the script editor has prefixed the third statement with "Text Type (Simulated Keystrokes)." If I delete this added language, it re-inserts it again after I close the editing window and re-open it.

     

    I'm using Ctrl F for the activation.

     

    The way that the macro currently stands, it scrolls the page when I enter the activation keys.

     

  3. acantor, please excuse my total lack of knowledge:

     

    I tried to enter the script in the script editor, one line at a time. When going to save, I got several requests regarding creating variables, which I answered yes to.

    Based on the fact that the macro didn't run, I assume that this wasn't the right way to go about it.

     

    Any further help would be appreciated.

     

    Thanks,

    Stephen

  4. Terrypin, I feel badly that you've gone so out of your way to give me so much help and that I'm not going to carry it forward.

    I'm not a programmer, and this is all way over my head. I don't even understand how to set up the Paint windows and execute the code you've written, much less how to transpose the code for NinjaTrader. 

    My hope was to get one or two lines of code that would give me a single mouse click at the coordinates on the screen that I was hovering over and then execute in place my "Mouse Left Click Text Type (Simulate Keystrokes): <CONTROL>b"  code.

    That clearly won't be the case.

     

    Thanks again,

    Stephen

  5. Thanks, terrypin.

     

    I can write very simple macros, and I can't write any that involve real programming, e.g., if, then, else statements.

    I was able to copy each of the macros that acantor suggested and each ran without error. The macros all placed my Buy/Sell orders, but without moving the known coordinates of the mouse to the window that I was hovering over--the desired initial action.

     

    I have three monitors. Each is divided into two windows, and each of those windows displays a different commodity chart. These windows are each children of the parent program, NinjaTrader. I place my orders by clicking on one of two macro buttons on the side of the mouse, one I've programmed for "buy" and one for "sell."

    To make certain that I'm in the active window, I need to left click the mouse button before clicking one of the two macro buttons; if I don't, I will execute a buy or a sell trade in whichever window I previously executed one in. This has happened to me and caused me to make unwanted trades.

     

    When trading, one needs to act quickly, so I would like not to have to take the additional step of first clicking on the left mouse button while hovering over the desired window. I would like that left mouse click I make while hovering to be part of the macro, but I don't know how do it.

     

    Any help you could give me would be appreciated.

  6. I just wanted to thank you, acantor, for taking the time to send me the code snippets. 

     

    I tried them all. Unfortunately, none of them moved the focus, and I'm not knowledgeable enough to conjure additional ones.

     

    It's passing strange to me that a simple macro can't be created to duplicate a manual click on a screen coordinate, something the least knowledgeable computer user does many times a day., but it is what it is.

     

    Thanks again for your efforts.

     

    Best,

    Stephen

  7. This is the way that the code looks (I used the direct editor):

    <TEXT TYPE Action="0" Text="Capture Control from Beneath the Mouse into %ControlUnderMouse%\r\nSet Focus to %ControlUnderMouse%\r\n"/>
    <CAPTURE CONTROL Option="\x00" Control="%ControlUnderMouse%" UseText="FALSE"/>
    <SET FOCUS Control="%ControlUnderMouse%"/>
    <TEXT TYPE Action="0" Text="<CTRLD>2<CTRLU>"/>

     

    When I went to save it, it asked me about creating a variable, which I agreed to.

     

    The buy action still works, but the macro sill doesn't move the focus to the window under the mouse.

  8. Thanks, acantor.

    Please forgive me for not reading your script carefully enough.

    I had tried prefacing my buy command with a mouse left click command, but I hadn't thought of entering a delay.

    I just tried it at various delays, up to two seconds. It still didn't move focus. If it had worked, I would have needed it at .5 seconds or less, so I didn't try anything longer than two seconds.

    I just don't understand why a macro action can't emulate the manual left click that I perform with my finger.

     

  9. Thanks, acantor. That part works great. My problem is that before I run this, I need the macro to output a left mouse button click in the window it's hovering over, so that the window gains focus. Without that, the macro is executed over the last active window. I currently manually click the left mouse button over the window, but I was hoping that a macro could handle that.

  10. Thanks, Acantor. I suppose that I should have explained the use case.

    My program has six windows open over three screens. Each window is a chart of a different commodity which I trade.

    I have two macro buttons on my mouse (in addition to the left and right buttons) which I use for trading--one button executes a "buy" macro (ctrl B), and one is a "sell macro (ctrl s). 

    Before executing a trade, I need to press the left mouse button to switch the focus to the window I want to trade from. I always hover over the correct window before trading, but occasionally I forget to mouse click to change focus, and the trade is executed in the window in which I last traded.

    I would like not to have to execute the extra click to change focus. Ideally, the macro would read the current mouse position, execute one left mouse button click to change focus and then execute my buy or sell macro.

    In sum, I start with one click to change focus and then one click to execute my trade. Having to do anything more wouldn't help me as I'm only trying to save the one click.

  11. Thanks, Cory. I filled out the email form for support, and I got a popup that since the latest version was released more that two years ago, I couldn't get help. I'm using Macro Express Pro Version 4.9.0.1

     

    You've explained it very clearly. Unfortunately, there are no keyboard shortcuts in the program to switch windows.

    Each child window does have a name, but there are many windows.

     

    I'm just wondering if it weren't possible to get the mouse position and, whatever position that is, send a click there, so that the focus would then go to that window?

  12. I can't  email support because my product purchase is older than two years. If anyone could help me, I would be appreciative.

     

    I created a macro which I execute by clicking the left mouse button. The program which I'm using it in has several windows open on the screen. For the macro to execute in the desired window, I need to first click the left mouse button over the window I want to employ the macro in. This moves the focus to that window. I would like the window which I'm hovering over to automatically gain the focus so that I don't have to execute the extra mouse click. 
    I thought that by prefacing my macro code with "Mouse Left Click", I could accomplish that, but it doesn't work. I've also tried most of the other left mouse commands without any avail.

×
×
  • Create New...