Jump to content
Macro Express Forums

joe

Members
  • Posts

    1,002
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by joe

  1. Hello Lars! Could there be another application running that is not Macro Express that may be intercepting the keystrokes? Maybe something that runs in the background? Does this happen on another workstation? Is the problem centered around particular ShortKeys or any ShortKey? When the ShortKeys are knocked out, do HotKeys still work?
  2. Individual cells in a spreadsheet apparently cannot be captured to a Window Control, so that option is out. Maybe you could do something behind the scenes instead. Create a scheduled macro that: Launches or activates the spreadsheet Goes to a particular cell Stuffs the clipboard with the value Runs another macro based on the value Waits for the next scheduled time to fire This could be done with having the spreadsheet invisible and there are several different kinds of schedules available depending on how often, and when, you want the macro to run.
  3. Hello dutch4fire! A macro can be set to fire automatically when a particular window title or window control gains focus. Look at the Activation section within the Properties tab of a macro.
  4. Hello conniek! What is Metroscan? What are you attempting to do?
  5. Hello! As Paul says, one of the logical constructs would seem to fit the bill. Here are a couple of examples: // Highlight target cell and then: Clipboard Copy Variable Set Integer %N1% from Clipboard If Variable %N1% = 0 Macro Run: Macro A Else Macro Run: Macro B End If // Or using a Switch / End Switch construct: Clipboard Copy Variable Set Integer %N1% from Clipboard Switch (N1) Case: 0 Macro Run: Macro A End Case Case: 1 Macro Run: Macro B End Case Case: 2 Macro Run: Macro C End Case Case: 3 Macro Run: Macro D End Case End Switch Hope this helps!
  6. Hello Greg! When you are looking at the list of topics in a forum, there is a link at the bottom of the page near the center. that says Mark this forum as read. This is so you do not have to read through all of the messages. Also, please note at the top of the page (towards the right) the link that says View New Posts. Experiment a little with these links. And finally, you can set your controls to email you whenever somebody posts a new topic to the forum and/or posts a message to a topic of interest.
  7. Hello Renee! Try switching these two lines around.
  8. Hello Linda! I think that you are confusing the use of the Save and Restore commands with the ability to pass variables from one macro function to another. It appears that I added to the confusion with my previous post. Let me try to explain. Variables are global in scope. They are not passed between functions (er, macros) they are inherited. If, for example, you set %D99% to 3.14159 somewhere in a function that is way down the calling chain then you will see that %D99% will still be 3.14159 when you get back up to the top-level caller. Inheritance ... down and up the chain. But, forget the Macro Run command for the moment. The Save and Restore commands can be used within a single function, too. If you set %D99% to 3.14159, then Save it, then set %D99% to .70711, then Restore variables, %D99% would be back to 3.14159. The only thing that the Save command (or any variation of it) does, is to copy the current variables into Macro Express memory space, allowing you to change them to something else temporarily. Variable Set Decimal %D99% to 3.14159 Variable Save All Variables Variable Set Decimal %D99% to .70711 Variable Restore All Variables //D99 is now back to 3.14159 Using a variation of the Save and Restore command for just integers does not affect any other type of variable. This is true for any of the variations. I can only guess that something else happened to erase them. The only book written about Macro Express that I am aware of is the one that I wrote ... Macro Express Explained ... so I heartily recommend it! ... and guess what chapter I wrote first. Right ... Variables
  9. Hello Linda! There is no complex behavior associated with the built-in Save and Restore Variables commands. All variables in Macro Express are global in scope. Once defined, they are accessible to any macro, called or calling, in any library, within the same run session. This means that for every Save Variables command, there must be a Restore Variables command before another Save command is invoked or else your saved variables will be overwritten in memory. For a company like ours that creates reusable, callable macro functions, this was not going to work, so we created our own set of Save and Restore functions that are incorporated into almost every function within our PGM Functions Library. This allows us to use the Macro Run command without ever having to worry about overwriting existing variables. One thing that is overlooked with the native Save and Restore Variables is that they can be used between sessions. If, for example, one of the last lines in a macro session is to Save Variables then you can Restore Variables by placing the command at the beginning of the first macro run in the next session. Another thing that is possible with the Macro Express memory space is to pass values to it using command line arguments with MeProc.exe or MacExp.exe.
  10. Hello, The example in the help file uses the "<tab>" word to represent the invisible ASCII( 08 ). So, your test should not include the representation but the actual character. MC<tab>98 SE, 2000<tab><tab>Athlon<tab>750 MHz<tab>256 M<tab><tab>83 I have attached a sample file. TabDelimitedSample.zip
  11. Hello Greg! When you say that you are getting old threads, are you referring to this new community forum or the old newsgroup?
  12. Hello Ernie! A playable macro is simply a standalone, external text file. Generating one from a macro in the library is the same as having two copies of the same program. If, after exporting one, you make a change to the macro in the library it will have no effect on the copy. If you want to keep both of them in synch then you must either change both of them, or edit the one in the library and then export it, or change the playable and then import it.
  13. Hello etj01! Good question. Thanks for posting it. Event logging allows you to append text to a text event log, text error file, or anything else that you want to call it, without having to turn on the native Macro Express error logging feature, which has limitations. When you installed the PGM Functions Library there were, in addition to others, four Registry keys created: HKCU\Software\Professional Grade Macros\Files\EventLog HKCU\Software\Professional Grade Macros\Folders\Data HKCU\Software\Professional Grade Macros\Parameters\LogEvent? HKCU\Software\Professional Grade Macros\Parameters\Event These four keys are related to the { Program - Log Event } function and are handled by it, and other functions as well. The third one holds an integer and the others hold a string. The EventLog key is the filename that is being appended to. It defaults to "PGM Event.log", but can be changed to any valid file name that you want. The Data key is the folder that the event log is located. The LogEvent? key is a way to turn logging on and off. 0=off and 1=on. If it is off, then no events will be written to the log, no matter what. If it is turned on, then your designated events will be recorded in the log when they happen. More on this later. The Event key is the event string that gets written to the log. Again, this is a string that you create in whatever macros that use logging. Your choice. You tell the macro what to log, and the { Program - Log Event } function writes it to the file when called. Let's make an assumption or two here. 1) Event logging is turned on and 2) the log is set to its default location and name. Here is an example that you can place at the beginning of any macro to log that the macro has fired: 01 Set Variable %T9% to "Name of Current Macro" 02 If Macro "{ Program - Log Event }" Enabled 03 Write Registry String: "Event" 04 Macro Run: { Program - Log Event } 05 End If Line 01 sets the T9 string to what you want to record in the log. In this case, it is the name of the macro that is running. Line 02 tests that the { Program - Log Event } function is enabled. If it is, then the event string in variable T9 will be appended to the event log. This is another way to turn off logging. Simply disable the function. Line 03 writes the event string to the Event key in the Registry. Line 04 calls the logging function. Line 05 is self explanatory. This is all there is to using the { Program - Log Event } function. You can place it anywhere, for anything, as many times as you want in any of your macros. We use it for: The start of a function The end of a function To record that a certain section of code was executed Debugging unattended operations Time stamping of events for online downloads Many other uses Hope this explanation helped! I've attached the sample from above. You must have Macro Express 3.5 and, oh yes, the PGM Functions Library LogEventSample.zip
  14. Hello lovlov! Would you mind exporting these to playable (.mxe) files, zipping them, and then attaching the .zip file? They look good and it would save others time if they wanted to use them.
  15. joe

    Open File

    Hello ph2! You will need to be more specific. What file? What program?
  16. Hello Renee! If the macros run, I doubt that the library is corrupted. Try printing 1) to a different printer and 2) a different library (.mex). Also, try printing or editing the one that comes up all the time. See if any errors appear.
  17. Hello cbv! Do you mean send keystrokes to a cmd window? If so, then yes. I have done it when wanting to use DOS commands inside a cmd window.
  18. Hello Teddy! Here is a short macro that will do the trick: Variable Set Integer %N1% to 0 Text File Begin Process: "email2.txt" Variable Modify Integer: Inc (%N1%) Text File End Process Variable Set Integer %N2% with a Random Number Text File Begin Process: "email2.txt" Text File End Process I've attached the .mxe file. The first loop counts the lines in the text file and saves the value to N1. Then the N1 variable is used to set the maximum value for the Random Number command, which creates a random value for N2. The second loop simply processes a single line in the text file using the N2 variable, saving the single line to the T2 variable. RandomLine.zip
  19. Hello Teddy! Can the text in the window be copied and pasted to the clipboard? If so, then you can create a string variable from the clipboard and do your tests on it.
  20. Hello Phillip! I am unsure of what is displayed in the window. Is the list that shows up in the window a list that can be copied and pasted into the clipboard? If so, then your macro can test for an empty clipboard if the list is empty.
  21. Hello Renee! You can sort macros by their last modified date (ascending or descending) from within the Macro Explorer window by clicking on the Modified column header. Now that they are sorted by date, highlight the ones that you want to import into another .mex library. Right-click in the highlighted area. Choose "Export | Export to Macro File" from the menu that appears. You will be prompted for a .mex library name. Type in any temporary name you want and a new .mex library will be created containing the highlighted macros and the standard Macro Express system macros. This gives you a library file you can import into any of your other .mex libraries. I like your suggestion on directly exporting and importing macros by their modified date and time (without the need for this interim step). Why not suggest it to Insight Software? Simply choose "Options | Configure Bug Reporter" from the Macro Explorer window and then click on the "Request a Feature" link.
  22. Hello Renee! Are you printing a list of macros (File | Print Macro List) from the Macro Explorer window? It should only print one line per macro name. Not one page per name.
  23. Hello Renee! It sounds like you will need to have someone with administration rights uninstall the existing Macro Express, and then reinstall the new version. I have never installed Macro Express without administration rights, so I am not sure what went wrong. Have you tried just reinstalling the 3.4 you mentioned?
  24. Hello Linda! When you view a macro in the Direct Editor, or any text editor, you are looking at it in its natural state. This is the macro. When viewing it from the Scripting Editor, you are seeing a more friendly, human representation. But, it is not the real thing. So, the Scripting Editor is actually the "pretty-print" interface that you referenced. You cannot add formatting to the Direct Editor. Remember that each editor is looking at the same macro in two different ways. When you make a change in one, it will appear in the other (if you save the change). Also, just so you know, you can use an external text editor. But again, you will be working with the macro in its natural state.
  25. Hello Pete! What happens if you turn both caching options off?
×
×
  • Create New...