terrypin
Members-
Posts
2,230 -
Joined
-
Last visited
-
Days Won
23
Content Type
Profiles
Forums
Events
Everything posted by terrypin
-
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
-
Detect mouse button state
terrypin replied to wallaceprime's topic in Macro Express and Macro Express Pro
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. -
Shortkey macros may or may not execute
terrypin replied to Ken Granger's topic in Macro Express and Macro Express Pro
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 -
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.
-
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)
-
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?
-
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
-
Could you give a few examples of windows that resist closure?
-
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
-
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.
-
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?
-
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.
-
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: