Scripting Helpers
Most of these are tips and tricks for creating GUIs.
- Multi-page GUI ~
Forum Topic
- It is possible to hide a Tab control while still utilizing its functionality.
This provides the illusion of multiple pages in a GUI.
- Floating-point Edit Control ~
Forum Topic
- The number option for Edit controls is often too restrictive because it does not allow negative or floating
point numbers. This code can be adapted to create custom input restrictions.
- Tab Header Click Event ~
Forum Topic
- A Tab control's gLabel is launched when the current tab changes, but not when the current tab is clicked. It is
possible to catch clicks or double-clicks on the currently active tab.
- Non-contiguous Radio Group ~
Forum Topic
- Radio groups normally encompass consecutively added buttons; however, it
is possible to create one Radio group spanning an entire GUI with intervening controls.
- Edit Control Default Text ~
Forum Topic
- Display default messages in Edit controls whenever the user does not provide input.
- Discussion: Global Variables ~
Forum Topic
- Recommendation to avoid global variables in modular or large scripts.
- Discussion: GUI Creation ~
Forum Topic
- Recommendation to avoid Gui, Destroy in all scripts.
- Send & Receive ~
Forum Topic
- Here is a demonstration of sending text messages between two running scripts using SendMessage and ASCII codes. The
script automatically creates a receiver to send messages to.
- Dynamic Hotkeys ~
Forum Topic
- Often in a program it is convenient to let the user create hotkeys that perform specific actions. It can be a bit
tricky to figure out, so this forum topic provides two examples.
- Chat Log ~
Forum Topic
- When you want to display text that continually updates (such as a chat window or log file) an edit control is the obvious
solution. The trouble is getting it to scroll as you append, keeping the newest information visible. Here is one way to do
that.
- Real-Time Search ~
Forum Topic
- A neat trick using two overlapping listview controls to simulate real-time keyword searching of a database.
- ETA (for loops) ~
Forum Topic
- This scriptlet was an answer to another help request. Add it to a loop you've created, and it will employ
Linear Regression to display a
progress bar along with the amount of time remaining until the loop finishes (its Estimated Time of Arrival). Gives you
something to look at while a long sequence of commands is running.
- Pixel Ruler ~
Forum Topic
- Here's a quick hotkey that measures the distance between two points on the screen in pixels. It can help with the layout
of GUIs.