使用

3.1. 編輯檔案

如果要編輯檔案,請執行下列步驟:

  1. 請按一下檔案的十六進位或 ASCII 檢視。 檢視若為作用中,則會顯示完整的游標。 檢視若為非作用中,則只會顯示游標的外框。

  2. 請使用下列任一種方法,在檔案中移動游標:

    • Use the scrollbar on the window or the arrow keys on the keyboard to scroll through the file.
    • 請選擇編輯 ▸ 到位元,以十進制或十六進制鍵入游標偏移量,然後按一下確定。十六進制數值的格式,必須為 0x 加上偏移量,例如 0x3。
  3. Edit the ASCII format in the same way you edit a normal text file. To edit the hexadecimal format, use the values 0 to 9 and a to f.

To insert data and not overwrite existing data, choose Edit ▸ Insert Mode.

To cut, copy, and paste data, choose Edit ▸ Cut, Edit ▸ Copy, and Edit ▸ Paste.

To undo an edit, choose Edit ▸ Undo. To redo an edit, choose Edit ▸ Redo. The number of previous edits that you can undo is determined by the Maximum number of undo levels setting in the 第 4.1 節 ― 編輯 tabbed section of the Preferences dialog.

3.2. 儲存檔案

您可以使用下列方式儲存檔案:

  • 如果要將變更儲存至目前的檔案,請選擇檔案 ▸ 儲存
  • 如果要用新的檔名儲存目前的檔案,請選擇檔案 ▸ 另存新檔。請在選擇檔案儲存緩衝區對話方塊中,輸入檔案的名稱,然後按一下確定

3.3. To Revert to the Last Saved Version of a File

To revert to the last version of the current file that you saved and undo all of the edits that you made to the file since you last saved the file, choose File ▸ Revert, then click Yes in the Question dialog.

3.4. 在檔案中尋找資料

如果要在檔案中搜尋十六進制或 ASCII 字串,請執行下列步驟:

  1. 請選擇 編輯 ▸ 尋找

  2. 尋找資料對話方塊中,選擇下列任一項選項:

    • 搜尋十六進位資料
    • 搜尋 ASCII 資料
  3. 請輸入您想要尋找的字串。

  4. 按一下尋找下一個,尋找下一個符合的字串。

  5. 按一下尋找上一個,尋找上一個符合的字串。

  6. Click Cancel to close the Find Data dialog.

3.5. To Perform an Advanced Find

To perform an advanced find, perform the following steps:

  1. Choose Edit ▸ Advanced Find.
  2. In the Find Data dialog, select the required search criteria. For information about how to add new search criteria, see 第 3.6 節 ― To Add Search Criteria.
  3. 按一下尋找下一個,尋找下一個符合的字串。
  4. 按一下尋找上一個,尋找上一個符合的字串。
  5. Click Close to close the Find Data dialog.

3.6. To Add Search Criteria

To add search criteria, perform the following steps:

  1. Choose Edit ▸ Advanced Find.

  2. In the Find Data dialog, click Add New.

  3. In the Find Data: Add Search dialog, choose one of the following options:

    • 搜尋十六進位資料
    • 搜尋 ASCII 資料
  4. 請輸入您想要尋找的字串。

  5. Use the color wheel or the spin boxes to select a color to highlight the search criteria.

  6. Click Add.

  7. Click Cancel to close the Find Data dialog.

3.7. To Remove Search Criteria

To remove search criteria, perform the following steps:

  1. Choose Edit ▸ Advanced Find.
  2. In the Find Data dialog, select the search criteria that you want to remove.
  3. Click Remove Selected.
  4. Click Cancel to close the Find Data dialog.

3.8. 在檔案中尋找並取代資料

如果要先在檔案中搜尋十六進制或 ASCII 字串,然後取代該字串,請執行下列步驟:

  1. 請選擇編輯 ▸ 取代

  2. 尋找 & 取代資料對話方塊中,選擇下列任一項選項:

    • 取代十六進位資料
    • 取代 ASCII 資料
  3. 請在第一個文字方塊中,輸入您想要尋找的字串。

  4. 請在第二個文字方塊中,輸入您想要取代所尋找字串的字串。

  5. 請按一下尋找下一個

  6. 請按一下取代,取代目前所在位置的字串;或是按一下全部取代,取代所有該字串。

  7. Click Cancel to close the Find & Replace Data dialog.

3.9. 新增或移除檔案的其他檢視

To add another view of the current file to your GHex window, choose View ▸ Add View.

如果要移除目前檔案的檢視,請選擇檢視 ▸ 移除檢視。如果您移除的是最後一個開啟的檔案,本應用程式便會結束。

3.10. To Change the Data Group Type

To change how GHex displays the hexadecimal content of a file in the GHex window, choose View ▸ Group Data As, then select one of the following menu items:

  • Bytes - single bytes
  • Words - groups of two bytes
  • Longwords - groups of four bytes

3.11. 匯出 GHex 檢視至 HTML

如果要將 GHex 視窗中的資料匯出至 HTML,請選擇檔案 ▸ 儲存為 HTML。請選擇目錄,並為 HTML 檔案指定檔案名稱,然後按一下確定GHex 會執行下列動作:

  • GHex 視窗中顯示的各個資料頁,分別建立不同的 HTML 檔案。
  • 使用所指定的 HTML 檔案名稱,作為檔名的基礎。
  • 在檔案名稱中附加頁數,以區別檔案。
例如,如果您指定的檔案名稱是 log.htmlGHex 便會建立一系列名稱為 log00000000.htmllog00000001.htmllog00000002.html 等等的 HTML 檔案。

3.12. 檢視字元表

如果要檢視以 ASCII、十六進位、十進位、八進位及二進位表示法表示 0 到 255 數值的表格,請選擇視窗 ▸ 字元表

3.13. 檢視資料轉換

如果要顯示最多四個位元組資料的二進制、十進制、十六進制以及 ASCII 轉換,請執行下列步驟:

  1. 請選擇視窗 ▸ 基數轉換程式

  2. 執行下列任一項動作:

    • 請在基數轉換程式對話方塊的其中一個欄位,鍵入要轉換的資料,然後按一下 Return
    • 如果要在目前檔案的游標位置顯示資料轉換,請按一下取得游標值按鈕。

    GHex 會更新其他欄位的數值,顯示資料轉換。

  3. Click Close to close the Base Converter dialog.

3.14. To Show or Hide the Type Conversion Dialog

To show or hide the type conversion dialog, choose Windows ▸ Type Conversion Dialog.

The type conversion dialog displays the value of the selected character in the following representations:

  • Signed 8 bit
  • Unsigned 8 bit
  • Signed 16 bit
  • Unsigned 16 bit
  • Signed 32 bit
  • Unsigned 32 bit
  • 32 bit float
  • 64 bit float
  • Hexadecimal
  • Octal
  • Binary
  • Stream Length

The type conversion dialog also contains the following options:

Show little endian decoding

Select this option to show little endian decoding.

Show unsigned and float as hexadecimal

Select this option to show unsigned and float numbers as hexadecimal numbers.

3.15. 列印檔案

如果要列印檔案,請選擇檔案 ▸ 列印。請在列印對話方塊中,選取所需的列印選項,然後按一下確定

如果要預覽列印檔案的副本,請選擇檔案 ▸ 列印預視