Quickscript to open multiple files at once
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket/base | |
;;; License: [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) or | |
;;; [MIT license](http://opensource.org/licenses/MIT) at your option. | |
(require quickscript | |
quickscript/utils | |
racket/class | |
racket/string | |
racket/gui/base) | |
(script-help-string "Open multiple files at once") | |
(define-script open-multi | |
#:label "Open multiple files…" | |
#:menu-path ("&Utils") | |
(λ (selection #:frame fr) | |
(define files | |
(get-file-list "Select one or several Racket files" | |
fr | |
#f | |
#f | |
#f | |
'() | |
'(("Racket Sources" "*.rkt;*.scm;*.scrbl;*.ss;*.rktd;*.rktl") | |
("Any" "*.*")))) | |
(when files | |
(for ([f (in-list files)]) | |
(smart-open-file fr f))) | |
#f)) | |
(module url2script-info racket/base | |
(provide url filename) | |
(define filename "open-multi.rkt") | |
(define url "https://gist.github.com/Metaxal/3ed323747e1af0bd4df5acd56b03b45e")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment