From WikiChip
/comopen Command - mIRC
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
The /comopen command opens a COM connection to specified programmatic identifier with the assigned name. Your script should check $comerr after opening the connection to make sure the connection was established successfully.
Synopsis[edit]
/comopen <name> <progid>
Switches[edit]
None
Parameters[edit]
- <name> - Connection name to be used
- <progid> - Programmatic Identifier
Example[edit]
Alias Example { ;Create a WshShell object comopen Example wscript.shell ;Destroy object comclose Example }
; see more documentation at: https://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys(v=vs.110).aspx ; and be careful about mIRC interpreting % & and other special characters //sendkeys {ESC}%o{END}{UP 2}%bText In mIRC Titlebar+{TAB}{ENTER} alias sendkeys { ; trying to create unique WshShell object var %name sendkeys $+ $ticks $+ $rand(111,9999) .comopen %name WScript.Shell if (!$comerr) { var %result $com(%name,SendKeys,3,bstr,$1-) ;Destroy object when finished with it .comclose %name return %result } return 0 }
Compatibility[edit]
Added: mIRC v5.9
Added on: 26 Apr 2001
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.
See also[edit]
mIRC commands list