How do acquire images to disk and specify he path and name within the macro?
I tied recording this within the capture interface but the only thing that was recorded was the capture.
I want to create an app where a user can select a path as a save location (ideally with a "browse" button) and enter a prefix and automatically save the images when the user clicks capture.
0
Best Answer
-
David,The capture commands have many more parameters than what is recorded by default. You can make them appear by clicking "Display All" in the Properties panel when looking at the macro in design view.You can also ask to record all in order to see them in code view, or just add the few that matter:
Public Function NewMacro() As SimpleScript NewMacro = New SimpleScript Dim image1 With Capture.CaptureCommands.Settings(NewMacro) .CaptureToFile=True .FilePath="D:\" .Run() End With With Capture.CaptureCommands.Acquire(NewMacro) .Run(Nothing, image1) End With End Function
Then you should be able to insert this code into your app and link it to a browse button. I'll post something separately to show how to browse for a file.Pierre0
Answers
-
Thanks, that worked. However, it is strange to me that it didn't record those options that I had explicitly changed during the recording.0
-
Yes there appears to be an issue with the recording of some capture settings changes, I filed a bug and this will be addressed in the next capture patch.0
Categories
- All Categories
- 961 Image-Pro v9 and higher
- 9 Image-Pro FAQs
- 18 Image-Pro Download & Install
- 448 Image-Pro General Discussions
- 486 Image-Pro Automation (Macros, Apps, Reports)
- 20 AutoQuant Deconvolution
- 2 AutoQuant Download & Install
- 18 AutoQuant General Discussions
- 195 Image-Pro Plus v7 and lower
- 3 Image-Pro Plus Download & Install
- 106 Image-Pro Plus General Discussions
- 86 Image-Pro Plus Automation with Macros
- 19 Legacy Products
- 16 Image-Pro Premier 3D General Discussions
- 26 Image-Pro Insight General Discussions