Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

How to add extra data to the end of the file? [solved]

Featured Replies

  • Author
  • Localization

Shiroi Bara, posted Sat Mar 05, 2016 1:34 pm (11788)


I have a file "file.fle". It's size 40 bytes. I need add 5 bytes (01 fe 48 9a 53) to its end and keep 40 original bytes at the beginning. New size of "file.fle" should be 45 bytes. I tried to use MEMORY_FILE, PutVarChr, append commands but i'm stuck. How to write right bms script for that?
  • Author
  • Localization

aluigi, posted Sat Mar 05, 2016 3:13 pm (11791)


A solution can be the following:
Code:
set NAME string "new_file.fle"
set MEMORY_FILE binary "\x01\xfe\x48\x9a\x53"
get SIZE asize
log NAME 0 SIZE
append
log NAME 0 5 MEMORY_FILE
  • Author
  • Localization

Shiroi Bara, posted Sat Mar 05, 2016 3:52 pm (11796)


Thank you very much for quick response! I just replaced first string in you code on (i'm using one script to add same data for different files):
Code:
Get NAME filename

and it works perfect.
  • Author
  • Localization

aluigi, posted Sat Mar 05, 2016 3:55 pm (11797)


Yeah good.
Usually I prefer to create a new file, for example with some instructions like the following:
Code:
get NAME basename
get EXT extension
string NAME "_new."
string NAME EXT
It may be a good suggestion for the future.
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.