Such functionality is already build into Plus! as a basic feature.
You do not need any scripting for that...
Go to the
Quick Text options and create a quicktext, using the (!P) tag. You can assign either a macro command or a predefined hotkey. When the command or hotkey is entered a popup will appear where you can fill in the variable paramater....
Plus! > Preferences & Options > Features > Quick Texts
Example:
If you want anything more fancy you do need scripts though.