Användning

3.1. Så här redigerar du en fil

Om du vill redigera en fil, följer du stegen nedan:

  1. Klicka i filens hexadecimala vy eller ASCII-vy. I den vy där markören är aktiv visas en fullständig markör. I den andra vyn visas bara markörens kontur.

  2. Om du vill flytta markören i filen gör du på något av följande sätt:

    • Use the scrollbar on the window or the arrow keys on the keyboard to scroll through the file.
    • Välj Redigera ▸ Gå till byte, ange markörpositionen som ett decimalt eller hexadecimalt värde och klicka sedan påOK. Formatet på det hexadecimala värdet måste starta med 0x följt av positionen, till exempel 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 Avsnitt 4.1 ― Redigerar tabbed section of the Preferences dialog.

3.2. Så här sparar du en fil

Du kan spara filen på följande sätt:

  • Om du vill spara ändringar som du har gjort i den aktuella filen väljer du Arkiv ▸ Spara.
  • Om du vill spara den aktuella filen med ett annat namn väljer du Arkiv ▸ Spara som. Ange ett namn för filen dialogen Välj en fil att spara bufferten som och klicka därefter påOK.

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. Så här hittar du data i en fil

Om du vill söka i en fil efter en hexadecimal sträng eller en ASCII-sträng, följer du stegen nedan:

  1. Välj Redigera ▸ Sök.

  2. I dialogen Sök data väljer du något av följande alternativ:

    • Search for hex data
    • Search for ASCII data
  3. Ange den sträng du vill söka efter.

  4. Klicka påSök nästa för att hitta nästa förekomst av strängen.

  5. Klicka påHitta föregående för att hitta föregående förekomst av strängen.

  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 Avsnitt 3.6 ― To Add Search Criteria.
  3. Klicka påSök nästa för att hitta nästa förekomst av strängen.
  4. Klicka påHitta föregående för att hitta föregående förekomst av strängen.
  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:

    • Search for hex data
    • Search for ASCII data
  4. Ange den sträng du vill söka efter.

  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. Så här söker du efter och ersätter data i en fil

Om du vill söka efter en hexadecimal sträng eller ASCII-sträng i en fil och sedan ersätta strängen med en annan, följer du stegen nedan:

  1. Välj Redigera ▸ Ersätt.

  2. I dialogen Sök och ersätt data väljer du något av följande alternativ:

    • Replace hex data
    • Replace ASCII data
  3. I den första textrutan anger du den sträng du vill söka efter.

  4. I den andra rutan anger du den sträng som du vill ersätta den sökta strängen med.

  5. Klicka påSök nästa.

  6. Klicka påErsätt om du vill ersätta den aktuella förekomsten av strängen eller klicka påErsätt alla om du vill ersätta alla förekomster av strängen.

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

3.9. Så här lägger du till och tar bort ytterligare vyer av en fil

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

Om du vill ta bort en vy av den aktuella filen väljer du Visa ▸ Ta bort vy. Om du tar bort den sista öppna vyn avslutas programmet.

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. Så här exporterar du innehållet i GHex-fönstret till HTML

To export the data contained in the GHex window to HTML, choose File ▸ Save As HTML. Choose a directory and specify a filename for the HTML file, then click OK. GHex implements the following actions:

  • Creates a separate HTML file for each page of data that is displayed in the GHex window.
  • Uses the HTML filename that you specify as the basis for the filename.
  • Appends a page number to the filename to differentiate the files.
For example, if you specify the filename log.html, GHex creates a series of HTML files named log00000000.html, log00000001.html, log00000002.html, and so on.

3.12. Så här visar du en teckentabell

Om du vill visa en tabell med ASCII-värdet samt de hexadecimala, decimala, oktala och binära representationerna för alla värden mellan 0 och 255, väljer du Fönster ▸ Teckentabell.

3.13. Så här visar du konverterade data

Om du vill visa ASCII-värdet samt den binära, decimala, hexadecimala representationen av upp till fyra byte data, följer du stegen nedan:

  1. Välj Fönster ▸ Konverterare.

  2. Gör något av följande:

    • Ange de data som du vill konvertera i något av fälten i dialogrutan Konverterare och tryck påRetur.
    • Om du vill visa konverteringarna för de data som finns vid markören klickar du på knappen Hämta värde vid markör.

    GHex uppdaterar värdena i de andra fälten med de konverterade värdena.

  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. Så här skriver du ut en fil

Du skriver ut en fil genom att välja Arkiv ▸ Skriv ut. Ange önskade alternativ för utskrift i dialogrutan Skriv ut och klicka sedan påOK.

Om du vill förhandsgranska filen väljer du Arkiv ▸ Förhandsgranska.