Stringscan

Check-in [8912fce095]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Refinement of scripting interface
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:8912fce09583e92d314c114c3b4988c882cc42ab17525acd002fd2d66d6e4930
User & Date: kevin 2020-05-09 12:36:12
Context
2020-05-09
18:30
Updated Windows files check-in: 8eb6ed45eb user: kevin tags: trunk
12:36
Refinement of scripting interface check-in: 8912fce095 user: kevin tags: trunk
2020-05-08
20:03
Tweak for scripting check-in: 8a6f14ff0c user: kevin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to stringscan.rb.

74
75
76
77
78
79
80

81

82
83
84
85
86
87
88
89
90

91
92
93
94
95
96
97
...
116
117
118
119
120
121
122
123

124
125
126
127
128
129
130
...
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
                filename=(args[0]).delete('{}')
                begin
                    if File.directory?(filename)
                        $tbox.configure('state'=>'normal')
                        $tbox.delete('1.0', 'end')
                        $tbox.configure('state'=>'disabled')
                        $lbox.delete(0, 'end')

                        $dirname = filename

                        $direntry.value = filename
                    end
                rescue
                    raise
                end
            })   			
        set_search_term = Tk.install_cmd(proc{
			|*args|
				searchname=(args[0])

				$termentry.insert('end', searchname)
				$searchterm = searchname
				$termentry.value = searchname
			})											
        execute_search = Tk.install_cmd(proc{
			|*args|
				args = ""
................................................................................
        $grep_list = []
        if $termentry.get == ""
          return
        end
        if $direntry.get == ""
            return
         end
         

        $bottomlabel.configure('text' => "Searching for \"#{$searchterm}\" in #{$dirname}...")
        $lbox.delete(0, 'end')
        $tbox.configure('state'=>'normal')
        $tbox.delete('1.0', 'end')
        $tbox.configure('state'=>'disabled')
        $root.update
        Find.find("#{$dirname}") do |path|
................................................................................

#check version of installed software
def checkUpdate 
    Tk.tk_call('softwareupdate::setIcon', $winicon)
    Tk.tk_call('softwareupdate::checkVersion', $appname, $appversion)
end

#scripting commands
def set_search_term (term)
	$searchterm=term
	return #searchterm
end

def set_search_dir (dir)
	$dirname = dir
	return $dirname
end

def execute_search
	stringgrep
end

#user help
def showHelp
    Tk.tk_call('machelp::userhelp')
end

#exit
def shutdown







>

>








|
>







 







|
>







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
...
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
...
415
416
417
418
419
420
421















422
423
424
425
426
427
428
                filename=(args[0]).delete('{}')
                begin
                    if File.directory?(filename)
                        $tbox.configure('state'=>'normal')
                        $tbox.delete('1.0', 'end')
                        $tbox.configure('state'=>'disabled')
                        $lbox.delete(0, 'end')
                        $direntry.delete(0, 'end')
                        $dirname = filename
                        $direntry.insert('end', filename)
                        $direntry.value = filename
                    end
                rescue
                    raise
                end
            })   			
        set_search_term = Tk.install_cmd(proc{
			|*args|
			        searchname=(args[0])
                                $termentry.delete(0, 'end')
				$termentry.insert('end', searchname)
				$searchterm = searchname
				$termentry.value = searchname
			})											
        execute_search = Tk.install_cmd(proc{
			|*args|
				args = ""
................................................................................
        $grep_list = []
        if $termentry.get == ""
          return
        end
        if $direntry.get == ""
            return
         end
        $dirname = $direntry.get
        $searchterm = $termentry.get
        $bottomlabel.configure('text' => "Searching for \"#{$searchterm}\" in #{$dirname}...")
        $lbox.delete(0, 'end')
        $tbox.configure('state'=>'normal')
        $tbox.delete('1.0', 'end')
        $tbox.configure('state'=>'disabled')
        $root.update
        Find.find("#{$dirname}") do |path|
................................................................................

#check version of installed software
def checkUpdate 
    Tk.tk_call('softwareupdate::setIcon', $winicon)
    Tk.tk_call('softwareupdate::checkVersion', $appname, $appversion)
end
















#user help
def showHelp
    Tk.tk_call('machelp::userhelp')
end

#exit
def shutdown