s= GetIOLine x=instr(s,"LOMA CHECKWEIGHER") Global1=Global1+1 'currentlinenum variable not working the same as in Designer when compiled so using Global1 to keep track of position if x>0 then 'showmessage(Global1) Rep=trim(getline(Global1-2)) 'get report name (Fails when compiled but works in Script Designer) 'showmessage(Rep) Dat=trim(getline(Global1-4)) 'get date&Time stamp from file Filenam = Rep & " - " & Dat Filenam=replace(Filenam,":","-") ' remove colons from filename ' Path="C:/AAA/" 'DefaultSaveDir Ext=".TXT" 'DefaultExt if Ext=".*" then Ext="" end if showmessage("line#" & cstr(Global1-2)&" " & cstr(currentlinenum)&" " & Rep) 'TriggerAutoSave(Path+Filenam+Ext) ' TriggerAutoSave(Filenam+Ext) 'showmessage(Path+Filenam+Ext) 'use this for debugging/testing only end if