Jump to content
Macro Express Forums

Why No Comments On Examples?


terrypin

Recommended Posts

Are the macros provided in C:\Program Files\Macro Express3\Examples recommended/endorsed by Insight?

 

As part of learning ME I imported all 20 or so and have just started to study them. But I'm disappointed to find that they have no Comments.

 

Some also look quite complex for their apparent purpose. For example, the first one I examined is Counter_From_Run_To_Run which pops up this message at the start:

 

"This macro illustrates how you can use a counter with each successive run of the macro. It will simply display a message indicating how many times the macro has been run..."

 

Yet it seems to use the MACEX.INI file, without explanation, which I'd have thought potentially risky?

 

I can see I'm going to have many questions about most of these examples, and know I would get along much better if they had all been fully commented!

 

--

Terry, West Sussex, UK

Link to comment
Share on other sites

Terry,

 

What version of Macro Express are you using? As far back as I can remember, the example macros have been in the macro file named 'samples.mex'. Are we talking about the same thing? I am unaware of a macro file named 'examples'.

 

The latest version of samples.mex contains 26 sample macros. All of them contain comments.

Yet it seems to use the MACEX.INI file, without explanation, which I'd have thought potentially risky?
I am not sure why using .INI files would be risky. Saving information to and reading information from an .INI is a valid and safe technique. The only time I would think using an .INI file would be unsafe is if you change an .INI file used by the system without understanding what you are changing. But changing MACEX.INI would not affect your system.

 

If I recall correctly Macro Express v 2.x used MACEX.INI to store program settings. Macro Express 3 stores program settings in the registry.

 

I may be missing something but I do not see where the sample macro 'Counter_From_Run_To_Run' contains any commands that use MACEX.INI. It does use the file '\TESTVAL.TXT'.

Link to comment
Share on other sites

Thanks Kevin. That's helpful, although I'm still a bit confused.

 

I'm using version 3.5e (3.5.5.1). I thought that original installation was where I obtained many of my example macros. But it looks like I was mistaken, and I maybe got them from subsequent downloads here:

http://www.macros.com/share.htm

where you have a set of 23 links headed "Samples From Insight Software Solutions."

 

* Hide a Program

* Maximize and Minimize

* Menu and Question

* Open Explorer Folder

* Paste Text

* Process Folder

* Repeat Until

* Repeat With Prompt

* Run Control Panel

* Variables and Mouse

* Window Resize and Reposition

* Counter_From_Run_To_Run

* Wait For Mouse Or Key Press

* Launch Web And Fill Out Form

* Copy And Paste Repeatedly

* Scan for Banned Programs

* Protect HOSTS file

* Wait Web Page: Netscape

* Variable Evaluation Level

* Remote Desktop Connection Demo

* Enable Disable touchpad

* Tray Icon

* Display CPU Information

 

After importing and opening each of those in Scripting Editor, I confirm that none have any comments. Mind you, now that I'm gaining confidence, many of them don't need any. But some most certainly do! A typical example is the one gave, Counter_From_Run_To_Run.

 

Let's turn to your comment "But changing MACEX.INI would not affect your system." On my system that file contains 170 lines of configuration detail about Macro Express, so I don't see where you're coming from with such a confident statement! A user could surely wreak havoc if he/she changed it in unintended ways? Using it in a demo macro for novices seems to me rather like learning to use a chain saw for tree surgery, while sitting astride a major branch ;)

 

But I was wrong about where MACEX.INI crops up. In fact, although I currently have it in the same 'Samples/Examples' category as all those Insight macros above, it may have some other origin. Maybe you/someone can identify it?

 

Text Box Display: Sample Macro

Activate or Launch: "notepad" OR "notepad.exe"

Variable Set String %T1% from INI File

Variable Modify String: Append "\SAMPLE.TXT" to %T1%

Text File Begin Process: "%T1%"

Text Type: %T2%

Text File End Process

Text Box Display: Macro

 

That 3rd line is where MACEX.INI is specified.

So I presume it could arise in many macros played subsequently, both 'samples/demos' (like Counter_From_Run_To_Run, where I encountered it) and others, wherever the commonly used string variable T1 arises?

 

Finally, I have now found and opened samples.mex on my HD. It displays 32 macros and as you say all of these do have comments. ;) BTW, where can I obtain the latest samples.mex please, so I can see why there are now 26, not 32? Or would my best bet be to upgrade to very latest ME version, if it is generally regarded as stable?

 

 

--

Terry, West Sussex, UK

Link to comment
Share on other sites

After importing and opening each of those in Scripting Editor, I confirm that none have any comments.
I just downloaded and imported several of them and some have comments while others do not. The more recent ones written by Insight Software Solutions have comments. Other shared macros may or may not have comments. It depends on what the author wrote.
... But changing MACEX.INI would not affect your system ... I don't see where you're coming from with such a confident statement!...
I stand by my statement.

 

Macro Express v 2.x used a file named MACEX.INI to store program settings but Macro Express 3 does not. MACEX.INI is not used by Windows and it is not used by Macro Express 3. The MACEX.INI file you are seeing is like any other user created file. It is used by some of the older sample macros to store and read information, such as a counter from run to run. Altering it will not affect your system.

 

I have now found and opened samples.mex on my HD. It displays 32 macros ... where can I obtain the latest samples.mex ... so I can see why there are now 26
If you look closely, there are six 'System macros'. There are 26 sample macros and 6 system macros. I said
The latest version of samples.mex contains 26 sample macros. All of them contain comments.
You have the latest version of samples.mex.
Link to comment
Share on other sites

