Application options
If you have a file named options.txt
in the app/
folder, you can set some configuration options for Scriptonit that you could not achieve from within your application. Omitting this file is allright; all settings have defaults. But if you don't want your users to be able to exit with Alt+F4, or want to change the default dimensions of the application window, here's how it's done. (the ending comments are optional, thank you Captain Obvious)
Close on ESC yes // main window closes on ESC
Initial window size 900x500 // on first start; then it remembers
Initial window position 100,100 // on first start; then it remembers
Initial border style none // sizable/none/... (FormBorderStyle)
Maximum window size 1200x800 // resizing constraints
Minimum window size 300x200 // resizing constraints
Always on top no // stay-on-top window, default=no
Remember window position yes // remember last time
Remember window size yes // remember last time
Follow document title changes yes // js can change title
Break on script errors yes // allow js to throw errors
Use web browser context menu no // right-clicking shows browser menu
Use web browser hotkeys no // F5 to refresh, etc; default=no
Use Scriptonit context menu no // Scriptonit's own right-click menu
As you can see, the file format is very simple, it probably doesn't need much explanation. However it's important to note that at least 3 spaces or a tab is required between the columns. (Makes sense btw) Also, there are some non-trivials:
- No quotes needed - anything after the separator spaces will be considered as one string.
- Comments are tricky - you can start a line with
//
, but to append a comment, use 3+ spaces before//
! - AxB means A,B - when specifying coordinate pairs, you can use the letter
x
as a separator. - Many ways to bool - you can say yes, no, true, false, on, off, enabled or disabled.
That's all you need to know.