Jump to content
Macro Express Forums

dgehman

Members
  • Posts

    27
  • Joined

  • Last visited

Everything posted by dgehman

  1. Ah - would it were Word. If that makes sense. The authoring environment uses its own home-built word processor, where the sequence really is to select the whole word (double-click), then hit CTRL+k. But I'll be able to use your ideas and post when I'm working with Word. I wasn't aware of the cursor-anywhere-in-word shortcut. Thanks!
  2. Amazing posts - thanks again, acantor and Terrypin Actually, it's not a book, but one topic from a Web-base help file as created in Help+Manual, one of the better old school help authoring tools (old school, meaning not browser-based & online, but installed as a program in your local computer). Long story about to follow... sorry... H+M has an input pane outside of the main window, the main one being where you enter the topic text & graphics. This secondary pane is labeled "keywords." When the help file is published as Web-based HTML output, keywords are merged into an accompanying index and search database that allows the viewer to search on terms in the help file. Putting the single-letter rubrics and the page numbers into the Keywords pane would make for really confusing results when a viewer searched on, say, "array" -- the page numbers would be a distraction, a puzzle. The particular topic in my original post is a long and highly complex reference topic for a software function catchall (with many functions detailed) that's part of the development language of my company's rule-based design/mechanical engineering software. There are several similarly long topics that I need to index -- that is, extract the keywords. Doing this manually -- selecting each word and hitting CTRL+k for each) -- gets old and can get confusing, So I bought a copy of PDF Index Generator... publish the long topic as a PDF... run it through PDF Index Generator... output it as a text file. The Macro Express function will be to strip the one-letter rubrics and the page numbers, so I can simply copy the text file and drop it into H+M's Keyword entry pane. Described this way, it begins to look even to me like madness... but it will still be better than manually scouring through some very long topics to mark keywords. Besides, I like to watch computers work. (It might be more sane just to record/write a simple Macro Express function to double-click the word where the cursor is placed, then keyboard (Text Type) CTRL+k. But that still won't stop my mind from wandering or losing track and creating duplicates.)
  3. Thanks! I'd forgotten how helpful this place could me. Next step for me: parse your parsing -- very much appreciated.
  4. Exactly right. Poking through docs used to be fun for me... today, it's more like work. I haven't been active with Macro Express for literally years - I remember coming away with the sense that you could do anything with it. Maybe you meant NEVER contains? Luckily, it does have that attribute - or non-attribute, I guess -- no comma, anyway.
  5. Thanks! - never would have thought of the problem as solvable via variable + deletion. I'm going to have to learn how to search through the help file. "Parse" & "Parsing" didn't bring many hits.
  6. I need to clean up a text file that is an index (like a book index, an alphabetical list of words and their page numbers). I want to strip out the single alpha heading (a, b, c, d, etc) and the page numbers. The output can have one or more page numbers and ranges (e.g., ", 21", after "abs" and ", 10, 15, 17, 19-22" after the word "array" in the example below). Example: The alpha head is always one letter. The individual index lines are comma separated. The ideal result for that example would be: To remove the single-letter alpha head: Is it possible to search for a single letter [a-z] + CR, then delete that letter + CR? Is there a better way? To delete the page numbers... and here, I'm stuck -- need problem-solving approaches and/or any suggestions.
  7. (Thanks for the answers.) And, yes, it runs after (of course) changing the paths to the files involved. It's a great learning experience, and it's going to be even better, since I want to modify the area to be deleted (adding a few lines previous to those I underlined in the full HTML page example in this thread). I do wish that Text File Begin Process had an option for the currently open file, to make the routine generic. I expect that this can be done by expressing the path of the file -- the file that I want to be processed -- as a variable. Maybe. And it would be more fun if I could see the file (in Notepad++) at it is being modified. It took me a minute or two to figure out it's a black box operation and that the output file was done and ready to look at. BTW, your macro takes less than a second to create the new output file from the 255-line original file (this, on a 10-year-old Dell Precision T3500 with a single, quad-core Xeon CPU).
  8. Ah - I thought that the code snippets included in the answers above had been saved as MEX, and that the contents had been pasted from the MEX file. By just now opening an MEX in Notepad, I see that a MEX file is formatted far differently than the content I saw above in the quote panes. That leads to a couple more newbie questions: What kind of export created the code snippets above? Or are they simply the result of cutting from the direct editor and pasting into the forum quotation pane? Why are these code snippets expressed in two segments/example blocks containing the same actions? Is this a convention that evolved for forum postings? (By "segments" I mean that each quote block above contains the same information in two formats. These formats correspond to the two view types that can be toggled in the direct editor, type (1) where commands are in angle brackets ["script"]; type (2) where command lines are plain text ["ASCII".])
  9. Samrae, thanks. I've been through the scripting docs and skimmed the variables docs, but didn't happen on the information you've given me. (I'm sure it's there somewhere, now that I know what to look for). It didn't occur to me that vslues were pre-evaluated, thinking that evaluation happened at runtime. Interesting. Probably speeds up execution measurably. I hadn't gotten as far as addressing how the files would be brought onto the virtual table for surgery. I'll definitely look into the HTML command(s).
  10. OK. (Again, I'm now working in ME6 Pro) So much to learn, so little time -- I've copied what I'll call the 2nd iteration of the script in Terrypin's post above - the section of the code quotation that begins, "<COMMENT Value="Set the EOL..." etc. I pasted it into ME6 Pro's direct editor. When I try to save the .mex file, I get a series of pop up errors: The variable "CR" is not current defined (but it IS in the script) Same for variables "LF" and "CRLF", "tAction", "tLine", "tOutput" As far as I can see, all of these variables are in fact declared. Should I be copying and pasting what I'll call the first iteration, the portion beginning, "//Set the EOL character for later use." and extending through to "Variable Modify String: Save %Output% to... etc."?
  11. Thanks, Terrypin. Wow. This is one impressive forum. FYI, all - huge thanks to everyone. (And I've changed my colors: now using ME6 Pro.)
  12. @acantor, once again I'm in your debt... many thanks! Just know, "can be easily modified" doesn't apply to me, at least just now. My last stint at creating code was on my Commodore 64 and it was pretty much brand new at the time...
  13. Rats. @acantorME5 doesn't have Variable Set Boolean Little details like this and Split String, Join String (and possibly much more) weren't included in the product comparison chart on https://www.macros.com/compareproducts.htm -- result: I bought the wrong version. I've emailed sales/customer support to put into motion my move to ME6 Pro. Frankly, I can't imagine doing any coding of anything without string handling and Boolean operations...
  14. acantor, thanks! I'll parse through while scanning the comments and thumbing through the ME5 help to (maybe) see what's going on. Very much appreciated.
  15. Sure, the whole file, because I don't know what you're looking for - unfortunately it's on the long side. I've underlined the section to delete:
  16. I don't see Split String - is it perhaps a Pro-only command? EDIT: Yes, Pro only (comparing the 6Pro help with 5 help)
  17. ME5 my level: beginner Objective: select and delete a single entire HTML section, running from <section> to </section> Complication: the number of HTML lines between these two key words varies from file to file, so I can't just SHIFT + down-arrow a fixed number of times to select the code prior to DELETE. Is there a SELECT or SELECT UNTIL command (I don't see one)... in this case, I'd select until reaching the ">" in "</section>" It's always a relatively short number of keytrokes that make up the section content... I'm not seeing an IF command that looks for specific characters -- but I see IF CLIPBOARD -- should I just pump </section> into the clipboard? Absent a SELECT command, how do I select a variably-long section of character content?
  18. Is it possible to send a macro as a standalone executable to people who do not have Macro Express? If so, do I include the 3MB MeProc.exe, or can I just use the 156KB MeProc.exe? Dave
  19. Thanks, Kevin. Part of this was operator error -- I didn't know you had to use a prefix or suffix. On reflection, there'd hardly be another way to do this.
  20. [reply posted in wrong thread, removed]
  21. I've tried searching the forum for this, but no luck. Is there a way to activate a macro with ShortKeys? I've tried -clicking on the page (but not on a link or text box) and typing the shortkey -typing the shortkey in the address bar The macro is application specific to IE. My IE version is 6.0.29 SP2 Dave
×
×
  • Create New...