Jump to content
Macro Express Forums

terrypin

Members
  • Posts

    2,230
  • Joined

  • Last visited

  • Days Won

    23

Posts 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. 23 hours ago, Samrae said:

    Stupid question: Does it help if you restart Macro Express and/or Windows?

     

    My macros slowed waaay down when we switched from Norton Internet Security to BitDefender. (I cannot wait to get rid of BitDefender. 🙁)


    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.

  3. 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.

  4. 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)

  5. 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

  6. 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

     

     

  7. 43 minutes ago, acantor said:

     

    I'll post my solution soon, which is very different than any solution proposed so far.

     

    Terry, I like your idea of the clickable images of the texts! Can it be done in Macro Express?


    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.

     

     

  8. 1 hour ago, rberq said:

    Well, you learn something every day.  Thanks, never knew that. 

    Once the paragraph is selected, mouse operations seem to be affected.  Clicking somewhere after the selected paragraph adds the intervening text to the selection.  Haven't figured out how to turn it off once it has been turned on. 

     

    Right click outside the text.

     

    An alternative for selecting the para is <Ctrl+Shift+Arrow Down>

     

  9. 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?

    List-1.jpg

  10. Quote

    does this only apply to ME Pro?  I'm usnig the regular 5.0

     

    Did you try it?


     

    Quote

    What about the t before FileName?  -  %tFilename%


    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.

  11. 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:

     

     

    UsingHelp-Variables.jpg

×
×
  • Create New...