Jump to content
Macro Express Forums

ejs

Members
  • Posts

    59
  • Joined

  • Last visited

ejs's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I'm using Macro Express 3.7a. Is there any way that I can pass control class information between macros by saving/restoring the information to an environment variable? I know that I can do this for control text information by using the following: MACRO 1 variable get control class [to copy the class information from the C variable to a T variable] variable modified string [to copy the class (now text) information from the T variable to the environment variable] MACRO 2 variable set string [to read a value from the environment variable into a T variable] variable set control text [to copy the value of the T variable to the C variable's text] But I don't see a Macro Express command "variable set control class" which is the counterpart for "variable set control text". It seems strange that Macro Express allows text information to be transferred back and forth from a control variable to a text variable, but that Mac Express only allows class information to be transferred one-way from a control variable to a text variable. You should note that macro 1 does not call macro 2. These macros run independently at different times, so it is not as if macro 2 automatically has all of the variables defined with the values used by macro 1. Macro 2 starts with all variables having no values. My objective is to preserve variable values between completely separate macro runs. The only methods that I know for passing variable values between macros that run independently is to use environment variables or to use variable save/variable restore. I would rather not use variable save/restore, so I appreciate any suggestions on how to make this work using environment variables or some other method that I overlooked.
  2. It has been a few months since I made this change, and I have not noticed the problem anymore, so this must have been the cause. Thanks.
  3. Terry, I primarily use Autohotkey to write trivial scripts, just so Autohotkey intercepts the hotkey and then calls the macro I have written In Macro Express. So I cannot answer questions about writing more substantial macros in Autohotkey, and anyway this would not be the right thread for discussing substituting Macro Express with Autohotkey. You should take your Autohotkey questions to the autohotkey forum at http://www.autohotkey.com/forum I can answer questions that relate to the interaction between Autohotkey and other programs like Macro Express. The reliability has been fine, after I learned how to properly write the autohotkey script to avoid certain intermittent problems. Here are some tips: 1) Be careful that you do not define the same hotkey in both programs, 2) Use SetTitleMatchMode, # to set whether you want a full match or partial match on window titles you can put a general setting at the top of the script, to apply to window title matches for the scope of hotkeys. You can also change the type of match within the macro itself, but then I change it back to the general setting at the end of the macro. 3) use the KeyWait command to wait for the hotkeys to be released. The statements go immediately after the hotkey line in the script. For example, if the hotkey is control+alt+c (where Iwas using keys on right side of keyboard), I would put the following two lines in my macro. Otherwise, I was having a problem that the right alt and right control keys would sometimes get stuck in the logical down position. THESE ARE AUTOHOTKEY STATEMENTS FOR USE IN AUTOHOTKEY SCRIPTS. DO NOT USE IN MACRO EXPRESS MACROS. KeyWait RControl, L ; Wait for Right Control to be released. KeyWait RAlt, L; Wait for Right Alt to be released. 4) the run statement in Autohotkey does not necessarily wait for the new window to appear and then activate that window. So I explicitly use a wait for window command and activate window command. Also, executing the run statement in Autohotkey may temporarily activate an invisible window before activating the real window; this does not cause any problems and is not even apparent to the user until you try to ALT TAB to the previous window and discover that one ALT TAB is not enough. I solved this behavior by getting the name of the active window before executing the run command, activating that window after the run command, and then activating the new window; this resets the window order so the invisible window is no longer the previous window. THESE ARE AUTOHOTKEY STATEMENTS FOR USE IN AUTOHOTKEY SCRIPTS. DO NOT USE IN MACRO EXPRESS MACROS. WinGetActiveTitle, Title; get title of current active window [Run macro express macro or other program] SetTitleMatchMode, 3; set window title match to exact match WinActivate, %Title%; activate the current active window WinWait new file - metapad; wait for new window to appear WinActivate; activate the window with the title matching the last title used for a window title function SetTitleMatchMode, 2; set window title match to partial match return
  4. Here is how you can activate Macro Express macros using hotkeys that Macro Express does not inherently support, such as backspace or keypad enter. There is a free downloadable macro program called Autohotkey (www.autohotkey.com), which I use simultaneously with Macro Express. I prefer to write my macros in Macro Express because it has an easier interface, but if I want that macro activated with a hotkey that Macro Express does not offer, then I write a trivial macro in Autohotkey that runs the Macro Express macro whenever the hotkey is pressed. Here are the Autohotkey scripts to run Macro Express macros for the hotkeys you asked about. You just need to replace "macro express macro nickname" with the nickname of your macro, and possibly adjust the path to the exe file on your system. THESE ARE AUTOHOTKEY STATEMENTS FOR USE IN AUTOHOTKEY SCRIPTS. DO NOT USE IN MACRO EXPRESS MACROS. ; hotkey is Backspace Backspace:: KeyWait Backspace, L Run C:\Program Files\Macro Express3\meproc.exe /Amacro express macro nickname return THESE ARE AUTOHOTKEY STATEMENTS FOR USE IN AUTOHOTKEY SCRIPTS. DO NOT USE IN MACRO EXPRESS MACROS. ; hotkey is NumpadEnter NumpadEnter:: KeyWait NumpadEnter, L Run C:\Program Files\Macro Express3\meproc.exe /Amacro express macro name return If you want to limit the scope of the Autohotkey hotkey to specific active windows then: i) put the following line as the very first line in your script file (so that it supports partial matches in window titles) THESE ARE AUTOHOTKEY STATEMENTS FOR USE IN AUTOHOTKEY SCRIPTS. DO NOT USE IN MACRO EXPRESS. SetTitleMatchMode, 2 ii) use #IfWinActive, windowtitle as the first line in the macro subroutine (before the hotkey line) if you want the hotkey to be active only if a window with the specified window title is active. Put #IfWinActive as the last line in the subroutine after the return. For example, if I want the backspace hotkey to be active only in windows named Notepad or file manager THESE ARE AUTOHOTKEY STATEMENTS FOR USE IN AUTOHOTKEY SCRIPTS. DO NOT USE IN MACRO EXPRESS MACROS. #IfWinActive, Notepad Backspace:: #IfWinActive, File Manager Backspace:: KeyWait Backspace, L Run C:\Program Files\Macro Express3\meproc.exe /Amacro express macro nickname return #IfWinActive iii) use #IfWinNotActive, windowtitle as the first line in the macro subroutine (before the hotkey line) if you want the hotkey to be active except if a window with the specified window title is active. Put #IfWinActive as the last line in the subroutine after the return. For example, if I want the keypad enter hotkey to be active in all windows except Notepad THESE ARE AUTOHOTKEY STATEMENTS FOR USE IN AUTOHOTKEY SCRIPTS. DO NOT USE IN MACRO EXPRESS MACROS. #IfWinNotActive, Notepad ; hotkey is NumpadEnter NumpadEnter:: KeyWait NumpadEnter, L Run C:\Program Files\Macro Express3\meproc.exe /Amacro express macro nickname return #IfWinActive
  5. Sometimes the Macro Express icon disappears from my system tray. (Note it is not hidden or being treated as an inactive icon. It is really no longer in the system tray.) This is not a Macro Express problem. My windows OS has gotten a little flaky; I have the same problem that some other programs also have their system tray icons disappear. But as far as I can tell, there is no way for me to bring up the Macro Express editor without being able to click on the system tray icon. Is there some way (e.g., some command line I can run, or some other program in the Macro Express folder) that could do one of the following: - open the Macro Express editor without the system trail icon being there - restore the system tray icon Right now, what I have to do is open the task manager and kill the Macro Express process. Then I can relaunch macro express from the start menu. When the relaunch is, the system tray icon is generated so that I can access the editor.
  6. Is there any technique I can use on macro express 3.x to check if a specific system tray icon exists? I know I can use a macro command to move the mouse to a specified system tray icon, but I'm trying to do this check without moving the mouse. I don't see an option within the "If" family of commands to check for a system tray icon, but if I could generate a list of the system tray icons and put that list in a text variable, I could check that way. I can't simply check if the program is running, because the program in question may or may not produce the system tray icon depending on environmental conditions.
  7. Thank you Kevin for your comments. It's a shame that the two versions were not designed to run simultaneously, because I can provide you with two realistic scenarios where that configuration is justified: - there are some limitations in the conversion process that occurs when loading in a 3.x mex file into Pro. Whether these are considered bugs or design decisions is academic... the bottom line is that some types of macros require modification after being loaded into Pro. In addition, the faster performance of Pro means that macros that were properly timed in 3.x might be too fast in Pro and could require modifications to insert delays. The amount of time it would take for me to modify all the macros that require modification prohibits me from converting to Pro. So my options are either not use Pro at all, or run them simultaneously so that I can create the new macros in Pro. But it looks like running them simultaneously is not a real option for me either, based on my findings. - Since macros written in pro are not backward compatible to 3.x, if I need to create and use macros that are also used by other users who did not upgrade to pro, then I need to write those macros in 3.x.
  8. Thanks Kevin. But the upgrade to the latest version did not solve the clipboard problem, and fixing the .mex file association to point back to the 3.x meproc.exe only partially resolved the command line problem... each launch of macro express Pro disrupts the ability for a command line to call the 3.x macro via meproc.exe (even though the file association stays intact as 3.x) until I manually run a certain 3.x macro... then the command line works properly again. I put in trouble reports with Insight software for these. The bottom line is that I will not be able to run Pro on my system. I'm disappointed since the new features and increased speed looked like a big improvement, but the above bugs as well as some other functionality issues I found prevent me from running Pro and 3.x simultaneously and also prevent me from replacing 3.x with Pro. I also find some of the changes to the user interface to the Editor a step in the wrong direction.
  9. I just installed macro express Pro (v 4.0.0.1 build 1) and encountered the following problems. Please let me know if others have encountered these and if it is a configuration issue I can fix myself. I just wanted to see if the folks on this forum had any advice before I submit the bug reports to Insight Software. Just for the record, I did not yet create any macros in Pro, nor did I import any of my 3.x macros. All I did is install Pro and I have it running in the background when I encountered these problems. 1) In my text editor (metapad), if I try to copy selected text with control-c, about half the time I get a warning dialog box from the metapad application (that is, the dialog box with a yellow triangle and an exclamation point) saying that the application cannot open the clipboard. This problem happens when macro express Pro is running, regardless of whether macro express 3.x is running or not running at the same time. If I exit Pro, this problem goes away. I've been using macro express 3.x with the metapad application for several years and never had this problem with that version of ME. So far, I've only seen this dialog box error from metapad. I don't know whether the other applications are not encountering this interaction problem with Macro Express Pro or if my other applications just don't give me an explicit dialog box error when they have the problem. 2) I have several programs (exe files) that I created myself, where the last step in the program is to run a macro express macro, via the meproc command line. Specifically, the program runs the following command line: D:\stamp\macros\meproc.exe /Amacroname where the macro name is a macro that is defined in macro express 3.x. If I have macro express 3.x running, and macro express Pro not running, my executable program is able to invoke the macro from 3.x. But if 3.x and Pro are both running, my executable program cannot invoke the macro (no macro runs and no error messages generated from macro express). It is as if D:\stamp\macros\meproc.exe is trying to invoke the macro from Pro (where that macro name does not exist) instead of 3.x. Just for the record, macro express 3.7a is installed in "C:\Program Files\Macro Express3" and macro express Pro is installed in "C:\Program Files\Macro Express Pro" D:\stamp\macros\meproc.exe is a copy of MeProc.exe from C:\Program Files\Macro Express3 I also tried making D:\stamp\macros\meproc.exe a windows shortcut (.lnk) to rather than a copy of the file in C:\Program Files\Macro Express3, but the same problem continues to happen.
  10. In macro express 3.x, I have the abort macro hotkey (preferences/playback) set to the Pause key. 1) if I have macro express 3.x and macro express Pro running simultaneously on my system, can I have the same abort macro hotkey defined for both applications or, if I do that, will that abort hotkey work for only one of the programs? 2) since macro express Pro allows for multiple macros to run simultaneously, what happens if more than one macro is running and I press the abort macro hotkey (or right click the running man icon? Does it abort all macros currently running in macro express Pro? 3) by the way, do 3.x and Pro have different system tray icons to distinguish them when they are running simultaneously?
  11. I have created various programs (executable files) that interact with Macro Express by launching a macro and setting variable values via command line parameters and the MeProc.exe program. Does Macro Express Pro also provide an MeProc.exe for use with the command line? Does it work the same as the command line and MeProc.exe in v 3, or after I migrate my v 3 macro file to Pro will I need to modify and recompile my other programs to interract with the command line for Macro Express Pro?
  12. Macro Express Pro has conversion routines which allow it to run macros that were written in v 3. But there are various methods to load a macro into macro express. Which methods work with the conversion routines, and which methods do not work forcing the user to manually adjust the v 3 macros. For example, some of the methods are: open macro file (*.mex) import macro import playable macro macro command to run macro from text file pasting the clipboard containing macro commands into the scripting editor And how about sharing macros that I write in Macro Express Pro with colleagues that are still on v 3? Assuming that my macro does not contain a command that is a new function introduced in Pro, can I export the macro written in Pro so that a v 3 user can import the macro? Or are there enough changes such that macros written in Pro cannot go back to v 3 (e.g., Remark command renamed to Comment command, the addition of error handlers needed for some commands in Pro).
  13. How does ME Pro handle macros that are scheduled to run at startup when there is more than one startup macros. Does it run these macros in sequence or does it run them simultaneously (considering that Pro can run more than one macro at a time)? If it runs them in sequence, will I be able to control which macro is run first, second, etc.? In v 3, the macros were always run in the sequence in which they were created, which was a limitation because you might create a new start up macro tomorrow which you want Macro Express to run before it runs the start up macro you created yesterday. I put in an enhancement request for v 3 to offer the ability for the user to define the start up sequence. I do not know if anything happened since then. Another solution to this problem, if ME Pro supports it, is to have just one start up macro where that macro calls each of the other macros in the sequence you want. The problem with doing this in v 3 is that if one of the called macros fails (eg, the web page did not load in time), then none of the subsequent macros will be attempted. The new feature in ME Pro to make this approach reliable would be an option that tells macro express to continue playing the rest of the main macro even if a callled macro fails. (Without this error recovery feature, I would need to include otherwise unnecessary error recovery commands in each of my start up macros, which is a waste of time since each macro would need a unique approach to identify and ignore the errors.)
  14. 1) Is Macro Express Pro, by design, able to run ALL the macros created by Macro Express 3? If not, is there a list of published limitations. I know from the Macro Express 3 help file, there were some macro commands from earlier versions that no longer ran in v 3 and thus those users how to modify their macros before upgrading to v 3. (I am talking more about design issues than bugs. I know there are various discovered and not yet discovered bugs with v 4 running v 3 macros. Hopefully the bugs will be fixed promptly, but limitations by design will not.) 2) Can I simultaneously have Macro Express v 3 and Macro Express Pro installed on my system? If yes, can I run them simultaneously? I want to make sure that if I install the Macro Express Pro and find compatibility issues with my previously written macros, that I will be able to keep running my macros on v 3 rather than needing to rewrite those macros. 3) I put in an enhancement request on v 3 a long time ago I wonder if it made it into Macro Express Pro. Have any new hotkeys for macro activation been defined in Pro? Specifically, I would like to use as hotkeys the "key codes" that are defined in the standards but do not exist on normal keyboards. But I have a programmable keyboard, so I can redefine any key to be any other key code or sequence of keys. Currently on my programmable keyboard, I have programmed single touch keys so that they outpulse a multi-key combination hotkey. The problem is that Macro Express 3 sometimes does not recognize the hotkey (either it is outpulsed to quickly by the keyboard, or it may conflict with key combinations predefined by certain applications). If I could use as hotkeys the key codes that are in the programmable-only keycode range, I could have more macros that use a single key hotkey while avoiding the issues I sometimes have with multi-key hotkeys.
  15. If you're going to open and close the DVD tray only via macros (e.g., you will not also press the button on the tray or manually push the tray in), then you could use a variable to store the tray state in an INI file. Each time the macro runs, it reads the INI file to determine the current tray state (i.e., whether the last macro runs left the tray in the open or closed position). You then have an if statement such that if the tray was last opened, then close it now (and write 'closed' to that INI file), else open the tray (and write 'opened' to that INI file). This approach is practical only if it is OK if the INI file sometimes gets out of synch with the real tray status (e.g., you accidentally manually push the tray and rather than closing it with the macro).
×
×
  • Create New...