Skip to content

Instantly share code, notes, and snippets.

@Metaxal
Last active Oct 31, 2021
Embed
What would you like to do?
Quickscript to open multiple files at once
#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