Macro editing - help needed
I’m trying to analyse percentage staining of tissue for a drug trial. I’m blinded as to what groups each same has been assigned to, so it’s really important that I can keep track of the file names.
What I’m trying to do is (always) subtract the background light image from the active image before then applying filter ranges, counting and exporting to excel
I’m using the macro wizard but I’m having a problem. When it subtracts the background it creates a new image, and renames this filename_BGSubtracted, but then when I try to batch process using this macro it renames every new image file as filename_BGSubtracted (whatever the original image I used to record the macro). This means that when it exports the data to excel everything is named the same and I can’t keep track of my samples.
What I need is its original filename with BGSubtracted added to it.
The relevant bit of my macro code is below – I’m guessing I need to change something in the line where is says name, but I don’t know how to phrase it (sorry – I’m a biologist not a coder!)
Any help or suggestions welcomed,
Public Function ceri_test() As SimpleScript
ceri_test = New SimpleScript
Dim doc1, image1, doc2
Dim var1 = "background_subtract_tif", doc3, window1, window2
.TabName = "Process"
.Name = "Pre 020 CHN M Plac PLGF0004_BGSubtracted"
.Visible = True