Alexis Posted July 14, 2008 Report Share Posted July 14, 2008 To make the same macro file run on different pc´s some macros have to be a little different. The reason is the different numbers of monitors which are connected to the pc´s. I wanted to insert an "If then" command and was quite sure to find a command like "Get computername" but i did not manage to find something like this yet. I guess there are plenty of workarounds for this but what´s the best way to determine this? Thanks a lot Alexandra Quote Link to comment Share on other sites More sharing options...
kevin Posted July 14, 2008 Report Share Posted July 14, 2008 (edited) Look at the Set Variable %T1% to "Name of Current Macro" command found under Variable Set From Misc. Edit: Oops! I should have said Set Variable %T1% to "Name of Machine". Edited July 15, 2008 by kevin Correct error Quote Link to comment Share on other sites More sharing options...
johnboy691 Posted July 14, 2008 Report Share Posted July 14, 2008 Alexis: What Kevin said is exactly what you want. I use the same command with the Username. Our company has each person's computer set with their own user name (ie: mine is jboll). I found using the username is easier than the computer number because it tells me exactly who the user is and I don't have to cross reference a seperate list when locating whose computer is DHO00RS143BC, etc. I know who they are by the name. In addition..If statements work great, but you might also want to consider using the Switch commands. They are very efficient when having different options to use within a macro. Quote Link to comment Share on other sites More sharing options...
Alexis Posted July 14, 2008 Author Report Share Posted July 14, 2008 Thank you very much! That was exactly what i was looking for. Somehow i completely overlooked this useful command "Variable Set From Miscellaneous". Same is with Switch. I guess it can´t do anything else than IF / THEN but it seems to need less commands to achieve the same. Alexandra Quote Link to comment Share on other sites More sharing options...
paul Posted July 14, 2008 Report Share Posted July 14, 2008 And you can also retrieve the computer name itself (it's stored in an environment variable called, surprisngly, ComputerName)! 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.