Jump to content
Macro Express Forums

jrgreenman

Members
  • Posts

    77
  • Joined

  • Last visited

Everything posted by jrgreenman

  1. Thanks Kevin. Stan got back to me and solved the problem. For everyone's reference, here's what he wrote: ======================================================================== Hi Jace, I made one modification to your macro, adding a trim command after the Variable Set String. This seems to make it work correctly. Variable Set String %Customer% from the clipboard contents Variable Modify String %Customer%: Trim Excel adds a bunch of hidden characters to a cell when it is copied to the clipboard. Trimming the variable strips the extra hidden characters. I noticed when I did the steps manually that pressing Enter twice pasted the text. One of the hidden characters may have been doing something similar to an Enter. Thanks, Stan ======================================================================== Thanks to everyone who contacted me to help out.
  2. Hm. Bounced back: "Recipient address rejected: Access denied" Re-sent to "info-at-wintools-dot-com". So far, so good.
  3. This is the only reporting mechanism I am aware of: http://www.macros.com/bugreport.htm Is a "support request" mae through some other web page?? Regarding the question on the GoTo box, I have created named cells so that I can search for data (like a customer name), expand my selection (which I don't do in the test code I uploaded) and copy the expanded selection to the destination named for the customer it applies to. So I'm using the customer name for double duty, both as the target of my search and the named cell that is the destination of the copied data. It helps keep my code data-driven and compact. It will be more obvious if you take a look at the test.xls spreadsheet. You'll see that Copy (and Main) is the name of a cells as well as the literal data being moved around.
  4. Thanks for the reply, Cory. A good suggestion, but no joy. I even replaced <CTRL>g w/ <F5>, but still see the same behavior. From my initial post, note that the macro works as expected if I merely invert the last two lines of code. That is, if I type out the string literal "Copy" instead of the contents of the variable %Customer%, the macro works fine. I think this is some kind of bug in MEP related to the clipboard contents and typing out variables. Will submit a bug report.
  5. I have an spreadsheet (xls, but opened in Excel 2007) for which I am copying data from one sheet to another (attached). The data "Copy" is in a named cell called Main (on MainSheet). The destination is a named cell on CopySheet called "Copy". Here's the code: ======================================================================== <WINDOW ACTIVATE Title=".xls [Compatibility Mode]" Exact_Match="FALSE" Wildcards="FALSE" _IGNORE="0x0006"/> <CLIPBOARD COPY/> <VARIABLE SET STRING Option="\x02" Destination="%Customer%"/> <TEXT TYPE Action="0" Text="<CTRL>x"/> <TEXT TYPE Action="0" Text="<CTRL>g"/> <WAIT FOR WINDOW TITLE Title="Go To" Partial="TRUE" Wildcards="FALSE" Indefinite="TRUE" Hours="0" Minutes="0" Seconds="0"/> <DELAY Flags="\x02" Time="300"/> <TEXT TYPE Action="0" Text="%Customer%<ENTER>"/> <TEXT TYPE Action="0" Text="Copy<ENTER>" _ENABLED="FALSE"/> ======================================================================== As written, the code should copy BUT NOT PASTE the data into the destination cell. But it does paste it! Curiosities: 1. When I execute the same keystrokes manually, data is not pasted. 2. When I invert lines 9 and 10, data is not pasted (even though %Customer% holds the string literal "copy"). I'm stumped. Why is MEP automatically pasting the data into the destination sheet?? Jace test.zip
  6. I have a bunch of macros (hundreds) for which I use shortkeys to type longer clips of text, and am trying to figure out if I can combine them into a single macro with multiple activations of different shortkeys. Based on my reading here, that's currently not possible. So: a ) I'd put forward another vote to allow multiple different shortkey (or multiple different instances of the same activation type) to be permitted, and: b ) The second part of the solution to my many-one-line-macros is that I'd like to be able to discern the actual shortkey (or hotkey) used to invoke the macro and then do a Switch on it. Even if "a)" is implemented, it there (or could there) be a way to know which shortkey/hotkey invoked a given macro so I could test and branch based on it?? Thanks. Jace
  7. I'm using version 4.0.2.1 and notice that not all variables show in the "Variable Values (Debugger)" window. I use several integer variables from the legacy array N[], but when I hit a breakpoint, the only category of variables shown is "Text". No integers (nor environment variables, for that matter).
  8. I'm having some trouble with PGM and MEP 4.0.4.1. When I converted my old mex file, I guess it converted all the PGM macros as well. But now I'm getting an occasional cryptic error message (will post on that another time), and some behavior from {PGM Function} where it blast out crazy strings of character like this: \x3c\x52\x45\x47\x57\x49\x4e\x54\x3a90\x3a\x48\x4b\x45\x59\x5f\x43\x55\x52\x52\x45\x4e\x54\x5f\x55\x53\x45\x52\x5c\x53of\x74\x77a\x72e\x5c\x50\x72ofe\x73\x73io\x6ea\x6c\x20\x47\x72ade\x20\x4dac\x72o\x73\x5c\x53\x77a\x70 ...literally forever. I tried to uninstall/reinstall PGM, and although the app disappears, the PGM macros are all still in my mex file. And they can't be deleted because they are password protected. The PGM site says that, while PGM is optimized for ME3, they "can be imported" into MEP. A little more info: 1. PGM was actually working more-or-less ok w/ MEP 4.0.2.1. The crazy characters and other behaviors started when I installed MEP 4.0.4.1 2. I still have ME3 installed because there are some macros I use that I have not ported over to MEP yet. Might having ME3 installed affect how PGM behaves??? Help... Jace
  9. I have a macro that attaches a named file and then deletes the file. Even though the "file delete" command comes after the keystrokes that attach the file to the email, sometimes the file gets deleted before the attachment is actually attached. I've added in various delays to combat the problem, and they usually work, but not always. Does anyone know of a reliable way to detect when a named attachment is actually attached to an email? If I could test for that, I could put in a "wait" or something until I know for sure the attachment is actually attached. Thanks. Jace
  10. Yeah, that's what I've done so far. I use Win+P to invoke Gadwin Printscreen to shoot a copy to the clipboard and Win+Ctrl+P to shoot a copy to a file. But those hotkeys are not as intuitive as "Prnt Scrn" and Ctrl+"Prnt Scrn".
  11. I can see the argument, but I'd also like to map Ctrl-PrntScrn and Alt-PrntScrn to other things. And if one chose not to map the "Prnt Scrn" button at all, it would still perform whatever default function the OS had for it. 3rd party utilities that make use of the Prnt Scrn button (I use the free Gadwin Printscreen utility) allow the user to map combinations of Prnt Scrn to do various things. I'd just prefer to do the mapping and manage the third party app via MEP.
  12. I can't seem to find "Prnt Scrn" as an available hotkey in the list. Is that an omission or by-design?
  13. Just got a screaming new computer and upgrades from Office 2003 to Office 2007 at the the same time. I still have my old PC w/ Office 2003 installed and have seen some differences in the way macros run on the new fast machine (w/ Office 2007) and the old slow machine (w/ Office 2003). I've been inserting delays here and there to try and make things work better, but one of the things I think would be very helpful is if I could slow ALL of ME3 down, all keystrokes, all mouse clicks, for all macros. I've already set the global Text Type Delay preference to 5000 microseconds. That has helped some. But there are still plenty of odd behaviors that show up on the new machine, but not the old (running the same macros)> Does ME3 support some kind of global slow-the-heck-down setting? Thanks
  14. That's what I was afraid of. I guess it is tolerable in my example of 1..5 and 6..10, but obviously it doesn't scale well. Try 1..1000. Thanks for the clarification though.
  15. Does the Case command support some syntax to check for a range? Something like: Case: 1..5 ...code block 1 Case 6..10 ...code block 2
  16. Anyone ever submit a Wait For Web Page macro for Firefox??
  17. I see the same behavior Paul does vis a vis persistent variables. At the end of my macro I do: Clear Variables Variables Save to wipe everything out.
  18. Got a new question. Well, it's kind of related and since we're already gathered here, why start a new thread? Anyway, I now notice that if I use meproc (yes, I concede passing variables this way is fewer lines of code) to run a macro from VBA, that the meproc process exits upon _starting_ the macro. That is, it runa asynchronously. If my VBA app depends on the results of the macro after it concludes running, I'm outta luck. My app races ahead even though the macro is still running. Is there a way to tell meproc to run synchronously, that is, NOT to exit until the macro concludes execution? Jace
  19. Kevin, What's that last thing at the end? I don't see any documentation for the /D switch. If that is intended to be an example of passing a decimal variable, shouldn't it be /VD? And if so, what's the second colon (betw the 22 and the 23)? Seems like the last parameter oughtta read: /VD6:22.23 Yes? No? Jace
  20. randallc: Well, anytime you have to write something to the hard disk, that's relatively slow. But it's still milliseconds (instead of microseconds). But I have a consicientious objection to it because it's inelegant. Same w/ passing stuff thru the clipboard (which should much faster in any case since it does not involve writing to disk). jowensii: I sent it to Kevin Heaton who is packaging it up for public consumption, but here's what I'm using: Again, starting MeProc.exe involves the hard disk. And if, for example, your VBA code is looping through a long file processing each line, you could be invoking MeProc.exe a zillion times. But in many cases, and for a non-real-time application, I'm sure it's perfectly serviceable. Jace
  21. Here here!!! I got mine working too. Thanks Kevin. Same question. You guys cook up a way to pass parameters without all the ASCII file nonsense or shoving stuff into the clipboard and parsing it out again in the macro? Thanks. Jace
  22. Well, I finally found the ASC function in VBA and wrote this sub: =================================================== Sub RunMacro(Command As Long, MacroName As String) 'Runs a macro express macro Dim hwnd, I, Result As Long hwnd = FindWindow(vbNullString, "Macro Express Player") For I = 1 To Len(MacroName) Result = PostMessage(hwnd, Command, Asc(Mid(MacroName, I, 1)), 0) Next I Result = PostMessage(hwnd, Command, 0, 0) End Sub =================================================== But Macro Express does not repspond. Ideas anyone??
  23. I've been trying this in VBA (Microsoft Access) but also have not yet been able to get it to work. I'll repost here if I ever get it figured out. I did find this in the KB which indicates the characters streamed to Macro Express should be the ordinal values of the characters in the Macro nickname: http://www.macros.com/faq//4.23.html Looks like they are casting the character to its ordinal value. I haven't yet figured out how to do that in MS Access VBA. Jace
×
×
  • Create New...