Skip to content, Skip to search

Changes

Script Parameters

275 bytes added, 02:33, 19 February 2018
Add file extensions-based filters
| | <code>File</code>
| file chooser
| | <code>open</code> {{!}} <code>save</code> {{!}} <code>directory</code> {{!}} <code>extensions:</code>
|}
The exact same code works for the [[Macros|ImageJ1 Macro language]], too.
 
You can set restrictions on accepted file types based on file extension (using a <code>style</code> property):
 
<source lang="python">
#@ File(label="Select an image file", style="extensions:png/jpg") myImageFile
 
print(myImageFile)
</source>
If you want to select a directory instead, use a <code>style</code> property:
160
edits