Jump to content
Macro Express Forums

terrypin

Members
  • Posts

    2,230
  • Joined

  • Last visited

  • Days Won

    23

Everything posted by terrypin

  1. Alan, Could you try your macro with a few deeper paths please? Here my version fails with folders such as this: C:\Users\terry\Dropbox\A folder for temp stuff Yet it opened this OK: C:\Users\terry\Dropbox\Electronics\Arduino\SKETCHES\My Sketches\MY SKETCHES 2021\DFMiniSD Sketches It's also failing with one of yours I used unchanged, namely C:\ Interestingly our window titles for that differ too, as you see.
  2. Thanks but I'll put it on the back burner for now, as I'm struggling to finish another (non macro) project.
  3. @rberq, Thanks, looks very promising, but I hit some snags. I should have methodically studied it beforehand but impatiently I just ran the first macro with F9 and assigned all your variables. My MX Pro icon then disappeared from the tray. And despite Task Mgr showing that MacExp.exe was still loaded I could not trigger any macros. After a reboot I installed and ran your main macro, but that crashed not only MX Pro but all other apps. I've forcibly re-started Win 10 but I won't try either macro again until I've thoroughly investigated. FWIW the file C:\temp\MacroExpressProLogFiles\MacroExpressPro_Macro_Log_File.txt now contains this: 13 December 2021 09:02:41:204: Macro executed: Tile_1 13 December 2021 09:40:52:485: Macro executed: Tile_2
  4. Alan, Thanks, played with my edited version of that briefly yesterday (just changing folder paths) but had some difficulty getting windows into specified positions. Meanwhile have a project deadline (electronics, Christmas gift, not macros), but will return to it shortly. I think it's a matter of fine-tuning the size/position delays, with some added after each folder opening too.
  5. Hi Alan, Thanks for the quick reply. Yes, those potentially useful options behave in different ways depending on whether windows are open or minimised. The latter type do not participate. So if all are minimised you'll see no change in your screen's appearance. So for my requirement, when some will be open and others minimised, the tools don't help. Also, they act on both FE folders and all other apps, which is another snag. I've made progress with a compromise since posting: a macro that will open a specific set of 8 folders I want to work with frequently over the next few days, and arrange them in two rows of 4. But it's very slow at 32 secs. I don't understand why, because I already have 8 macros that place the currently active window in one of those 8 positions, and that's 'immediate'. So I'd expect a couple of seconds, not 32! Whatever variations I tried it remained 32 s. Even tried opening each via the Run box. I'll show it below for any suggestions. May also be useful to others. Note that I'm using Wait for Window Title and the Delays are disabled, but results are identical with either, and with all others I tried. <COMMENT Value="Arduino (Sundry)"/> <OPEN FOLDER Path="C:\\Users\\terry\\Dropbox\\Electronics\\Arduino\\Arduino (Sundry)"/> <DELAY Flags="\x01" Time="0.3" _ENABLED="FALSE"/> <WAIT FOR WINDOW TITLE Title="Arduino (Sundry)" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <MACRO RUN Use_ID="FALSE" Name="Current window 480x586 (Top 1) (a+F1)" ID="-1" Wait="TRUE"/> <COMMENT/> <COMMENT Value="Arduino PROJECTS"/> <OPEN FOLDER Path="C:\\Users\\terry\\Dropbox\\Electronics\\Arduino\\Arduino PROJECTS"/> <DELAY Flags="\x01" Time="0.3" _ENABLED="FALSE"/> <WAIT FOR WINDOW TITLE Title="Arduino PROJECTS" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <MACRO RUN Use_ID="FALSE" Name="Current window 480x586 (Top 2) (a+F2)" ID="-1" Wait="TRUE"/> <COMMENT/> <COMMENT Value="DfRobot PROJECTS"/> <OPEN FOLDER Path="C:\\Users\\terry\\Dropbox\\Electronics\\Arduino\\Arduino PROJECTS\\DfRobot PROJECTS"/> <DELAY Flags="\x01" Time="0.3" _ENABLED="FALSE"/> <WAIT FOR WINDOW TITLE Title="DFRobot PROJECTS" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <MACRO RUN Use_ID="FALSE" Name="Current window 480x586 (Top 3) (a+F3)" ID="-1" Wait="TRUE"/> <COMMENT/> <COMMENT Value="DFR-Pro proj"/> <OPEN FOLDER Path="C:\\Users\\terry\\Dropbox\\Electronics\\Arduino\\Arduino PROJECTS\\DfRobot PROJECTS\\DFR-Pro proj"/> <DELAY Flags="\x01" Time="0.3" _ENABLED="FALSE"/> <WAIT FOR WINDOW TITLE Title="DFR-Pro proj" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <MACRO RUN Use_ID="FALSE" Name="Current window 480x586 (Top 4) (a+F5)" ID="-1" Wait="TRUE"/> <COMMENT/> <COMMENT Value="DFR-SD proj"/> <OPEN FOLDER Path="C:\\Users\\terry\\Dropbox\\Electronics\\Arduino\\Arduino PROJECTS\\DfRobot PROJECTS\\DFR-SD proj"/> <DELAY Flags="\x01" Time="0.3" _ENABLED="FALSE"/> <WAIT FOR WINDOW TITLE Title="DFR-SD proj" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <MACRO RUN Use_ID="FALSE" Name="Current window 480x586 (Bot 1) (a+F6)" ID="-1" Wait="TRUE"/> <COMMENT/> <COMMENT Value="DFR-Music"/> <OPEN FOLDER Path="C:\\Users\\terry\\Dropbox\\Electronics\\Arduino\\Arduino PROJECTS\\DfRobot PROJECTS\\DFR-Music"/> <DELAY Flags="\x01" Time="0.3" _ENABLED="FALSE"/> <WAIT FOR WINDOW TITLE Title="DFR-Music" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <MACRO RUN Use_ID="FALSE" Name="Current window 480x586 (Bot 2) (a+F7)" ID="-1" Wait="TRUE"/> <COMMENT/> <COMMENT Value="MY SKETCHES 2021"/> <OPEN FOLDER Path="C:\\Users\\terry\\Dropbox\\Electronics\\Arduino\\SKETCHES\\My Sketches\\MY SKETCHES 2021"/> <DELAY Flags="\x01" Time="0.3" _ENABLED="FALSE"/> <WAIT FOR WINDOW TITLE Title="MY SKETCHES 2021" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <MACRO RUN Use_ID="FALSE" Name="Current window 480x586 (Bot 3) (a+F8)" ID="-1" Wait="TRUE"/> <COMMENT/> <COMMENT Value="Arduino (Sundry)"/> <OPEN FOLDER Path="C:\\Users\\terry\\Dropbox\\Electronics\\Arduino\\Arduino (Sundry)"/> <DELAY Flags="\x01" Time="0.3" _ENABLED="FALSE"/> <WAIT FOR WINDOW TITLE Title="Arduino (Sundry)" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <MACRO RUN Use_ID="FALSE" Name="Current window 480x586 (Top 1) (a+F1)" ID="-1" Wait="TRUE"/> <COMMENT/> <COMMENT Value="Arduino PROJECTS"/> <OPEN FOLDER Path="C:\\Users\\terry\\Dropbox\\Electronics\\Arduino\\Arduino PROJECTS"/> <DELAY Flags="\x01" Time="0.3" _ENABLED="FALSE"/> <WAIT FOR WINDOW TITLE Title="Arduino PROJECTS" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <MACRO RUN Use_ID="FALSE" Name="Current window 480x586 (Top 2) (a+F2)" ID="-1" Wait="TRUE"/> <COMMENT/> <COMMENT Value="DfRobot PROJECTS"/> <OPEN FOLDER Path="C:\\Users\\terry\\Dropbox\\Electronics\\Arduino\\Arduino PROJECTS\\DfRobot PROJECTS"/> <DELAY Flags="\x01" Time="0.3" _ENABLED="FALSE"/> <WAIT FOR WINDOW TITLE Title="DFRobot PROJECTS" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <MACRO RUN Use_ID="FALSE" Name="Current window 480x586 (Top 3) (a+F3)" ID="-1" Wait="TRUE"/> <COMMENT/> <COMMENT Value="DFR-Pro proj"/> <OPEN FOLDER Path="C:\\Users\\terry\\Dropbox\\Electronics\\Arduino\\Arduino PROJECTS\\DfRobot PROJECTS\\DFR-Pro proj"/> <DELAY Flags="\x01" Time="0.3" _ENABLED="FALSE"/> <WAIT FOR WINDOW TITLE Title="DFR-Pro proj" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <MACRO RUN Use_ID="FALSE" Name="Current window 480x586 (Top 4) (a+F5)" ID="-1" Wait="TRUE"/> <COMMENT/> <COMMENT Value="DFR-SD proj"/> <OPEN FOLDER Path="C:\\Users\\terry\\Dropbox\\Electronics\\Arduino\\Arduino PROJECTS\\DfRobot PROJECTS\\DFR-SD proj"/> <DELAY Flags="\x01" Time="0.3" _ENABLED="FALSE"/> <WAIT FOR WINDOW TITLE Title="DFR-SD proj" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <MACRO RUN Use_ID="FALSE" Name="Current window 480x586 (Bot 1) (a+F6)" ID="-1" Wait="TRUE"/> <COMMENT/> <COMMENT Value="DFR-Music"/> <OPEN FOLDER Path="C:\\Users\\terry\\Dropbox\\Electronics\\Arduino\\Arduino PROJECTS\\DfRobot PROJECTS\\DFR-Music"/> <DELAY Flags="\x01" Time="0.3" _ENABLED="FALSE"/> <WAIT FOR WINDOW TITLE Title="DFR-Music" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <MACRO RUN Use_ID="FALSE" Name="Current window 480x586 (Bot 2) (a+F7)" ID="-1" Wait="TRUE"/> <COMMENT/> <COMMENT Value="MY SKETCHES 2021"/> <OPEN FOLDER Path="C:\\Users\\terry\\Dropbox\\Electronics\\Arduino\\SKETCHES\\My Sketches\\MY SKETCHES 2021"/> <DELAY Flags="\x01" Time="0.3" _ENABLED="FALSE"/> <WAIT FOR WINDOW TITLE Title="MY SKETCHES 2021" Partial="FALSE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <MACRO RUN Use_ID="FALSE" Name="Current window 480x586 (Bot 3) (a+F8)" ID="-1" Wait="TRUE"/> <COMMENT/>
  6. I hope to soon start developing a macro I've been putting off for months. But I'd first appreciate hearing if anyone has already invented this particular wheel please? (Or know of a tool, fee/free, that does it reliably?) I want it to arrange all open FE folders to fill the screen, on top of everything else. Ideally filling all the screen with similar sized windows up to a maximum of a user-settable max. Which I'd probably set to eight, i.e 4 columns across, 2 rows high. Maybe choosing the folders in order from left to right as displayed when the FE icon is hovered in the taskbar. If there are more than the max open, various ideas arise. For example, the max could be ignored and the windows sized wide enough for their titles to be read, sacrificing height. But I'll probably start by ignoring that interesting diversion. I already have the advantage of various size/positioning macros. But they operate on an individual active FE folder. I'm increasing impatient for something more helpful, especially if I have a dozen or so folders open. Eventually I'd like to extend it to app windows as well, but FE is the immediate focus. Terry
  7. Thanks for testing Alan. I assume it was set for a few hours ahead and did not trigger an hour earlier? My result sounds strangely like your other tool, as we are of course currently in summer time, GMT plus 1. Terry 15:10, 7th July.
  8. I've always assumed that when using scheduled activation I could rely on using the time correctly set in the date/time icon at the right of my taskbar. If that matches my watch within one minute then I'm happy. But an alarm I set this morning is being activated an hour early. I assume the alarm will stop triggering an hour early too, as logic suggests. That would obviously be very worrying if I hadn't become aware of it. Sound File: Alarm-Beeps.wav Text Box Display: Alan Smith <SOUND FILE File="C:\\Users\\terry\\Sounds\\Sound Effects\\Alarm-Beeps.wav" Wait="FALSE" _PROMPT="0x0007"/> <TEXT BOX DISPLAY Title="Alan Smith" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\qc\\b\\f0\\fs72 Alan Smith\\b0\\f1\\fs20 \r\n\\par }\r\n" Left="390" Top="485" Width="783" Height="421" Monitor="0" OnTop="TRUE" Keep_Focus="FALSE" Mode="\x00" Delay="0"/> Terry
  9. Agreed. I too would like to know the underlying cause. No response from the author.
  10. Or just click the target pane with the mouse? 🙂
  11. OK, thanks Alan, I’d misunderstood. Trauton: I’m very surprised that, having selected an entry manually with the arrow keys, there is then no single key or hotkey to open its chart. But I see that the developer confirmed that. Is mouse usage really slower overall? After all, wouldn’t it mean you could then click or d-click directly after visual selection of your target?
  12. It looks interesting, but: - I have scores of macros working with File Explorer, including a dozen or so sizing and positioning windows - Another learning curve I can do without - Already a year or two of work waiting on my To Do and To Learn lists - In view of the subject discussion I suspect there may be other quirks So I'll give it a day or two in case the author corresponds about the puzzle outstanding, and then uninstall.
  13. I would need to know what was at 550,59 on your computer screen to be able to run that successfully. A screenshot, or at least some comments in your script, would tell me. But I'm guessing it's the tool icon that sets the layout to the default 4-pane one? That's (350,40) on my 1920 x 1200 screen and works fine here.
  14. I was also wondering if the same result could be achieved by other means, but so far that’s elusive. Tab will take you through each of the four panes. And if there is some way to identify your starting tab then the rest is easy. I reckon you could get that ‘base tab’ by pixel colour tests, but you’d then have to sacrifice the versatile viewing options, or add even further complexity. Why not just settle for the good old fashioned method of clicking the target? 🙂
  15. rberq, Yes. The macro runs fine however it’s activated, including other hotkeys or debug mode. But Q-Dir does not respond to being given Ctrl+1/23/4 by MX Pro rather than manually. Nor if that’s preceded by a variety of other characters (to which it does respond). I have yet to try a few other possibilities.
  16. No, mine behaved the same. (Now that I know what it's supposed to do!) There's definitely something strange going on with those hotkeys Ctrl + 1/2/3/4. BTW, I couldn't find them documented? At least, not in the list I've shown below. FWIW I've emailed the author.
  17. And your reply to the rest of my request? "Please post your macro and describe the startup state required and what it is supposed to do when you activate it with Alt + 1" Also, did you try running mine? EDIT: Meanwhile, as far as I can tell after some trial and error, the application shortcuts CTRL + 1, CTRL + 2, CTRL + 3, and CTRL + 4 appear to successively select each of the four (default) panes. Is that what you want it to do? If so, I was able to reproduce your problem. Thursday 1 July 2021, 1105
  18. Alexis, More detail needed! Please post your macro and describe the startup state required and what it is supposed to do when you activate it with Alt + 1 if it's not obvious from your commented script. Meanwhile, I've installed the program (64-bit, as Admin), but using the following minimalist macro, I could not reproduce the issue during a dozen or so runs. // Attempting to reproduce problem described at https://pgmacros.invisionzone.com/topic/8883-mex-pro-4-and-q-dir-hotkey-problems/ // Ensure Q-Dir has focus before activating this macro with ALT + 1 Delay: 0.1 seconds Text Box Display: Temp Text Type (Simulate Keystrokes): <CONTROL>1 // Now added a long delay (0.5 s) waiting for whatever is supposed to happen after typing CTRL + 1. Delay: 0.5 seconds // Long delay (0.5 s) waiting for whatever is supposed to happen after typing CTRL + 1. Text Box Display: Temp <COMMENT Value="Attempting to reproduce problem described at\r\nhttps://pgmacros.invisionzone.com/topic/8883-mex-pro-4-and-q-dir-hotkey-problems/"/> <COMMENT Value="Ensure Q-Dir has focus before activating this macro with ALT + 1"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT BOX DISPLAY Title="Temp" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 The macro has been activated by Alt+1\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> <TEXT TYPE Action="0" Text="<CONTROL>1"/> <COMMENT Value="Now added a long delay (0.5 s) waiting for whatever is supposed to happen after typing CTRL + 1."/> <DELAY Flags="\x01" Time="0.5" _COMMENT="Long delay (0.5 s) waiting for whatever is supposed to happen after typing CTRL + 1."/> <TEXT BOX DISPLAY Title="Temp" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n\\viewkind4\\uc1\\pard\\f0\\fs20 The macro typed CTRL + 1. Now what?\\f1 \r\n\\par }\r\n" Left="Center" Top="Center" Width="278" Height="200" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x00" Delay="0"/> BTW, I'm always rather careful about using Alt in my activation keys, as I've occasionally had quirky results, particularly under Win 10. And I assume you've tried varying delays after the crucial TextType, and also Wait For Text Playback? To make further progress we need to be singing from exactly the same hymn book, as the devil is usually in the details! Terry Thursday 1 July 2021, 0907
  19. I’m obviously missing something! How exactly do you do this at present? you select a row manually with the arrow keys, yes? And a double left mouse click will then do what you want, namely open a chart? So surely you just create a macro that performs the mouse double click, and activate it with your chosen hotkey?
  20. With the app maximised, try methodically establishing the locations (x,y coordinates) of points in the middle of all the boxes into which you expect the macro to enter text. Do so under the differing conditions that you actually encounter. If/when you find an inconsistency (when a box location has changed), try to identify exactly why. As just one example, it may be lower down because extra material (such as tabs in your we browser) have been generated for some reason at the top. You may then be able to determine what that ‘extra’ is by some fairly simple logic test, typically with pixel colour testing at a known location. And then, with a little maths, scroll up or down a compensating amount, so that you can click directly on the target.
  21. Is it possible to show us the web app? Otherwise mainly guesswork. If confidentiality precludes that, then can you find another accessible web site that gives you the same problem?
  22. I'll shortly be leaving my PC for most of the day. So I made the assumption that your answer to my key question would be Yes. I've therefore gone ahead and written the heavily commented demo macro below. Together with Alan's suggestions I hope it will help you get the problem sorted. Come back if not. // The MX Pro macro is now running, having been triggered in an appropriate way. // The next command starts a loop which will repeat until othewise ended. For this basic demo that will be by using the hotkey assigned in Options > Preferences > Playback > Miscellaneous > 'Hotkey to abort macros'. // One way to repeat indefinitely, until otherwise stopped. Repeat Until %N[99]% Does not Equal "%N[99]%" Get Mouse Position into (MouseX, MouseY) Relative to Screen // Test if mouse is inside Notepad If Variable %MouseX% Is Less Than "777" AND If Variable %MouseY% Is Less Than "566" // So the next command should switch focus to that window if it does not already have it. Window Activate: - Notepad // In addition, for this demo, let's briefly show a message. Text Box Display: Message End If // Test if mouse is inside Paint If Variable %MouseX% Is Greater Than "257" AND If Variable %MouseX% Is Less Than "970" AND If Variable %MouseY% Is Greater Than "578" AND If Variable %MouseY% Is Less Than "1160" // So the next command should switch focus to that window if it does not already have it. Window Activate: - Paint // In addition, for this demo, let's briefly show a message. Text Box Display: Message End If End Repeat // The window will be repeatedly toggled until the mouse leaves the area. But that makes no practical difference, and the temporary messages can be deleted after testing. // Only experiment will determine whether the macro is fast enough to respond to brisk cursor movement <COMMENT Value="The MX Pro macro is now running, having been triggered in an appropriate way."/> <COMMENT/> <COMMENT Value="The next command starts a loop which will repeat until othewise ended. For this basic demo that will be by using the hotkey assigned in Options > Preferences > Playback > Miscellaneous > 'Hotkey to abort macros'.\r\n"/> <COMMENT Value="One way to repeat indefinitely, until otherwise stopped."/> <REPEAT UNTIL Variable="%N[99]%" Condition="\x01" Value="%N[99]%"/> <GET MOUSE POSITION Option="\x00" X="MouseX" Y="MouseY"/> <COMMENT Value="Test if mouse is inside Notepad"/> <IF VARIABLE Variable="%MouseX%" Condition="\x02" Value="777" IgnoreCase="FALSE"/> <AND/> <IF VARIABLE Variable="%MouseY%" Condition="\x02" Value="566" IgnoreCase="FALSE"/> <COMMENT Value="So the next command should switch focus to that window if it does not already have it."/> <WINDOW ACTIVATE Title=" - Notepad" Exact_Match="FALSE" Wildcards="FALSE" _IGNORE="0x0006"/> <COMMENT Value="In addition, for this demo, let's briefly show a message."/> <TEXT BOX DISPLAY Title="Message" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n{\\colortbl ;\\red255\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\qc\\b\\f0\\fs20 The mouse cursor has entered the target window called Notepad.\r\n\\par \r\n\\par \\cf1 Use the macro button to trade!\\b0\\f1 \r\n\\par }\r\n" Left="824" Top="620" Width="352" Height="122" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x01" Delay="1"/> <END IF/> <COMMENT/> <COMMENT Value="Test if mouse is inside Paint"/> <IF VARIABLE Variable="%MouseX%" Condition="\x03" Value="257" IgnoreCase="FALSE"/> <AND/> <IF VARIABLE Variable="%MouseX%" Condition="\x02" Value="970" IgnoreCase="FALSE"/> <AND/> <IF VARIABLE Variable="%MouseY%" Condition="\x03" Value="578" IgnoreCase="FALSE"/> <AND/> <IF VARIABLE Variable="%MouseY%" Condition="\x02" Value="1160" IgnoreCase="FALSE"/> <COMMENT Value="So the next command should switch focus to that window if it does not already have it."/> <WINDOW ACTIVATE Title="- Paint" Exact_Match="FALSE" Wildcards="FALSE" _IGNORE="0x0006"/> <COMMENT Value="In addition, for this demo, let's briefly show a message."/> <TEXT BOX DISPLAY Title="Message" Content="{\\rtf1\\ansi\\ansicpg1252\\deff0\\deflang2057{\\fonttbl{\\f0\\fnil\\fcharset0 Tahoma;}{\\f1\\fnil Tahoma;}}\r\n{\\colortbl ;\\red255\\green0\\blue0;}\r\n\\viewkind4\\uc1\\pard\\qc\\b\\f0\\fs20 The mouse cursor has entered the target window called Paint.\r\n\\par \r\n\\par \\cf1 Use the macro button to trade!\\b0\\f1 \r\n\\par }\r\n" Left="824" Top="620" Width="352" Height="122" Monitor="0" OnTop="TRUE" Keep_Focus="TRUE" Mode="\x01" Delay="1"/> <END IF/> <END REPEAT/> <COMMENT Value="The window will be repeatedly toggled until the mouse leaves the area. But that makes no practical difference, and the temporary messages can be deleted after testing."/> <COMMENT/> <COMMENT Value="Only experiment will determine whether the macro is fast enough to respond to brisk cursor movement"/> Terry
  23. There are several aspects of your problem definition that I’m not clear about. I suppose I still don’t understand exactly what you are doing and what you want to happen. “I created a macro which I execute by clicking the left mouse button.” Yet as I understand it you also want your macro to left click when the mouse cursor is hovering over a certain window directly before you make a trade with your ‘macro’ buttons. Seems like potential conflict, as that would restart your macro. Did you consider the command Window Activate I asked about? As usual the devil is in the details. What exactly do you want to happen, not only when you move your mouse into a specific window but also afterwards? Specifically, am I right that as soon as the mouse cursor moves into a ‘target window’ you want it to get the focus abd keep it until the cursor enters another window? If so, what are the time constraints, if any? For example, if you were trading briskly and moved from window #1 to window #2 in less than say 0.5s, I assume you would want both the MX macro and your macro buttons to respond correctly? I’m not familiar with your application or with online trading. Nor do I have any ‘macro buttons’ on my mouse. And I use only a single large monitor, albeit usually with many windows open. These are obstacles to helping you, so we need a shared basis for discussion. If you confirm that I’m on the right lines so far then I suggest we continue the discussion as follows: using two windows, each occupying a fixed section of the screen, say Notepad and Paint, both universally accessible on MS Windows based PCs.. I would then draft a simple demo macro which you could hopefully adapt to your Ninja Trader scenario. Terry
  24. “It's passing strange to me that a simple macro can't be created to duplicate a manual click on a screen coordinate” I’m lost! Of course a macro can do that. For example, the mouse location can be captured as coordinates (MouseX,MouseY) and an IF Variable used to determine whether that falls within the required area. But as you have to first activate the macro, why not just do so with a Mouse Event specifying a position chosen visually? That could simultaneously give that area the focus, yes? I clearly must be missing something here. It would be helpful to see a non-confidential screenshot or two, plus your full macro. And, as this is your first post could you indicate your level of experience with MX Pro macros. For instance, are you familiar with the full command set? Including Window Activate etc? And when specifying a window in the Script Editot have you tried showing Hidden windows.
×
×
  • Create New...