home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1996 February / VPR9602A.ISO / fwindows / exds100 / spack / exceedv6.frm < prev    next >
Text File  |  1995-09-29  |  18KB  |  528 lines

  1. VERSION 2.00
  2. Begin Form Scop 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "ファイル列で結合 動作試験 Ver 1.00 "
  5.    FontBold        =   0   'False
  6.    FontItalic      =   0   'False
  7.    FontName        =   "MS ゴシック"
  8.    FontSize        =   12.75
  9.    FontStrikethru  =   0   'False
  10.    FontUnderline   =   0   'False
  11.    Height          =   4650
  12.    Icon            =   EXCEEDV6.FRX:0000
  13.    Left            =   4695
  14.    LinkTopic       =   "Form2"
  15.    ScaleHeight     =   4200
  16.    ScaleWidth      =   7020
  17.    Top             =   7275
  18.    Width           =   7140
  19.    Begin TextBox Text2 
  20.       BackColor       =   &H0000FFFF&
  21.       FontBold        =   0   'False
  22.       FontItalic      =   0   'False
  23.       FontName        =   "MS ゴシック"
  24.       FontSize        =   12.75
  25.       FontStrikethru  =   0   'False
  26.       FontUnderline   =   0   'False
  27.       Height          =   435
  28.       Index           =   5
  29.       Left            =   4740
  30.       TabIndex        =   22
  31.       Text            =   "0"
  32.       Top             =   1740
  33.       Width           =   855
  34.    End
  35.    Begin TextBox Text2 
  36.       BackColor       =   &H0000FFFF&
  37.       FontBold        =   0   'False
  38.       FontItalic      =   0   'False
  39.       FontName        =   "MS ゴシック"
  40.       FontSize        =   12.75
  41.       FontStrikethru  =   0   'False
  42.       FontUnderline   =   0   'False
  43.       Height          =   435
  44.       Index           =   4
  45.       Left            =   1920
  46.       TabIndex        =   20
  47.       Text            =   "0"
  48.       Top             =   1740
  49.       Width           =   855
  50.    End
  51.    Begin TextBox Text2 
  52.       BackColor       =   &H0000FFFF&
  53.       FontBold        =   0   'False
  54.       FontItalic      =   0   'False
  55.       FontName        =   "MS ゴシック"
  56.       FontSize        =   12.75
  57.       FontStrikethru  =   0   'False
  58.       FontUnderline   =   0   'False
  59.       Height          =   435
  60.       Index           =   1
  61.       Left            =   4740
  62.       TabIndex        =   18
  63.       Text            =   "0"
  64.       Top             =   1230
  65.       Width           =   855
  66.    End
  67.    Begin OptionButton OPT 
  68.       BackColor       =   &H00C0C0C0&
  69.       Caption         =   "PASSTHRU"
  70.       FontBold        =   0   'False
  71.       FontItalic      =   0   'False
  72.       FontName        =   "MS ゴシック"
  73.       FontSize        =   12.75
  74.       FontStrikethru  =   0   'False
  75.       FontUnderline   =   0   'False
  76.       Height          =   375
  77.       Index           =   1
  78.       Left            =   1920
  79.       TabIndex        =   17
  80.       Top             =   2670
  81.       Width           =   1455
  82.    End
  83.    Begin OptionButton OPT 
  84.       BackColor       =   &H00C0C0C0&
  85.       Caption         =   "WITHIN"
  86.       FontBold        =   0   'False
  87.       FontItalic      =   0   'False
  88.       FontName        =   "MS ゴシック"
  89.       FontSize        =   12.75
  90.       FontStrikethru  =   0   'False
  91.       FontUnderline   =   0   'False
  92.       Height          =   375
  93.       Index           =   0
  94.       Left            =   1920
  95.       TabIndex        =   16
  96.       Top             =   2340
  97.       Value           =   -1  'True
  98.       Width           =   1455
  99.    End
  100.    Begin CommandButton command1 
  101.       Caption         =   "解説"
  102.       FontBold        =   -1  'True
  103.       FontItalic      =   0   'False
  104.       FontName        =   "MS ゴシック"
  105.       FontSize        =   12.75
  106.       FontStrikethru  =   0   'False
  107.       FontUnderline   =   0   'False
  108.       Height          =   525
  109.       Index           =   6
  110.       Left            =   3330
  111.       TabIndex        =   14
  112.       Top             =   3450
  113.       Width           =   1035
  114.    End
  115.    Begin TextBox Text2 
  116.       BackColor       =   &H0000FFFF&
  117.       FontBold        =   0   'False
  118.       FontItalic      =   0   'False
  119.       FontName        =   "MS ゴシック"
  120.       FontSize        =   12.75
  121.       FontStrikethru  =   0   'False
  122.       FontUnderline   =   0   'False
  123.       Height          =   435
  124.       Index           =   3
  125.       Left            =   1920
  126.       TabIndex        =   11
  127.       Text            =   "0"
  128.       Top             =   1230
  129.       Width           =   855
  130.    End
  131.    Begin CommandButton command1 
  132.       Caption         =   "制限"
  133.       FontBold        =   -1  'True
  134.       FontItalic      =   0   'False
  135.       FontName        =   "MS ゴシック"
  136.       FontSize        =   12.75
  137.       FontStrikethru  =   0   'False
  138.       FontUnderline   =   0   'False
  139.       Height          =   525
  140.       Index           =   5
  141.       Left            =   2340
  142.       TabIndex        =   10
  143.       Top             =   3450
  144.       Width           =   1005
  145.    End
  146.    Begin CommandButton command1 
  147.       Caption         =   "閲覧"
  148.       FontBold        =   0   'False
  149.       FontItalic      =   0   'False
  150.       FontName        =   "MS ゴシック"
  151.       FontSize        =   12.75
  152.       FontStrikethru  =   0   'False
  153.       FontUnderline   =   0   'False
  154.       Height          =   465
  155.       Index           =   4
  156.       Left            =   5700
  157.       TabIndex        =   9
  158.       Top             =   720
  159.       Width           =   855
  160.    End
  161.    Begin CommandButton command1 
  162.       Caption         =   "閲覧"
  163.       FontBold        =   0   'False
  164.       FontItalic      =   0   'False
  165.       FontName        =   "MS ゴシック"
  166.       FontSize        =   12.75
  167.       FontStrikethru  =   0   'False
  168.       FontUnderline   =   0   'False
  169.       Height          =   465
  170.       Index           =   2
  171.       Left            =   5700
  172.       TabIndex        =   8
  173.       Top             =   150
  174.       Width           =   855
  175.    End
  176.    Begin TextBox Text2 
  177.       BackColor       =   &H0000FFFF&
  178.       FontBold        =   0   'False
  179.       FontItalic      =   0   'False
  180.       FontName        =   "MS ゴシック"
  181.       FontSize        =   12.75
  182.       FontStrikethru  =   0   'False
  183.       FontUnderline   =   0   'False
  184.       Height          =   435
  185.       Index           =   2
  186.       Left            =   1920
  187.       TabIndex        =   5
  188.       Text            =   "out.txt"
  189.       Top             =   720
  190.       Width           =   3705
  191.    End
  192.    Begin TextBox Text2 
  193.       BackColor       =   &H0000FFFF&
  194.       FontBold        =   0   'False
  195.       FontItalic      =   0   'False
  196.       FontName        =   "MS ゴシック"
  197.       FontSize        =   12.75
  198.       FontStrikethru  =   0   'False
  199.       FontUnderline   =   0   'False
  200.       Height          =   435
  201.       Index           =   0
  202.       Left            =   1920
  203.       TabIndex        =   3
  204.       Text            =   "data10.txt"
  205.       Top             =   180
  206.       Width           =   3705
  207.    End
  208.    Begin CommandButton command1 
  209.       Caption         =   "終了"
  210.       FontBold        =   -1  'True
  211.       FontItalic      =   0   'False
  212.       FontName        =   "MS ゴシック"
  213.       FontSize        =   12.75
  214.       FontStrikethru  =   0   'False
  215.       FontUnderline   =   0   'False
  216.       Height          =   525
  217.       Index           =   1
  218.       Left            =   5370
  219.       TabIndex        =   2
  220.       Top             =   3450
  221.       Width           =   975
  222.    End
  223.    Begin CommandButton command1 
  224.       Caption         =   "実行"
  225.       FontBold        =   -1  'True
  226.       FontItalic      =   0   'False
  227.       FontName        =   "MS ゴシック"
  228.       FontSize        =   12.75
  229.       FontStrikethru  =   0   'False
  230.       FontUnderline   =   0   'False
  231.       Height          =   525
  232.       Index           =   0
  233.       Left            =   4350
  234.       TabIndex        =   0
  235.       Top             =   3450
  236.       Width           =   1035
  237.    End
  238.    Begin Label Label2 
  239.       Alignment       =   1  '右揃え
  240.       BackStyle       =   0  '透明
  241.       Caption         =   "終了バイト位置"
  242.       FontBold        =   0   'False
  243.       FontItalic      =   0   'False
  244.       FontName        =   "MS ゴシック"
  245.       FontSize        =   12.75
  246.       FontStrikethru  =   0   'False
  247.       FontUnderline   =   0   'False
  248.       Height          =   375
  249.       Index           =   6
  250.       Left            =   3090
  251.       TabIndex        =   23
  252.       Top             =   1800
  253.       Width           =   1575
  254.    End
  255.    Begin Label Label2 
  256.       Alignment       =   1  '右揃え
  257.       BackStyle       =   0  '透明
  258.       Caption         =   "終了レコード"
  259.       FontBold        =   0   'False
  260.       FontItalic      =   0   'False
  261.       FontName        =   "MS ゴシック"
  262.       FontSize        =   12.75
  263.       FontStrikethru  =   0   'False
  264.       FontUnderline   =   0   'False
  265.       Height          =   375
  266.       Index           =   5
  267.       Left            =   270
  268.       TabIndex        =   21
  269.       Top             =   1800
  270.       Width           =   1575
  271.    End
  272.    Begin Label Label2 
  273.       Alignment       =   1  '右揃え
  274.       BackStyle       =   0  '透明
  275.       Caption         =   "開始バイト位置"
  276.       FontBold        =   0   'False
  277.       FontItalic      =   0   'False
  278.       FontName        =   "MS ゴシック"
  279.       FontSize        =   12.75
  280.       FontStrikethru  =   0   'False
  281.       FontUnderline   =   0   'False
  282.       Height          =   375
  283.       Index           =   1
  284.       Left            =   3090
  285.       TabIndex        =   19
  286.       Top             =   1290
  287.       Width           =   1575
  288.    End
  289.    Begin Label Label2 
  290.       Alignment       =   1  '右揃え
  291.       BackStyle       =   0  '透明
  292.       Caption         =   "オプション"
  293.       FontBold        =   0   'False
  294.       FontItalic      =   0   'False
  295.       FontName        =   "MS ゴシック"
  296.       FontSize        =   12.75
  297.       FontStrikethru  =   0   'False
  298.       FontUnderline   =   0   'False
  299.       Height          =   375
  300.       Index           =   4
  301.       Left            =   630
  302.       TabIndex        =   15
  303.       Top             =   2490
  304.       Width           =   1125
  305.    End
  306.    Begin Label Label4 
  307.       BackStyle       =   0  '透明
  308.       BorderStyle     =   1  '実線
  309.       Caption         =   "黄色のエリアにはファイル名などをもれなく設定して下さい"
  310.       FontBold        =   0   'False
  311.       FontItalic      =   0   'False
  312.       FontName        =   "MS ゴシック"
  313.       FontSize        =   10.5
  314.       FontStrikethru  =   0   'False
  315.       FontUnderline   =   0   'False
  316.       ForeColor       =   &H000000FF&
  317.       Height          =   735
  318.       Left            =   210
  319.       TabIndex        =   13
  320.       Top             =   3210
  321.       Width           =   1995
  322.    End
  323.    Begin Label Label2 
  324.       Alignment       =   1  '右揃え
  325.       BackStyle       =   0  '透明
  326.       Caption         =   "開始レコード"
  327.       FontBold        =   0   'False
  328.       FontItalic      =   0   'False
  329.       FontName        =   "MS ゴシック"
  330.       FontSize        =   12.75
  331.       FontStrikethru  =   0   'False
  332.       FontUnderline   =   0   'False
  333.       Height          =   375
  334.       Index           =   3
  335.       Left            =   270
  336.       TabIndex        =   12
  337.       Top             =   1290
  338.       Width           =   1575
  339.    End
  340.    Begin Label Label3 
  341.       Alignment       =   1  '右揃え
  342.       BackStyle       =   0  '透明
  343.       Caption         =   "返却値"
  344.       FontBold        =   0   'False
  345.       FontItalic      =   0   'False
  346.       FontName        =   "MS ゴシック"
  347.       FontSize        =   12.75
  348.       FontStrikethru  =   0   'False
  349.       FontUnderline   =   0   'False
  350.       ForeColor       =   &H00FF0000&
  351.       Height          =   345
  352.       Left            =   3990
  353.       TabIndex        =   7
  354.       Top             =   2550
  355.       Width           =   855
  356.    End
  357.    Begin Label Label2 
  358.       Alignment       =   1  '右揃え
  359.       BackStyle       =   0  '透明
  360.       Caption         =   "出力ファイル"
  361.       FontBold        =   0   'False
  362.       FontItalic      =   0   'False
  363.       FontName        =   "MS ゴシック"
  364.       FontSize        =   12.75
  365.       FontStrikethru  =   0   'False
  366.       FontUnderline   =   0   'False
  367.       Height          =   375
  368.       Index           =   2
  369.       Left            =   300
  370.       TabIndex        =   6
  371.       Top             =   780
  372.       Width           =   1575
  373.    End
  374.    Begin Label Label2 
  375.       Alignment       =   1  '右揃え
  376.       BackStyle       =   0  '透明
  377.       Caption         =   "ファイル1"
  378.       FontBold        =   0   'False
  379.       FontItalic      =   0   'False
  380.       FontName        =   "MS ゴシック"
  381.       FontSize        =   12.75
  382.       FontStrikethru  =   0   'False
  383.       FontUnderline   =   0   'False
  384.       Height          =   375
  385.       Index           =   0
  386.       Left            =   240
  387.       TabIndex        =   4
  388.       Top             =   240
  389.       Width           =   1635
  390.    End
  391.    Begin Label Label1 
  392.       BackColor       =   &H0000FF00&
  393.       BorderStyle     =   1  '実線
  394.       FontBold        =   0   'False
  395.       FontItalic      =   0   'False
  396.       FontName        =   "MS ゴシック"
  397.       FontSize        =   12.75
  398.       FontStrikethru  =   0   'False
  399.       FontUnderline   =   0   'False
  400.       Height          =   495
  401.       Left            =   4890
  402.       TabIndex        =   1
  403.       Top             =   2460
  404.       Width           =   705
  405.    End
  406. End
  407. Option Explicit
  408.  
  409. Dim DELM As Integer
  410.  
  411. Sub Command1_Click (Index As Integer)
  412. Dim ret
  413. Dim sFile As String
  414. Dim fFile As String
  415. Dim dam   As String
  416. Dim dam1   As String
  417. Dim dam2   As String
  418. Dim dam3   As String
  419. Dim dam4   As String
  420. Dim t
  421. Dim x1 As Integer, y1 As Integer, x2 As Integer, y2 As Integer
  422. Dim ccc As String
  423.  
  424.   ccc = Chr$(13)
  425.   sFile = text2(0).Text
  426.   fFile = text2(2).Text
  427.   dam1 = text2(3).Text
  428.   dam2 = text2(1).Text
  429.   dam3 = text2(4).Text
  430.   dam4 = text2(5).Text
  431.  
  432.   Select Case Index
  433.   Case 0                                '実行
  434.     y1 = Val(Trim$(dam1))               'start record
  435.     y2 = Val(Trim$(dam3))               'end   record
  436.     x1 = Val(Trim$(dam2))               'start byte
  437.     x2 = Val(Trim$(dam4))               'end   byte
  438.     If x1 < x2 And y1 < y2 Then
  439.       If Len(Trim$(sFile)) > 0 Then
  440.         If Len(Trim$(fFile)) > 0 Then
  441.           screen.MousePointer = 11
  442.           If OPT(0).Value Then
  443.             ret = ScopeFiles%(sFile, fFile, y1, x1, y2, x2, 1)
  444.           Else
  445.             ret = ScopeFiles%(sFile, fFile, y1, x1, y2, x2, 0)
  446.           End If
  447.           Label1.Caption = Str$(ret)
  448.           screen.MousePointer = 1
  449.           If ret > 0 Then
  450.             command1(0).Tag = text2(2).Text
  451.             Viewer.Show 1
  452.           Else
  453.             MsgBox "参照できませんでした"
  454.           End If
  455.           screen.MousePointer = 1
  456.           Exit Sub
  457.         End If
  458.       End If
  459.       MsgBox "ファイル名が指定されていません.", 48, "設定エラー"
  460.       Exit Sub
  461.     Else
  462.       MsgBox "開始終了の関係に矛盾があります", 48, "設定エラー"
  463.     End If
  464.   Case 1                                '終了
  465.     Unload Me
  466.   Case 2                                '閲覧
  467.     t = Shell("notepad.exe " + sFile, 1)
  468.   Case 4                                '閲覧
  469.     t = Shell("notepad.exe " + fFile, 1)
  470.   Case 6                                '解説
  471.     dam = ""
  472.     dam = dam + "<機能概要>  ScopeFiles" + ccc + ccc
  473.     dam = dam + " テキストファイルの任意の部分をBOX範囲で指定して" + ccc
  474.     dam = dam + " 取り出した部分をファイルに出力します。" + ccc
  475.     dam = dam + " " + ccc
  476.     dam = dam + "<VBでの呼び出し方法>" + ccc + ccc
  477.     dam = dam + " ①定義方法はVBプログラムソースのEXCEEDF.BASを参照して下さい。" + ccc
  478.     dam = dam + " ②引数について" + ccc + ccc
  479.     dam = dam + "    ScopeFiles%( P1 , P2 , P3 , P4 )" + ccc
  480.     dam = dam + "   P1:参照元ファイル名称" + ccc
  481.     dam = dam + "   P2:参照結果のファイル名称(新規に作成されます。)" + ccc
  482.     dam = dam + "   P3:開始レコード番号(0オリジン)" + ccc
  483.     dam = dam + "   P4:開始バイト位置(0オリジン)" + ccc
  484.     dam = dam + "   P5:終了レコード番号(0オリジン)" + ccc
  485.     dam = dam + "   P6:終了バイト位置(0オリジン)" + ccc
  486.     dam = dam + "   P7:0,PASSTHRU 1,WITHIN" + ccc
  487.     dam = dam + "    2バイト文字の2バイト目がちょうど開始バイト位置になっている場合" + ccc
  488.     dam = dam + "    または第1バイト目が終了バイトになっている場合、その文字を含めるか" + ccc
  489.     dam = dam + "    否かを指定するオプションです。" + ccc
  490.     dam = dam + "    PASSTHRUの場合は含まれます。" + ccc + ccc
  491.     dam = dam + "<返却値> 0:エラー n:正常" + ccc + ccc
  492.     dam = dam + "" + ccc
  493.     dam = dam + ccc
  494.     dam = dam + " メールはLDI04643へどうぞ" + ccc
  495.     dam = dam + "                     (C) EXCEED CORP. 1995 "
  496.     MsgBox dam, 64, version
  497.   Case 5                                '制限
  498.     dam = ""
  499.     dam = dam + "<制限事項>" + ccc + ccc
  500.     dam = dam + " (1)ファイル1には1レコード以上のデータを持つこと" + ccc
  501.     dam = dam + " (2)結果ファイルのレコード長が最大1024を越えないこと" + ccc
  502.     dam = dam + " (3)結果ファイルのレコード数が32767を越えないこと" + ccc
  503.     dam = dam + " (4)ファイル1はテキスト形式であり1レコードの区切りが改行であること" + ccc
  504.     dam = dam + " (5)ファイル1と出力ファイル名は異なっていなければなりません。" + ccc
  505.     dam = dam + "以上の点を制限として考えておりますが、何か問題がありましたらメールにてご連絡下さい" + ccc
  506.     dam = dam + ccc
  507.     dam = dam + " メールはLDI04643へどうぞ" + ccc
  508.     dam = dam + "                     (C) EXCEED CORP. 1995 "
  509.     MsgBox dam, 64, version
  510.   End Select
  511. End Sub
  512.  
  513. Sub Form_Load ()
  514. Dim i
  515.   i = FileMain.CMD(0).Tag
  516.   Caption = FileMain.CMD(i).Caption + " (" + FileMain.Label1(i).Caption + ")"
  517.   DELM = 0
  518. top = 200
  519. left = 200
  520. End Sub
  521.  
  522. Sub OPT_Click (Index As Integer)
  523.   If OPT(Index).Value Then
  524.     DELM = Index
  525.   End If
  526. End Sub
  527.  
  528.