by
nimbi63 » Tue Jan 21, 2014 6:46 pm
You can use a macro, then call the macro in a pre integration hook.
Lines below starting with an exclamation mark are comments, without the !! are commands.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! Macro to load the specified signal !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! Example macro to show use of the preinteg HOOK register !!
!! load the specified signal. Method dependencies are user's !!
!! responsibility. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Name Load_Sig_Hook
!method dependencies need to be added here
!change the line below to match your actual method name
IF _METHFILE$ = "DEMOCAL1.M"
! Load the signal
! NOTE: Use LOADCHRO.MAC from the user contributed library to determine the
! parameters to be used below. RT=retention time, WL=wavelength, BW=bandwidth
! LoadChrom ,RTFrom:RTTo, (WL - BW/2) : (WL + BW/2), \
! (RefWL - RefBW/2) : (RefWL + RefBW/2), ChromReg
! The active line that follows loads sig 268 [BW=10] ref 360 [BW=80]
! over the RT range 0.00 to 29.97 from the previously loaded DAD signal
! in chromreg just prior to integration.
! NOTE: Automatic integration should be turned on in the load signal
! dialog box.
LoadChrom ,0:29.97, 263:273, 220:400, ChromReg
!add more signals here if desired
!LoadChrom ,0:29.97, 223:233, 220:400, ChromReg
! Update display
Drawsignals
EndIf
!add more methods below
!IF _METHFILE$ = "DEMOCAL2.M"
!LoadChrom ,0:29.97, 263:273, 220:400, ChromReg
!Drawsignals
!EndIf
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! Return control to system !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Return
EndMacro
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! INSTALLATION macro to create and/or append commands to load !!
!! macro LOAD_SIG.MAC to USER.MAC file. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
name Install_Load_Sig
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! Append Macro commands to file USER.MAC to !!
!! add automatic loading of macro LOAD_SIG.MAC!!
!! during Chemstation initialization !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Local file_path$, file_name$
local ret_var, export_status, export_type
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! Update USER.MAC with selections !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Open _EXEPATH$ + "USER.MAC" for append as #101
Print #101, ""
Print #101, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
Print #101, "!! Section Added By LOAD_SIG.MAC !!"
Print #101, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
Print #101, "Macro "+Chr$(34)+"LOAD_SIG.MAC"+Chr$(34)
Print #101, "SETHOOK "+Chr$(34)+"PreInteg"+Chr$(34)+","\
+Chr$(34)+"Load_Sig_Hook"+Chr$(34)
Print #101, "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
Close #101
ret_var = Alert("Load_Sig.MAC installed for automatic loading - Restart Your ChemStation Sessions Now",3,"INSTALLATION COMPLETED")
Return
EndMacro