hpram99 Posted September 3, 2008 Report Share Posted September 3, 2008 Any way for a Macro file (mex or mxe) to be imported into the currently used macro file when the user does not have the editor installed? If I need to write a macro to import the macro, that's fine. Don't really care how it's done, just as long as the user doesn't need to reinstall macro express with the editor. Thanks! Quote Link to comment Share on other sites More sharing options...
rberq Posted September 3, 2008 Report Share Posted September 3, 2008 I have a half-satisfactory solution. I store a "master"' macro file on a network drive, and I can update that whenever I want. Each user has his own macro file on his C: drive, which is refreshed from the "master" by a simple copy-file prior to ME startup when the PC is rebooted. (I also start ME in the batch file that does the file-copy.) So far I haven't had to update macros mid-day, but if that becomes necessary I will give users an icon to a batch file that ends ME, refreshes the macro file, and restarts ME. Quote Link to comment Share on other sites More sharing options...
kevin Posted September 3, 2008 Report Share Posted September 3, 2008 The logic to import a macro does not exist in the Macro Express Player. rberg's suggestion is a good one. Quote Link to comment Share on other sites More sharing options...
hpram99 Posted September 4, 2008 Author Report Share Posted September 4, 2008 I have a half-satisfactory solution. I store a "master"' macro file on a network drive, and I can update that whenever I want. Each user has his own macro file on his C: drive, which is refreshed from the "master" by a simple copy-file prior to ME startup when the PC is rebooted. (I also start ME in the batch file that does the file-copy.) So far I haven't had to update macros mid-day, but if that becomes necessary I will give users an icon to a batch file that ends ME, refreshes the macro file, and restarts ME. This is what we already do, and works great. I have an "auto update" macro that runs after 3 hours of inactivity.... a macro to update a macro But this isn't what I'm looking for unfortunately. Any other suggestions? is the editor still installed but just disabled? would there be a way to temporarily enable macro express editor to import, then disable again? Quote Link to comment Share on other sites More sharing options...
kevin Posted September 5, 2008 Report Share Posted September 5, 2008 Why is the Editor not installed in the first place? If the reason is to prevent users changing the macro file you could simply hide the editor and password protect the macro file. Then you could import macros when you wanted to import macros (after entering the password). Some ideas: - Do not load the editor when Macro Express loads (Options, Preferences, Startup). - Change the System Tray Left Click Option (Options, Preferences, Miscellaneous) to either Run a Macro or Do Nothing. With these set the only way the user could bring up the editor would be to type Ctrl+Alt+Shift+W or by clicking on the macedit.exe file in the folder where the Macro Express program files are loaded. If you feel you need additional protection from changes by the user you could set a password for editing (Options, Preferences, Passwords). Quote Link to comment Share on other sites More sharing options...
Cory Posted September 5, 2008 Report Share Posted September 5, 2008 I don't understand what you're trying to accomplish. I don't think you can import the way you're thinking exactly but if we had a more general idea of what you're trying to accomplish we might be able to offer better alternatives. Kevin's solution of relying on password security is how i do it usually. I too initially wanted to come up with a player only install for users but I found there was really no need. Also when a user has a workstation specific issue it's nice to be able to pop open the editor with a password so I can test no the problem machine. Question, why wouldn't the Load New Macro File command not work for you? Essentially you would do the same thing. Personally I like this one for my laptop and for special installations. For instance I might have manager macros and grunt macros. Well instead of having some convoluted method I have every machine start with a locally installed luncher macro. Then based on machine name, user name, location or whatever it can load different macros off the network. So if user A logs in on another machine and I set it so user A always gets the manager macro in the logic of the launcher macro load the manager macro wherever user A goes. BTW you Can create a CSV file or INI file on the network someplace to manage users like this. On my laptop I travel a lot and on different sites I want to load different macros so the macro detects where i am and launches the appropriate macro for the site. Works slick. Quote Link to comment Share on other sites More sharing options...
hpram99 Posted September 16, 2008 Author Report Share Posted September 16, 2008 I don't understand what you're trying to accomplish. I don't think you can import the way you're thinking exactly but if we had a more general idea of what you're trying to accomplish we might be able to offer better alternatives. Kevin's solution of relying on password security is how i do it usually. I too initially wanted to come up with a player only install for users but I found there was really no need. Also when a user has a workstation specific issue it's nice to be able to pop open the editor with a password so I can test no the problem machine. Question, why wouldn't the Load New Macro File command not work for you? Essentially you would do the same thing. Personally I like this one for my laptop and for special installations. For instance I might have manager macros and grunt macros. Well instead of having some convoluted method I have every machine start with a locally installed luncher macro. Then based on machine name, user name, location or whatever it can load different macros off the network. So if user A logs in on another machine and I set it so user A always gets the manager macro in the logic of the launcher macro load the manager macro wherever user A goes. BTW you Can create a CSV file or INI file on the network someplace to manage users like this. On my laptop I travel a lot and on different sites I want to load different macros so the macro detects where i am and launches the appropriate macro for the site. Works slick. I guess I should be a little more clear on what I am trying to accomplish... Macro Express was decided by management above me to disallow anyone from using the editor in fear they would waste time trying to write their own macros instead of just doing their jobs. I wrote a macro that writes macros.... yeah... I know. All it does is generate a shortkeys style macro, as each individual will have their own way of typing things, it's not possible to write this into a macro myself, managing all the users personal scripts would be impossible and impractical. I'm basically trying to find a way to allow people to very easily make a shortkey script, but be able to import it into macro express without the editor. Hope this makes sense.. Quote Link to comment Share on other sites More sharing options...
stevecasper Posted October 26, 2008 Report Share Posted October 26, 2008 I have a half-satisfactory solution. I store a "master"' macro file on a network drive, and I can update that whenever I want. Each user has his own macro file on his C: drive, which is refreshed from the "master" by a simple copy-file prior to ME startup when the PC is rebooted. (I also start ME in the batch file that does the file-copy.) So far I haven't had to update macros mid-day, but if that becomes necessary I will give users an icon to a batch file that ends ME, refreshes the macro file, and restarts ME. rberq, At a company where I used to work, we had a set-up very similar to this and it worked fantastically. Unfortunately, I was just one of the peons who had ME on my drive, and wasn't one of the official macro creators (though we all were encouraged to write macros and share the ones we found most useful with our co-workers). Now, however, I work somewhere else and just under a year ago they finally got their act together and got us Macro Express. I am the only person in the department (possibly the company) who has any familiarity with ME, and so I set to work building macros like crazy to make my job less annoyingly redundant. I want to set up a system much like the one we had at my previous employer, such as the one you described above, but I was never in the loop on how to do that, and would love some clarification about just how I would go about making a "copy-file prior to ME startup". As it is, very few of my co-workers use more than about 5 macros, whereas I'm using upwards of 40 or 50 (many of which are called from other macros) to keep my day cruising along without too much boredom-induced trauma. Any pointers would be super! Quote Link to comment Share on other sites More sharing options...
rberq Posted October 26, 2008 Report Share Posted October 26, 2008 1. Choose a network location for your master. Just needs to be a folder on a server where you store the .mex file, and "everyone" should have read permissions to the folder. 2. From your PC, open the network .mex file and import individual macros from your personal .mex. Repeat whenever you want to update the master. 3. Put a .bat file on each user's PC, in "Documents and Settings\All Users\Start Menu\Programs\Startup". The .bat file just consists of a copy command, copying the .mex from the network location and overlaying that on the user's PC. The .bat command will run when the PC is booted. You may need permission from whoever manages the office PCs, to add the .bat command file to users' startup. Alternatively, just give users the .bat file and a desktop icon to run it. It might be necessary to restart ME after the copy (CTRL-ALT-0). The above has an obvious drawback, in that any macros the users themselves develop will have to be in the master .mex, or they will be overlaid by the next copy. It will require central management and coordination to make this work. I don't have that problem because my users will not be developing their own macros. Quote Link to comment Share on other sites More sharing options...
stevecasper Posted October 26, 2008 Report Share Posted October 26, 2008 Thanks rberq! This is great info. I'll have to look into .bat files (the majority of my programming experience is with ME, HTML, and some BASIC a very long time ago - I know, I'm Jurassic). The above has an obvious drawback, in that any macros the users themselves develop will have to be in the master .mex, or they will be overlaid by the next copy. It will require central management and coordination to make this work. I don't have that problem because my users will not be developing their own macros. Nobody at my current place of employment has any desire to write macros. Everybody has the Editor on their system, but the only time the editor has ever been opened is when I've gone over to import macros, so overwriting isn't likely to be an issue. I do wonder, however, about that. At my last job, everybody was able to write their own macros, but we also had department wide macros that were updated automatically whenever we restarted ME. My macros were part of my macro file, and yet so were the department-wide macros. Mine never got wiped out with an update. Did I misunderstand what you said, or is there another way to have system-wide macros work alongside personalized macros? It's been a couple of years since I left that job, but I seem to remember that their macros were not coded macros... I think they were "Macro Run" commands (I didn't really know anything about Macro Run back then - my macs were usually pretty basic window manipulations and Text Types), or something else from the Macro Control category (I do remember the icon). It may have been the Load Macro Text file... in fact I think it was the Load Macro Text file command. This command is one that I have never used, or played with, so I'm going to start right away, to see what it does. I'll get out my trusty ME Explained and see if I can grasp its uses. If you, or anybody else reading the thread, knows how this command could be used to accomplish what I've described above (assuming it's different from the .bat solution), I'd be happy to hear about it. Thanks! Quote Link to comment Share on other sites More sharing options...
kevin Posted October 27, 2008 Report Share Posted October 27, 2008 ... I seem to remember that their macros were not coded macros... I think they were "Macro Run" commands The way this works is to separate your macro(s) into one part that will never change and another part that will change. Each 'never change' macro contains one or more Load Macro Text File" commands. Put the 'never changed' macros in the user's main macro file and put the external changeable macros into a specific directory location. Another process outside of Macro Express (such as a batch file, a 'push files' or synchronize program) can update the changeable macros at will. Quote Link to comment Share on other sites More sharing options...
stevecasper Posted October 27, 2008 Report Share Posted October 27, 2008 The way this works is to separate your macro(s) into one part that will never change and another part that will change. Each 'never change' macro contains one or more Load Macro Text File" commands. Put the 'never changed' macros in the user's main macro file and put the external changeable macros into a specific directory location. Another process outside of Macro Express (such as a batch file, a 'push files' or synchronize program) can update the changeable macros at will. Cool, thanks Kevin! This is going to save me a lot of trial and error... not all of it, since I can't seem to build any macros without at least some (aka a lot) of errors, but this should help me skip some of the earliest and most obvious blunders I am generally bound to make. I'll have to play with this a little bit and see if I can't break something Quote Link to comment Share on other sites More sharing options...
stevecasper Posted October 29, 2008 Report Share Posted October 29, 2008 The way this works is to separate your macro(s) into one part that will never change and another part that will change. Each 'never change' macro contains one or more Load Macro Text File" commands. Put the 'never changed' macros in the user's main macro file and put the external changeable macros into a specific directory location. Another process outside of Macro Express (such as a batch file, a 'push files' or synchronize program) can update the changeable macros at will. Ok, I've toyed with this and it seems to be working so far. Through trial and error I discovered that the Text File being loaded actually has to be a text file (you'd think that would have been obvious), so I've used the Direct Editor script, saved it as a .txt and placed it on the department's Group drive. I was wondering, though, if there is any way to write-protect a .txt file or the folder it is in to prevent mischievous snoops from digging it up and messing around with it? Or is there another mystical way to do this, so that if they wanted to look at it to learn they could, but just not mess it up? Quote Link to comment Share on other sites More sharing options...
jason Posted October 29, 2008 Report Share Posted October 29, 2008 I can't think of a way to password protect a text file. However, you could use the File Attribute command to mark it as read only. This would allow them to look at it, but not modify it unless they go into the properties and remove the Read Only flag. This is not a true solution, but more of a deterrent. You could also use the File Attribute command to mark the file as hidden. Again, not a true solution, but it would hide the file unless they have the Show Hidden Files option selected in their File Explorer. Quote Link to comment Share on other sites More sharing options...
stevecasper Posted October 29, 2008 Report Share Posted October 29, 2008 I can't think of a way to password protect a text file. However, you could use the File Attribute command to mark it as read only. This would allow them to look at it, but not modify it unless they go into the properties and remove the Read Only flag. This is not a true solution, but more of a deterrent. You could also use the File Attribute command to mark the file as hidden. Again, not a true solution, but it would hide the file unless they have the Show Hidden Files option selected in their File Explorer. This is good. I checked it out and the error message I get when I try to edit the text file through the Load Macro Text File command seems familiar enough to be the error I used to get when I was just the little guy trying to learn from other people's macros. I think hiding and making files read only should be enough for my little project. Anybody who understands immediately what the problem is and knows how to get around it is probably smart enough not to. Anybody who is determined enough to figure it out the hard way is also likely to be. I'll just make sure I also back up all the .txt files on my C drive any time I update the group macros, just in case. Thanks for all the help and explanations. This is going to be fantastic! Quote Link to comment Share on other sites More sharing options...
rberq Posted October 29, 2008 Report Share Posted October 29, 2008 I can't think of a way to password protect a text file. If you are storing these on a network server, you should be able to get your network gurus to set permissions on the folder or the share so that "everyone" can read the files, but only you can modify or delete them. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.