Great big THANKS for all the suggestions I received !

-----Original Message-----
From: Petre Kounov [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 10, 2002 3:50 PM
To: Michael Senack; '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'
Subject: RE: [mfg-smartcam] Changing a variable in a number of macro
files at once



You can read #Shim_Stack from an external file.Remove #Shim_Stack=4 from all
your *.mcl files.
Create a text file MyFile.txt (C:\Temp\MyFile.txt or somewhere else), open
it with text editor and write 4, save and close it.
Include the following code in all *.mcl files:


VAR_REMOVE_ALL[]
//
//
//
string:Shim_Stack
string:#TempFile
#TempFile="C:\Temp\MyFile.txt"

// read data from file
F_OPEN[FN=#TempFile, TY="R"]
F_READ[FN=#TempFile, FMT="%S", VR="Shim_Stack"]
F_CLOSE[FN=#TempFile]

Hope this helps

Peter



-----Original Message-----
From: Michael Senack [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 10, 2002 2:45 PM
To: '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'
Subject: [mfg-smartcam] Changing a variable in a number of macro files
at once


I have attached eight .mcl files that all have a string variable

STRING: #Shim_Stack
#Shim_Stack=4

at the beginning.

What I would like to know is there a way to make a program 
that can open each file and do a mass change of

#Shim_Stack=4
to 
#Shim_Stack=5

and then save the .mcl ?

What I do now is search for the files using Windows Search Results
with the Containing Text field equal to "shim_stack=" and manually change
all the files.

Can a macro .mcl file load a variable from another file?
What I'm thinking here is something like a DOS batch file 
with a %1 parameter sort of like the sample below

W:
CLS
COPY %1*.GEO A:
COPY %1*.JOB A:
A:
CLS
DIR %1*.*
W:

Any ideas are greatly appreciated.


Regards,
Michael Senack
 <<SHIMEND.MCL>>  <<SHIMHOLE.MCL>>  <<SHIML49.mcl>>  <<SHIMNEXT.MCL>>  
<<SHIMCWPH.MCL>>  <<SHIMOFF.MCL>>  <<SHIMPNCH.MCL>>  <<SHIMX0Y0.mcl>> 
======================================================================
To find out more about this mailing list including how to unsubscribe,
send the message "info mfg-smartcam" to [EMAIL PROTECTED]
======================================================================

Reply via email to