Which of the 23 Insight macros I listed are you saying have comments? I'm curious, because, as I said, none of them did here. Looked to me like a simple case of your web pages not squaring with the samples.mex file. No big deal - we all make mistakes.

 

Anyway, it's now academic, as I have replaced them all with those from the fully-commented samples.mex file.

 

We'll have to agree to disagree about whether it makes sense to use a Macro Express INI file in a demo macro for novices. I'm guessing most of them, like me, would not be aware of the historical version 2/version 3 distinctions you make.

 

--

Terry, West Sussex, UK

Link to comment
Share on other sites

There are two sources for sample macros. Samples.mex is installed in the folder where the Macro Express program files are installed and contains 23 commented sample macros.

 

The Shared Macros contains sample macros provided by Insight Software Solutions and other Macro Express users. Some of these macros are commented, others are not.

 

Some of the macros in samples.mex are updated versions of the macros on the Shared Macros page. Comments were added to all macros in samples.mex.

 

We do not provide a macro file named examples.

 

No mistake here.

 

Some of the sample macros write to MACEX.INI. The person providing the macro knew exactly what they were doing when writing the macro. You asked if it was dangerous. You received the answer that this was not. It is not and was not ever dangerous to write to MACEX.INI.

 

If your macro alters WIN.INI or SYSTEM.INI and if you do not know what you are doing, then you could cause problems. But, writing to MACEX.INI will not. However, writing to WIN.INI and SYSTEM.INI are valid and reasonable things to do. If you know what you are doing.

Link to comment
Share on other sites

The Shared Macros contains sample macros provided by Insight Software Solutions and other Macro Express users. Some of these macros are commented, others are not.

Incredible! Is it really so hard to admit Insight may have screwed up a bit? The only macros under discussion are the 23 I listed, from the page I gave, in the sub-section headed Samples From Insight Software Solutions. To repeat yet again, after I imported them NONE were commented. You replied that some of them were. I was obviously curious about that, and asked you which ones. You still haven't answered that simple question...

 

--

Terry, West Sussex, UK

Link to comment
Share on other sites

The Shared Macros page contains 59 sample macros provided by Insight Software Solutions and other Macro Express users. Some of these 59 macros are commented, others are not.

 

Perhaps you happened to download 23 macros that were not commented.

There's no 'perhaps' about it! I deliberately downloaded only the 23 Insight macros, which I took the trouble to list for you in my original post. Your subsequent attempts to dissemble are disappointing.

 

--

Terry, West Sussex, UK

Link to comment
Share on other sites

Terry -

 

"dissemble" is such a nasty word don't you think? I think so. It means "To disguise or conceal behind a false appearance", in other words ... purposely deceive.

 

You seem to be an intelligent person and once you learn more about Macro Express I'm sure that your input will be invaluable to all of us MX developers and users. But, don't ever accuse someone here, in my forum, of something like that again. Period.

 

Okay ... on to the stuff that helps everyone!

 

Incredible! Is it really so hard to admit Insight may have screwed up a bit? The only macros under discussion are the 23 I listed, from the page I gave, in the sub-section headed Samples From Insight Software Solutions. To repeat yet again, after I imported them NONE were commented. You replied that some of them were. I was obviously curious about that, and asked you which ones. You still haven't answered that simple question...

Not sure what you are talking about. Out of the 23 macros listed, only 8 do not have comments and the rest do. Here's the list that doesn't:

  • Hide a Program
     
  • Maximize and Minimize
     
  • Menu and Question
     
  • Open Explorer Folder
     
  • Process Folder
     
  • Variable and Mouse
     
  • Counter from Run to Run
     
  • Copy and Paste Repeatedly

Yes, it's true. Comments can and do help a great deal. I'm positive that the ones that have no comments are older ones.

 

Let's turn to your comment "But changing MACEX.INI would not affect your system." On my system that file contains 170 lines of configuration detail about Macro Express, so I don't see where you're coming from with such a confident statement! A user could surely wreak havoc if he/she changed it in unintended ways? Using it in a demo macro for novices seems to me rather like learning to use a chain saw for tree surgery, while sitting astride a major branch

Can't wreak havoc with something that isn't used and macex.ini is not used in Macro Express 3. Feel free to saw a way at it. It's there for the samples and whatever experimenting you would like to do with the samples.

Link to comment
Share on other sites

Joe: OK, maybe 'dissemble' was a bit strong, and I withdraw it with apologies to Kevin. But this was certainly muddying the water and confusing what was essentially a very simple query. I won't boringly repeat all that I've already said, as I think my questions were clear enough.

 

Kevin: Now that Joe has actually answered my key point, I can see where you were coming from. Focusing exclusively on the 23 Insight macros from that page (as I was trying to do throughout the last few posts!) it seems that your current page is more recent than the one I downloaded. Mine had 23 no comments, your latest has only 8. I see its Copyright date is '2007'. I'm guessing that is very recent, because, although I can't be sure, I reckon I downloaded those mxe*.ZIPs only a few weeks ago.

 

Anyway, whatever the cause of the discrepancy, I'm glad the issue is now resolved. I hate unsolved puzzles! As mentioned earlier, I've since replaced all 23 with those from samples.mex as you recommended. So my original issue is well sorted, thanks.

 

Best wishes,

 

--

Terry, West Sussex, UK

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...