summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJordan Wiens <jordan@psifertex.com>2023-11-30 22:51:38 -0500
committerJordan Wiens <jordan@psifertex.com>2023-11-30 22:51:44 -0500
commit577025979aee0204ce3c5f80a346e5b898e0b023 (patch)
tree2e7236931c4c4f7a2527d2c22b4e92b4762c5eba /docs
parentf1d97429401367d0749e37f7f99cd163987e2a9c (diff)
docs updated for repl concepts section
Diffstat (limited to 'docs')
-rw-r--r--docs/dev/concepts.md4
-rw-r--r--docs/guide/index.md2
2 files changed, 5 insertions, 1 deletions
diff --git a/docs/dev/concepts.md b/docs/dev/concepts.md
index 43bef354..4247a873 100644
--- a/docs/dev/concepts.md
+++ b/docs/dev/concepts.md
@@ -18,6 +18,10 @@ print("test")
and then checking the `Log` pane where you will see an `Analysis update took #.###` message. This is a convenience the UI does for you just like if you were to change a type or create a function, you almost always want the analysis to be updated. However, in scripts you run yourself as plugins or via the "Run Script" command, you may not get the same results mid-execution until after the entire script is finished running.
+To achieve the same results when writing a stand-alone plugin, you'd need to use [`current_function.reanalyze()`](https://api.binary.ninja/binaryninja.function-module.html#binaryninja.function.Function.reanalyze), [`bv.update_analysis_and_wait()`](https://api.binary.ninja/binaryninja.binaryview-module.html#binaryninja.binaryview.BinaryView.update_analysis_and_wait), or similar methods.
+
+Another difference in the REPL / scripting console is that the scripting console is not executing on the main thread. This means that if you wish to interact with the UI via QT or BN UI APIs from the console (for example, to [trigger an action via string](https://gist.github.com/psifertex/6fbc7532f536775194edd26290892ef7#file-trigger_actions-py)), you'd need to use [`mainthread.execute_on_main_thread_and_wait()`](https://api.binary.ninja/binaryninja.mainthread-module.html#binaryninja.mainthread.execute_on_main_thread_and_wait) or similar.
+
![Scriping Console ><](../img/console.png "Python Scripting Console")
## Operating on IL versus Native
diff --git a/docs/guide/index.md b/docs/guide/index.md
index 3292ca95..da2125d0 100644
--- a/docs/guide/index.md
+++ b/docs/guide/index.md
@@ -673,7 +673,7 @@ From here, you can add any custom functions or objects you want to be available
#### "Run Script..."
???+ Danger "Warning"
- When you run commands in the scripting console, the UI will automatically update analysis. This is because quite often when you make a change in the console you expect it to be immediately reflected in the UI. The same is not true when running a script where you must trigger `bv.update_analysis_and_wait()` or `current_function.reanalze()` to experience the same behavior.
+ When you run commands in the scripting console, the UI will automatically update analysis. This is because quite often when you make a change in the console you expect it to be immediately reflected in the UI. The same is not true when running a script where you must trigger `bv.update_analysis_and_wait()` or `current_function.reanalyze()` to experience the same behavior.
The "Run Script..." option in the File Menu allows loading a python script from your filesystem and executing it
within the console. It can also be run via the Command Palette or bound to a key.