Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Red [
- Title: "Find specific values in OS PATH"
- Author: "Arie van Wingerden"
- Version: 1.0
- Date: "2017-07-25"
- Needs: 'view
- ]
- list: split get-env "path" ";"
- process: function [arg] [
- result: []
- i: 0
- if arg = "" [
- foreach elem list [
- i: i + 1
- append result rejoin [pad/left i 4 " " elem]
- ]
- return result
- ]
- arg: lowercase arg
- foreach elem list [
- if find elem arg = none [
- continue
- ]
- i: i + 1
- append result rejoin [pad/left i 4 " " elem]
- ]
- return result
- ]
- view/options [
- title "Find specific values in OS PATH"
- below
- q_t: text "Enter search string:"
- a_t: field 700
- text "Results:"
- r_t: text-list 700x400 font-name "Courier new" []
- across
- button "Search" [r_t/data: process a_t/text]
- button "Quit" [quit]
- ] [
- actors: make object! [on-key: func [face [object!] event [event!]] [
- print ["Face/type:" face/type event]
- { Commented out
- if xevent/key = 'enter [
- r_t/data: process a_t/text
- ]
- }
- ]
- ]
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement