Skip to content

Instantly share code, notes, and snippets.

@wader
Last active July 14, 2021 02:28
Show Gist options
  • Select an option

  • Save wader/be983fa10ef24fa4dcb3e1a616e725dd to your computer and use it in GitHub Desktop.

Select an option

Save wader/be983fa10ef24fa4dcb3e1a616e725dd to your computer and use it in GitHub Desktop.
Hex Fiend template development tricks
WAV.tcl {
prep: osascript \
-e 'tell application "System Events"' \
-e ' tell process "Hex Fiend"' \
-e ' click pop up button 1 of window 1' \
-e ' click menu item "WAV" of menu 1 of pop up button 1 of window 1' \
-e ' end tell' \
-e 'end tell'
}

Template debug log

Run application binary directly in a terminal to get TCL output from puts etc

$ /Applications/Hex\ Fiend.app/Contents/MacOS/Hex\ Fiend

Now in some template do puts test and you will see test on the terminal

Find position for script crash

Wrap code in a catch and print error on crash. This will hide the error from Hex Fiend and also show the parial tree.

if [catch {
    # call parse code
}] {
    puts $errorInfo
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment