Page 1 of 1
How to close multivu window from macro
Posted: Fri Aug 16, 2013 6:26 pm
by zegockie
I wonder if it is possible to close multivu window from macro. I cannot find any info regarding this thing. Suggestions are appreciated.
Re: How to close multivu window from macro
Posted: Mon Aug 19, 2013 4:07 pm
by Yama001
This is a little over my head, but I believe you can terminate a process (Windows NT/XP etc) with the taskkill command. You should be able to launch it from a chemstation macro (if the chemstation "dosrun" command works on your system, this is fairly simple).
Re: How to close multivu window from macro
Posted: Tue Aug 20, 2013 8:26 am
by aceto_81
If you can run dos command, this is indeed very easy with taskkill, or you can go more advanced by compiling an AutoIT executable and run this.
Ace
Re: How to close multivu window from macro
Posted: Tue Aug 20, 2013 4:00 pm
by zegockie
Thanks for reply but could you be more specific?
I don't see multivu.exe process in the list of processes in task manager.
Re: How to close multivu window from macro
Posted: Wed Aug 21, 2013 5:43 am
by aceto_81
If you are in taskmanager, you can rightclick at the application and choose go to process.
Then you can use taskkill /f /im yourprocess
If you can't find your process, certainly take a look at AutoIT, it has an info module where you can find a lot of info about your running programs (even button names to click on if you wish).
HTH
Ace
Re: How to close multivu window from macro
Posted: Wed Aug 21, 2013 2:14 pm
by zegockie
The thing is that multivu.exe is not in the list of working applications. The window is open displaying my report, but no there is no other indications of working application. I opened multivu.exe the way how Chemstation does it. If I produce the next report, it opens the next window and so on. I just want to close previous window(s) from my macro.
Re: How to close multivu window from macro
Posted: Thu Aug 22, 2013 6:10 am
by aceto_81
I think you should take a look at AutoIT, that adresses such things really well.
Another way would be writing a VBS which uses AppActivate("Name in titlebar"), and then close the window.
Then you could run the script from the shell.
HTH
Ace
Re: How to close multivu window from macro
Posted: Mon Dec 02, 2013 5:02 pm
by zegockie
those multivu windows are child windows within DA. I cannot kill them using taskkill. Somewhere should be more info, but unfortunately I cannot find where.
Re: How to close multivu window from macro
Posted: Mon Dec 02, 2013 9:16 pm
by James_Ball
those multivu windows are child windows within DA. I cannot kill them using taskkill. Somewhere should be more info, but unfortunately I cannot find where.
Do you need to view each report, or just generate the report to file for later use? If you don't need to view them then just let the macro send them to report without opening the window the was the menu bar does when you send report to file instead of to screen or printer.
If you are going to view each one then I can't see why it would need to be closed automatically.
Taken from the CCCheck.mac file (not sure if this is the answer to the problem but it seems to have a relevant comment in there)
endif
cc_file=1
cc_printer=0
ccrow = 0
open _methpath$+_methfile$+"\cccheck.txt" for output as #3
ccheader
timediv=60000
cmpd_is_amt = 1
result_num=1
found_istd = 0
lastprint$=" "
print _$(23705,"Generating Continuing Calibration Report")
m = 1
while m <= id_peaks
GETNEXT
m = m + 1
endwhile
Footer output,3,CurrLen
close #3
FILE PRIMARYFILE$ !move here to keep multivu window displayed
if output = 0
dosrunnotepad ccrptfile$
endif
if output = 1
startjob "evaluate_concal"+_datafile$,pdfname$
printtextfile ccrptfile$,dhrows
endjob
endif
CheckMthPrinter 0
if in_sequence = 1
topdot_ "flag_spc"
topdot_ "flag_ccc"
endif
cccleanup
Re: How to close multivu window from macro
Posted: Tue Dec 03, 2013 8:45 pm
by zegockie
What I would like to do is to close one multivu window within DA.
I made a macro I am absolutely happy with which opens one multivu window (to display a library search). Everything is fine but after several searches I have several child windows open. Obviously I can close them manually. I just would like to add some code to my macro to close previous multivu window when I run the next library search. Unfortunately I cannot find anything relevant, nor a detailed manual/help for multivu.
Re: How to close multivu window from macro
Posted: Thu Dec 05, 2013 1:24 pm
by Yama001
This has been an annoying issue - at some point Agilent decided to keep the window within the DA process - never liked that change.
Perhaps you can use notepad (dosrun "notepad.exe filename") instead to open your file - that will open in a separate process that you may be able to kill with some of the tricks that have been mentioned.