Jump to content
Macro Express Forums

terrypin

Members
  • Posts

    2,230
  • Joined

  • Last visited

  • Days Won

    23

Everything posted by terrypin

  1. Hi Alan, “analyze an email message and decide what to do with it based on its sender, subject, or whatever.” It would need to be a very clever macro, incorporating the latest in AI and a LOT of input from you! If you do write such a macro, I wonder how confident you will be in handing over control of your Inbox? Terry
  2. Perhaps consider starting a main macro and during that start another macro (a ‘submacro’), at the appropriate time and location, using the Mouse Button Down command. And stopping it with Mouse Button Up.
  3. Hi Ken, Puzzling indeed that this has arisen out of the blue. Can you recall anything of possible relevance that you changed? In addition to Cory's suggestion could you temporarily change your global settings to use a prefix. Ideally '=', so that my own hundred or so shortkey-activated macros are unaffected if I try to reproduce. Terry
  4. We need more information. At the very least show your script and your code, both using the Code tool <>.
  5. (Once again a post I made hours ago, successfully, seems to have vanished. I’ll try again. Apologies if it turns up twice.) No and no. Instead think in terms of starting macro X and then after a very brief interval starting macro Y.
  6. Thanks, I’ll pursue. That looks like a serious bug if it’s general, as macros should be entirely independent, yes?
  7. Not even rebooting improved it. But I’ve been able to fix it for many of these macros by using the clipboard paste option instead of simulating keystrokes.
  8. Thanks for the feedback and all suggestions. Cory: Settings confirm my OS is “up to date”. As I’m sure you know, unlike regular application programs, OS versions are not under users control (apart from delaying the next one for a time).The ‘latest’ varies by country and PC spec. So I cannot force MS to update my version to 2004, if that was your implication.
  9. Have any other Win 10 users noticed that keystrokes and mouse moves have become significantly slower since a few days ago? It's most noticeable in my scores of shortkey-activated macros, which type my frequently used filenames and paths, but also with mouse moves. When time allows I'll examine each of them for editing possibilities. I suspect it's just another quirky consequence of the latest Win 10 update. Terry Win 10 Pro, Version 1909 (OS Build 18363.1016)
  10. Your lines 6 and 9 are not the same as those in my macro. Read up on arrays and try the simple examples in Help. X is the ‘index’ defining the element of the array variable. When you first define the variable take care to specify that it is an array.
  11. I'd checked that, which reports: "Version 6.1.3 1 Macro Express Pro is up to date" Looks like I'm several versions behind you, Alan. Yet as well as that reassuring message, the Insight Download site also confirms 6.1.3.1 as the latest. Can we no longer expect Insight input into this forum announcing updates?
  12. Sorry, but I can't really follow what you are trying to do. Where does 'cut n paste' come into it? Did you try running my macro? Did you then edit it to suit your app (instead of Excel). Maybe a series of carefully explained screenshots would make it all clearer.
  13. Alan, Can you amplify on that please? What form did this update take? The last update post from Insight here in the forum was two and a half years ago. Terry
  14. I'm not confident I fully understand what you're trying to achieve, but see if the working macro below can get you started. COMMANDS // Assumes a new, blank 'spreadsheet like' file is open, with text cursor at the start of the top line. // For this demo it is the file 'C:\1\Gordy-WorkSheet..xlsx' // Now get each line of source.txt into the ARRAY variable %Line% // And copy each line into the spreadsheet. So the first variable will be %Line[1]%, followed by %Line[2]%, etc. (This would be a long-winded way to simply copy a text file into Excel, of course, but I assume you have other purposes for the variables in mind.) Variable Set Integer %x% to 1 Text File Begin Process: C:\1\source.txt Window Activate: Gordy-WorkSheet Delay: 0.2 seconds Text Type (Simulate Keystrokes): %Line[%x%]%<ENTER> Variable Modify Integer %x%: Increment Text Type (Simulate Keystrokes): <ARROW DOWN> Delay: 0.1 seconds Text File End Process CODE <COMMENT Value="Assumes a new, blank 'spreadsheet like' file is open, with text cursor at the start of the top line."/> <COMMENT Value="For this demo it is the file 'C:\\1\\Gordy-WorkSheet..xlsx'"/> <COMMENT Value="Now get each line of source.txt into the ARRAY variable %Line%"/> <COMMENT Value="And copy each line into the spreadsheet. So the first variable will be %Line[1]%, followed by %Line[2]%, etc.\r\n(This would be a long-winded way to simply copy a text file into Excel, of course, but I assume you have other purposes for the variables in mind.)"/> <VARIABLE SET INTEGER Option="\x00" Destination="%x%" Value="1"/> <TEXT FILE BEGIN PROCESS Filename="C:\\1\\source.txt" Start_Record="1" Process_All="TRUE" Records="5" Variable="%Line[%x%]%"/> <WINDOW ACTIVATE Title="Gordy-WorkSheet" Exact_Match="FALSE" Wildcards="FALSE" _IGNORE="0x0006"/> <DELAY Flags="\x01" Time="0.2"/> <TEXT TYPE Action="0" Text="%Line[%x%]%<ENTER>"/> <VARIABLE MODIFY INTEGER Option="\x07" Destination="%x%"/> <TEXT TYPE Action="0" Text="<ARROW DOWN>"/> <DELAY Flags="\x01" Time="0.1"/> <TEXT FILE END PROCESS/> Terry, UK
  15. Please use the Code tool (<>) to show us your macro’s - Commands (right click menu) - Code (Ctrl+c)
  16. Could you give a few examples of windows that resist closure?
  17. Morning Alan, Nice! And that cycling idea could be used quite widely to advantage in a variety of macro applications I suspect. With more numerous options, another hotkey (or two) could be used to toggle a brisk (or fast) speed, with Space to stop it at the correct choice. But I think that tapping one of five keys would be easier. And a small strip of laminated card showing the choices would do just as good a job as my image method, without sacrificing screen space. A card with #00 to #99 shortkeys, scoped to this app for a hundred choices would open more versatile possibilities. Terry Sunday 30 August 2020, 0808
  18. Sure it can. In fact I wrote a macro to test the approach before my earlier post. It displayed the text of the selected choice in a TBD. I stopped there though, as it really did seem overkill compared with simply clicking a hotkey. It was just a series of seven IFs. After waiting for a mouse click, the mouse positions were captured. Five IFs tested for the Y coordinate being within each of the text areas. The other two checked if that value was beyond the top or bottom of the whole text area and if so alerted the user and asked him to click again. An obvious restriction is that no other left mouse clicks can occur. So for example responding to theTBD in my test macro had to be by pressing Enter rather than clicking OK. Of course, that shortcoming could be avoided or minimised by right clicking (or less comfortably middle clicking) the text area.
  19. Right click outside the text. An alternative for selecting the para is <Ctrl+Shift+Arrow Down>
  20. Like Cory, I’d simply go for five macros. Maybe activated by shortkeys if focus is already in the target field and that’s easier for your user. Perhaps I’ve missed something but, if it really is just a matter of choosing one of a mere five options, which have been in use for a long time, then it seems a relatively trivial challenge. If, as I think you implied, he favours mouse over keys then perhaps an alternative of clicking in an image that’s always on-screen?
  21. Did you try it? You need to read the comments in my original macro more thoroughly. “ // Create a variable with a name of your choice. (Note that I prefix mine with a 't', 'n', etc, to identify the TYPE of variable, but that's a personal preference.)” Re your latest query, you’re on your own now to apply in Facebook what you’ve learned about setting variables and using Repeats.
  22. An exported macro preserves its variable definitions, which is why you were able to run it as it stood. But when you are writing a macro - and that includes pasting in code that you've copied from elsewhere, such as from a forum post - then all variables have to be defined. For example, if I paste your code into a fresh macro and just run it with no further attention I get an error: "Line 11: Debug Error: Undefined variable or the variable is the wrong type" MX Pro offers help in defining variables. When you're writing a command with a variable it will alert you if it's undefined and offer to do so for you. So after pasting a macro you should step through and open each command that includes reference to a variable, to check and get that automatic definition. As for the percentage signs, that's how MX Pro recognises a string as a variable. You enter the name as normal text and MX Pro enters the % signs. -------------------- Are you making full use of MX Pro's excellent Help? For example:
×
×
  • Create New...