Installing an MS macro?

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Guest

Installing an MS macro?

Post by Guest » Sun Feb 29, 2004 12:31 pm

VERY BASIC QUESTION:

Someone sent me an MS macro by email. How do I install the macro into my own copy of MS without manually retyping all the lines? ...wdc

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sun Feb 29, 2004 4:59 pm

It may depend on what version of Macro Scheduler you have. Version 7.2.031, 09/04/2003 added the ability to do File, Import Macros. Be sure you have highlighted the correct Group before you do imports in that manner.
=======================================
Here is a process that should work on all versions:

1. Select a Group where you want the script to be located.
2. Edit Group Properties to find out the folder path for those macro scripts.
3. Copy the script you have received into that folder.
4. Highlight that group in the tree.
5. Start a new macro: File, New.
6. Insert the macro name in top field, click on "Import..." button at bottom right.
7. Browse to the folder for that group, and select the macro that you want to use, and click on the Open button.
8. Save the new macro by clicking on OK.

Your imported macro should now be shown in the group.
Last edited by Bob Hansen on Wed Mar 03, 2004 4:00 pm, edited 1 time in total.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Lumumba

Post by Lumumba » Sun Feb 29, 2004 11:03 pm

or

Type the following at start/run: Notepad \.scp
The script will open in Notepad.
Press CTRL+A (select all) , Press CTRL+C (copy)
Open a new (blank) script in Macro Scheduler
Press CTRL+V (insert)
Save the script in Macro Scheduler.
Done.

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Wed Mar 03, 2004 2:04 pm

Or just:

File/New Macro
Press the Import button
Locate the script and hit OK
MJT Net Support
[email protected]

wdc202

installing a script

Post by wdc202 » Thu Mar 04, 2004 7:34 pm

Bob Hansen wrote:It may depend on what version of Macro Scheduler you have. Version 7.2.031, 09/04/2003 added the ability to do File, Import Macros. Be sure you have highlighted the correct Group before you do imports in that manner.
=======================================
Here is a process that should work on all versions:

1. Select a Group where you want the script to be located.
2. Edit Group Properties to find out the folder path for those macro scripts.
3. Copy the script you have received into that folder.
4. Highlight that group in the tree.
5. Start a new macro: File, New.
6. Insert the macro name in top field, click on "Import..." button at bottom right.
7. Browse to the folder for that group, and select the macro that you want to use, and click on the Open button.
8. Save the new macro by clicking on OK.

Your imported macro should now be shown in the group.

Bob: Thanks for the help. But I 'm afraid I need more help.

Here is a simple script I received by email:

Let>k=1
Let>list=
Label>loop
list=%list%%k%%CRLF%
Let>k=k+1
If>k>400,end
Goto>loop
Label>end
PutClipBoard>list

Can you please tell me step-by-step how i load it and save it?

I just retype it but I'm trying to learn. Also, how do I type the line
list=%etc...

List does not appear in my dropdown list of commands.

... wdc

wdc1

installing a script

Post by wdc1 » Thu Mar 04, 2004 7:36 pm

Bob Hansen wrote:It may depend on what version of Macro Scheduler you have. Version 7.2.031, 09/04/2003 added the ability to do File, Import Macros. Be sure you have highlighted the correct Group before you do imports in that manner.
=======================================
Here is a process that should work on all versions:

1. Select a Group where you want the script to be located.
2. Edit Group Properties to find out the folder path for those macro scripts.
3. Copy the script you have received into that folder.
4. Highlight that group in the tree.
5. Start a new macro: File, New.
6. Insert the macro name in top field, click on "Import..." button at bottom right.
7. Browse to the folder for that group, and select the macro that you want to use, and click on the Open button.
8. Save the new macro by clicking on OK.

Your imported macro should now be shown in the group.

Bob: Thanks for the help. But I 'm afraid I need more help.

Here is a simple script I received by email:

Let>k=1
Let>list=
Label>loop
list=%list%%k%%CRLF%
Let>k=k+1
If>k>400,end
Goto>loop
Label>end
PutClipBoard>list

Can you please tell me step-by-step how i load it and save it?

I just retype it but I'm trying to learn. Also, how do I type the line
list=%etc...

List does not appear in my dropdown list of commands.

... wdc

Guest

Installing a script

Post by Guest » Thu Mar 04, 2004 7:38 pm

quote="Bob Hansen"]It may depend on what version of Macro Scheduler you have. Version 7.2.031, 09/04/2003 added the ability to do File, Import Macros. Be sure you have highlighted the correct Group before you do imports in that manner.
=======================================
Here is a process that should work on all versions:

1. Select a Group where you want the script to be located.
2. Edit Group Properties to find out the folder path for those macro scripts.
3. Copy the script you have received into that folder.
4. Highlight that group in the tree.
5. Start a new macro: File, New.
6. Insert the macro name in top field, click on "Import..." button at bottom right.
7. Browse to the folder for that group, and select the macro that you want to use, and click on the Open button.
8. Save the new macro by clicking on OK.

Your imported macro should now be shown in the group.[/quote]


Bob: Thanks for the help. But I 'm afraid I need more help.

Here is a simple script I received by email:

