home *** CD-ROM | disk | FTP | other *** search
- G4C ;$VER: CliMaster 2.5 (22.06.97)
-
- winbig -1 -1 530 145 "CLI-MasterII © G.Maddox 1997 v2.5"
- winsmall 65 11 530 145
- wintype 11110001
- varpath "requester.g/routine.g/functions.g/*/config.g/hotdir.g/favorite.g/hunt.g"
-
- xonload
- set output "con:0/11/640/200/Cli-Master II Output/auto/close"
- if $$g4c.version < 32
- ezreq "I need at least\nversion 3.2 of Gui4Cli" Okay ""
- stop
- endif
- extract climaster guipath cmst_guipth
- assign CMST: $cmst_guipth
- delvar cmst_guipth
- ttget :climaster
- if $ICONSTART = YES
- setgad climaster 7 on
- else
- guiopen climaster
- endif
- guiload cmst:modules/requester.g
- lvuse climaster $cm_srce
-
- xonopen
- setgad climaster 7 off
-
- xonclose
- setgad climaster 7 on
-
- xonkey #5
- xonkey #8
- xonkey #18
- xonkey z
- gosub climaster stretchbuf 2 70 0 350 ;left
- xonkey x
- gosub climaster stretchbuf 2 210 0 210 ;centre
- xonkey c
- gosub climaster stretchbuf 2 350 0 70 ;right
-
- xondiskin
- lvuse climaster $cm_dest
- if $$lv.dir = ''
- lvdir refresh
- endif
- lvuse climaster $cm_srce
- if $$lv.dir = ''
- lvdir refresh
- endif
-
- xappicon 0 0 :climaster CLI-Master cm_goto off
- gadid 7
- guiopen climaster
- update climaster 8 "Welcome Back!!"
- if $cm_goto > ''
- gosub climaster godir
- gosub climaster update
- gosub climaster addpath
- endif
-
- xappwindow cm_goto
- if $cm_goto > ''
- gosub climaster godir
- gosub climaster update
- gosub climaster addpath
- endif
-
- box 0 13 320 12 out button
- box 200 25 20 12 out button
-
- ;------------------------------------------------------------- Events
-
- xlistview 0 37 210 110 "" cm_select "" 0 dir
- gadid 1
- gadhelp '$ll'
- gadfont topaz.font 8 000
- gosub routine.g filetype
- xlvhook 1
- gosub climaster update
- xlvdirhook 1
- gosub climaster update
- gosub climaster addpath
-
- xlistview 210 37 210 110 "" cm_select "" 0 dir
- gadid 2
- gadhelp '$rl'
- gadfont topaz.font 8 000
- gosub routine.g filetype
- xlvhook 2
- gosub climaster update
- xlvdirhook 2
- gosub climaster update
- gosub climaster addpath
-
- xtextin 20 0 245 13 "" cm_srcedir "" 512
- gadid 3
- gadhelp "Shows the LEFT lister's path. Paths can be typed in here."
- lvuse climaster 1
- lvdir #$cm_srcedir
- gosub climaster update
-
- xtextin 285 0 245 13 "" cm_srcedir "" 512
- gadid 4
- gadhelp "Shows the RIGHT lister's path. Paths can be typed in here."
- lvuse climaster 2
- lvdir #$cm_srcedir
- gosub climaster update
-
- text 0 0 20 13 "" 1 box
- gadid 5
- gadfont topaz.font 8 010
-
- text 265 0 20 13 "" 1 box
- gadid 9
- gadfont topaz.font 8 010
-
- xlistview 420 37 110 110 "" cm_mode "" 0 txt
- gadid 6
- gadhelp 'The FUNCTIONS perform various actions on selected files.'
- gadfont topaz.font 8 000
- lvuse climaster $cm_srce
- if $cm_mode == "getsize"
- gosub climaster nosource
- lvaction size cm_temp
- update climaster 8 "Total Selected: $cm_temp Bytes."
- stop
- elseif $cm_mode == "newcli"
- cd sys:
- cli 'newshell con:0/11/640/200/AmigaShell/auto/close from s:shell-startup'
- stop
- elseif $cm_mode == "run"
- gosub climaster nofile
- gosub routine.g filetype
- lvdir none
- stop
- elseif $cm_mode == "execute"
- gosub climaster nofile
- cli 'c:execute $cm_select'
- lvdir none
- stop
- else
- gosub climaster update
- gosub climaster nosource
- gosub functions.g functs
- endif
-
- text 10 13 300 12 "" 60 nobox
- gadid 8
-
- xbutton 0 25 40 12 Dev ;Vol 1
- gadfont topaz.font 8 010
- gadhelp 'This produces a Device List in the LEFT lister.'
- lvuse climaster 1
- lvdir disks
- gosub climaster update
-
- xbutton 40 25 20 12 : ;root 1
- gadfont topaz.font 8 010
- gadhelp 'Sends the LEFT lister to the ROOT directory.'
- lvuse climaster 1
- lvdir root
- gosub climaster update
- gosub climaster addpath
-
- xbutton 60 25 20 12 / ;parnt 1
- gadfont topaz.font 8 010
- gadhelp 'Sends the LEFT lister to the PARENT directory.'
- lvuse climaster 1
- lvdir parent
- gosub climaster update
- gosub climaster addpath
-
- xbutton 80 25 40 12 All ;all 1
- gadhelp 'SELECT ALL files and directories in the LEFT lister.'
- lvuse climaster 1
- lvdir all
- gosub climaster update
-
- xbutton 120 25 40 12 None ;none 1
- gadhelp 'DE-SELECT ALL files and directories in the LEFT lister.'
- lvuse climaster 1
- lvdir none
- gosub climaster update
-
- xbutton 160 25 40 12 Refr ;refresh 1
- gadhelp 'REFRESH the contents of the LEFT lister.'
- lvuse climaster 1
- lvdir refresh
- gosub climaster update
-
- xbutton 220 25 40 12 Dev ;Vol 2
- gadfont topaz.font 8 010
- gadhelp 'This produces a Device List in the RIGHT lister.'
- lvuse climaster 2
- lvdir disks
- gosub climaster update
-
- xbutton 260 25 20 12 : ;root 2
- gadfont topaz.font 8 010
- gadhelp 'Sends the RIGHT lister to the ROOT directory.'
- lvuse climaster 2
- lvdir root
- gosub climaster update
- gosub climaster addpath
-
- xbutton 280 25 20 12 / ;parnt 2
- gadfont topaz.font 8 010
- gadhelp 'Sends the RIGHT lister to the PARENT directory.'
- lvuse climaster 2
- lvdir parent
- gosub climaster update
- gosub climaster addpath
-
- xbutton 300 25 40 12 All ;all 2
- gadhelp 'SELECT ALL files and directories in the RIGHT lister.'
- lvuse climaster 2
- lvdir all
- gosub climaster update
-
- xbutton 340 25 40 12 None ;none 2
- gadhelp 'DE-SELECT ALL files and directories in the RIGHT lister.'
- lvuse climaster 2
- lvdir none
- gosub climaster update
-
- xbutton 380 25 40 12 Refr ;refresh 2
- gadhelp 'REFRESH the contents of the RIGHT lister.'
- lvuse climaster 2
- lvdir refresh
- gosub climaster update
-
- xbutton 420 25 20 12 < ;<--
- gadfont topaz.font 8 010
- gadhelp 'EXPAND the RIGHT lister for easier viewing.'
- gosub climaster stretchbuf 2 70 0 350 ;left
-
- xbutton 440 25 30 12 >< ;>|<
- gadfont topaz.font 8 010
- gadhelp 'NORMALIZE both listers.'
- gosub climaster stretchbuf 2 210 0 210 ;centre
-
- xbutton 470 25 20 12 > ;-->
- gadfont topaz.font 8 010
- gadhelp 'EXPAND the LEFT lister for easier viewing.'
- gosub climaster stretchbuf 2 350 0 70 ;right
-
- xbutton 490 25 40 12 S=D ;copybuf
- gadhelp 'Copies the contents of the SOURCE to the DESTINATION.'
- cm_destdir = $cm_srcedir
- if $cm_srce = 1
- lvuse climaster 2
- lvdir #$cm_srcedir
- update climaster 4 $cm_srcedir
- elseif $cm_srce = 2
- lvuse climaster 1
- lvdir #$cm_srcedir
- update climaster 3 $cm_srcedir
- endif
- lvuse climaster $cm_srce
- gosub climaster update
-
- xarea 200 25 20 12 none ;switch S/D
- gadkey " "
- gadhelp 'SWAP the SOURCE and DESTINATION. Hotkey = Spacebar.'
- if $cm_srce = 1
- lvuse climaster 2
- elseif $cm_srce = 2
- lvuse climaster 1
- endif
- gosub climaster update
-
- xbutton 320 13 30 12 #?
- gadhelp 'Select files by PATTERN. Do not enter the "#?"'
- gosub climaster nosource
- guiopen routine.g
-
- xbutton 350 13 60 12 _HotDir ;hotdir
- gadhelp 'Opens the HOTDIR window for fast moving around.'
- guiopen hotdir.g
-
- xbutton 410 13 40 12 _User ;usrbut
- gadhelp 'Opens the USER COMMAND window.'
- guiload cmst:modules/usrcomm.g
-
- xbutton 450 13 80 12 _Favourite ;favourites
- gadhelp 'Opens the FAVOURITES path list.'
- guiload cmst:modules/favorite.g
-
- ;-------------------------------------------------------------- Menus
-
- xmenu "Project" "About" "" A
- guiload cmst:modules/about.g
-
- xmenu "Project" "Help..." "" H
- guiload cmst:modules/cmhelp.g
-
- xmenu "Project" "Iconify " "" I
- ifexists window routine.g
- guiclose routine.g
- endif
- guiclose climaster
-
- xmenu "Project" barlabel "" ""
-
- xmenu "Project" "Quit" "" Q
- cli 'resident filenote remove'
- cli 'resident copy remove'
- cli 'resident list remove'
- assign CMST: remove
- guiquit routine.g
- guiquit functions.g
- guiquit hotdir.g
- guiquit runreq.g
- guiquit dms.g
- ifexists window sfxinfo
- gosub sfxinfo stopmod
- endif
- guiquit sfxinfo
- guiquit climaster
-
- xmenu "Disk" "Format" "" F
- guiload cmst:modules/format.g
-
- xmenu "Disk" "Disk Copy " "" D
- guiload cmst:modules/dcopy.g
-
- xmenu "Disk" "Install" "" B
- cm_mode = "install"
- guiload cmst:modules/relab.g
-
- xmenu "Disk" "Relabel" "" R
- cm_mode = "relab"
- guiload cmst:modules/relab.g
-
- xmenu "Disk" barlabel "" ""
-
- xmenu "Disk" "Print Dir" "" P
- lvsave t:tempfile
- copy t:tempfile prt:
- delete t:tempfile
-
- xmenu Settings "Configuration" "" C
- guiload cmst:modules/config.g
-
- xmenu Settings "Function Ed" "" E
- guiload cmst:modules/fled.g
-
- xmenu Settings "User Commands" "" U
- guiload cmst:modules/user.g
-
- ;----------------------------------------------------------- Routines
-
- xroutine update
- update climaster 8 ""
- cm_srce = $$lv.id
- if $cm_srce = 1
- cm_dest = 2
- ll = 'This is the current SOURCE lister.'
- rl = 'This is the current DESTINATION lister.'
- update climaster 3 $$lv.dir
- update climaster 5 "S"
- update climaster 9 ""
- else
- cm_dest = 1
- rl = 'This is the current SOURCE lister.'
- ll = 'This is the current DESTINATION lister.'
- update climaster 4 $$lv.dir
- update climaster 5 ""
- update climaster 9 "S"
- endif
- lvuse climaster $cm_dest
- cm_destdir = $$lv.dir
- lvuse climaster $cm_srce
- cm_srcedir = $$lv.dir
-
- xroutine addpath
- if $cm_srcedir > ""
- lvuse hotdir.g 1
- lvsearch $cm_srcedir ci first
- if $$lv.rec != $cm_srcedir
- lvadd $cm_srcedir
- endif
- lvuse climaster $cm_srce
- endif
-
- xroutine stretchbuf
- changearg climaster 1 $$arg.0 $$arg.1
- changearg climaster 2 $$arg.2 $$arg.1
- changearg climaster 2 $$arg.0 $$arg.3
- partredraw climaster 0 37 420 106
-
- xroutine nosource
- if $cm_srcedir = ""
- update climaster 8 "No Source Directory!"
- stop
- endif
-
- xroutine nodest
- if $cm_destdir = ""
- update climaster 8 "No Target Directory!"
- stop
- endif
-
- xroutine nofile
- lvmulti first
- if $cm_select = ""
- update climaster 8 "No File(s) Selected."
- stop
- endif
-
- xroutine godir
- ifexists DOS $cm_goto
- orifexists DIR $cm_goto
- lvuse climaster $cm_srce
- lvdir #$cm_goto
- return
- elseifexists FILE $cm_goto
- extract cm_goto path cm_aptmp
- lvuse climaster $cm_srce
- lvdir #$cm_aptmp
- extract cm_goto file cm_aptmp
- lvfind $cm_aptmp
- endif
-
- ;--------------------------------------------
-
- newfile sfxinfo
-
- winbig -1 0 290 12 " Playing Module..."
- wintype 01010000
- varpath "climaster/*/routine.g"
-
- xonopen
- guiwindow climaster on
-
- text 0 0 240 12 "" 30 box
- gadid 1
-
- xbutton 240 0 50 12 Stop
- gosub sfxinfo stopmod
-
- xroutine stopmod
- cli '$STOPMUSIC'
- update sfxinfo 1 ""
- ifexists gui climaster
- guiclose sfxinfo
- else
- guiquit sfxinfo
- endif
-