From WikiChip
Difference between revisions of "mirc/identifiers/$inpaste"
Maroonbells (talk | contribs) |
Maroonbells (talk | contribs) (→See also) |
||
Line 33: | Line 33: | ||
== See also == | == See also == | ||
* {{mIRC|on events/on input|ON INPUT}} | * {{mIRC|on events/on input|ON INPUT}} | ||
− | * {{mIRC|on events/on | + | * {{mIRC|on events/on parseline|ON PARSELINE}} |
* {{mIRC|$ctrlenter}} | * {{mIRC|$ctrlenter}} | ||
* {{mIRC|$comchar}} | * {{mIRC|$comchar}} |
Latest revision as of 17:16, 10 January 2020
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
$inpaste returns $true if a user triggered the ON INPUT event by pressing Control+V or Shift+Insert to paste text into an editbox or using the 'Paste' choice from the editbox's right-click menu.
It appears that $inpaste is mostly $false, and can be $true only when:
- In channel editbox where Options/Display/Other/'Editbox Lines' is set to 'Single'
- In @window editbox created with /window -e0 or -e, or created with -e3 while Editbox Lines is set to single
- Clipboard contains at least one of $cr $lf $crlf
- Paste from the clipboard triggers the ON INPUT event
- $inpaste is used within the ON INPUT or ON PARSELINE:out event
- Note: If you paste text into the editbox which doesn't trigger the INPUT event, pressing <enter> later messaging the pasted text to #channel does not set $inpaste to $true.
Synopsis[edit]
$inpaste
Paramters[edit]
None
Properties[edit]
None
Example[edit]
on *:INPUT:*:{ if ( ($istok(/ $comchar,$left($strip($1),1),32)) && (!$ctrlenter) && ($inpaste)) { echo -g Preventing this pasted /command from being executed: $1- | halt } }
on *:PARSELINE:out:*:{ echo -s debug $scriptline $event : $inpaste is $true only if this line was triggered by pasting from the clipboard : $parseline }
if ($inpaste) echo -a INPUT event triggered by paste from clipboard elseif ($ctrlenter) echo -a INPUT event triggered by pressing <enter> and <Ctrl> keys together else echo -a INPUT event triggered by pressing <enter>
Compatibility[edit]
Added: mIRC v5.8
Added on: 05 Sep 2000
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.