Page 1 of 1
FILE command in macro - coding for CANCEL button
Posted: Mon Apr 01, 2013 8:45 pm
by zegockie
In the body of my macro I use a FILE command for selecting comparison chromatogram. If I press OK (after selecting) macro runs as expected. However, if I press CANCEL then I have a problem - the macro stops and document for printer is hanging as my macro started executing STARTJOB. If _button = 0 ... doesn't work. There is no error so I cannot use ON_ERROR.
I want to make some simple coding with ENDJOB command for the case if CANCEL button is pressed.
Any ideas? Highly appreciate it.
Re: FILE command in macro - coding for CANCEL button
Posted: Mon Apr 01, 2013 9:07 pm
by GasMan
I presume that you are using ChemStation. Exactley which version are you using and which command.
Gasman
Re: FILE command in macro - coding for CANCEL button
Posted: Tue Apr 02, 2013 1:21 pm
by zegockie
Chemstation E.02.00 and they call it FILE macro in Help though from macro log it is hard to figure out how it works and I don't know where it is located.
Re: FILE command in macro - coding for CANCEL button
Posted: Tue Apr 02, 2013 1:36 pm
by GasMan
I cannot help you much, as I am a GC ChemStation user and not a MS ChemStation user. There are big differences in the macro language area. I do not see a macro named FILE in my list of loaded macros in GC ChemStation. The GC version does have a function named 'SelectFile', which enables you to select a file to load. You could check if this function is available in the MS ChemStation.
Gasman
Re: FILE command in macro - coding for CANCEL button
Posted: Tue Apr 02, 2013 2:02 pm
by zegockie
There is no SELECT FILE in my lists, but I can see FILE macro in my list, though the trick is to find it.
Re: FILE command in macro - coding for CANCEL button
Posted: Tue Apr 02, 2013 2:59 pm
by zegockie
Already figured it out. FILE is inside envcomm2.mac