Let>k=1
Let>list=
Label>loop
list=%list%%k%%CRLF%
Let>k=k+1
If>k>400,end
Goto>loop
Label>end
PutClipBoard>list

Can you please tell me step-by-step how i load it and save it?

I just retype it but I'm trying to learn. Also, how do I type the line
list=%etc...

List does not appear in my dropdown list of commands.

... wdc

wdc
Junior Coder
Posts: 33
Joined: Mon Jun 09, 2003 1:37 am
Location: Chevy Chase Maryland

Installina a macro

Post by wdc » Thu Mar 04, 2004 7:45 pm

quote="Bob Hansen"]It may depend on what version of Macro Scheduler you have. Version 7.2.031, 09/04/2003 added the ability to do File, Import Macros. Be sure you have highlighted the correct Group before you do imports in that manner.
=======================================
Here is a process that should work on all versions:

1. Select a Group where you want the script to be located.
2. Edit Group Properties to find out the folder path for those macro scripts.
3. Copy the script you have received into that folder.
4. Highlight that group in the tree.
5. Start a new macro: File, New.
6. Insert the macro name in top field, click on "Import..." button at bottom right.
7. Browse to the folder for that group, and select the macro that you want to use, and click on the Open button.
8. Save the new macro by clicking on OK.

Your imported macro should now be shown in the group.[/quote]


Bob: Thanks for the help. But I 'm afraid I need more help.

Here is a simple script I received by email:

Let>k=1
Let>list=
Label>loop
list=%list%%k%%CRLF%
Let>k=k+1
If>k>400,end
Goto>loop
Label>end
PutClipBoard>list

Can you please tell me step-by-step how i load it and save it?

I just retype it but I'm trying to learn. Also, how do I type the line
list=%etc...

List does not appear in my dropdown list of commands.

... wdc

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Thu Mar 04, 2004 7:54 pm

Hi,

There is an error with your script. The list=%list%%k%%CRLF% line should be:

Let>list=%list%%k%%CRLF%

Since your script is in an email you will have to copy and paste it. If it is in an attachment, you could save the attachment and import it. But here's how to copy and paste it.

1. File/New Macro
2. Give the macro a name
3. Click 'Open In Editor'
4. In Editor do Edit/Paste
5. For good measure do Edit/Remove Trailing Spaces
6. File/Save
7. File/Close
8. Ok the new macro

Done.

To type a line ... in the editor just type it. In the macro builder (first form when you do File/New Macro) locate the command in the command list (e.g. Let) and in the value box enter list=%list%%k%%CRLF%

If your script was saved as a file all you'd need to would be File/Import Macros or File/New and then Import.
MJT Net Support
[email protected]

wdc
Junior Coder
Posts: 33
Joined: Mon Jun 09, 2003 1:37 am
Location: Chevy Chase Maryland

Post by wdc » Fri Mar 05, 2004 5:32 pm

Re my script

Let>k=1
Let>list=
Label>loop
Let>list=%list%%k%%CRLF%
Let>k=k+1
If>k>400,end
Goto>loop
Label>end
PutClipBoard>list

When I run it I get the word "list" on the clipboard, not the
1
2
3
.
.
.
400
that I expected. Can you spot the error? Iexpect the bad line is
Let>list=%list%%k%%CRLF%

I am not familiar with that coding; what does it "mean?" ... wdc

Lumumba

Post by Lumumba » Fri Mar 05, 2004 8:00 pm

PutClipBoard>%list%

Lumumba

Post by Lumumba » Fri Mar 05, 2004 8:08 pm

BTW: What you wan't to accomplish ? Copy the "list" from the clipboard to nowhere .... ??? Maybe there's "another way to Rome" :wink:

wdc
Junior Coder
Posts: 33
Joined: Mon Jun 09, 2003 1:37 am
Location: Chevy Chase Maryland

Post by wdc » Sat Mar 06, 2004 1:52 am

Lumumba: I fixed the last line to PutClipBoard>%list% but now when I Run it I get this error: Can't find loop label.

What is wrong here?

What am I trying to do? To learn how to write macros and to get the PC to generate a list of numbers from 1 to 400, which I would then cut-and-paste to a Word 97 table.

... wdc

Ernest
Newbie
Posts: 6
Joined: Thu Jan 09, 2003 8:29 pm

Post by Ernest » Sat Mar 06, 2004 5:42 am

Check if any line of your code contains a trailing space character (especially the Goto/Label lines) .

Label>loop
isn't equal to
Label>loop
and therefore the Goto points to nowhere ...

Something like this happens if you copy code from the forum.

BTW: Use Excel to create a list/table and import it to Word

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Sat Mar 06, 2004 8:44 am

wdc wrote: Let>list=%list%%k%%CRLF%

I am not familiar with that coding; what does it "mean?" ... wdc
It means assign the value of list followed by the value of k followed by the value of CRLF to list.

CRLF is the carriage return linefeed char - to make a new line.

At the start list = nothing and k=1 so at the end of the first iteration list now equals 1 followed by a new line. What it is doing is growing list by making itself equal to its old value prepended to the new value of k and a new line char.

I would reccomend reading the getting started guide in the documentation and take a look at some of the examples here and at the Scripts & Tips page.
MJT Net Support
[email protected]

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts