on *:load:{
var %now = $input(Add mIRC shell extension now?,vyq,mIRC shell extension)
if (%now == $yes) shellDDE
echo $colour(info) -st * You can type /shellDDE to add the shell extension manually
}
;By Rich (Rich@home.nl)
;Adds registry entries for mIRC shell extension
;Syntax:
;/shellDDE
alias shellDDE {
if ($regwrite(HKEY_CLASSES_ROOT\*\shell\Execute_mIRC_Commands\,Execute &mIRC Commands) != $ok) { echo $colour(info) -at * /shellDDE: error writing registry key HKEY_CLASSES_ROOT\*\shell\Execute_mIRC_Commands | halt }
if ($regwrite(HKEY_CLASSES_ROOT\*\shell\Execute_mIRC_Commands\command\,$mircexe) != $ok) { echo $colour(info) -at * /shellDDE: error adding writing key HKEY_CLASSES_ROOT\*\shell\Execute_mIRC_Commands\command | halt }
if ($regwrite(HKEY_CLASSES_ROOT\*\shell\Execute_mIRC_Commands\ddeexec\,/dde_execute $chr(37) $+ 1) != $ok) { echo $colour(info) -at * /shellDDE: error adding writing key HKEY_CLASSES_ROOT\*\shell\Execute_mIRC_Commands\ddeexec | halt }
if ($regwrite(HKEY_CLASSES_ROOT\*\shell\Execute_mIRC_Commands\ddeexec\Application\,$ddename) != $ok) { echo $colour(info) -at * /shellDDE: error writing writing key HKEY_CLASSES_ROOT\*\shell\Execute_mIRC_Commands\ddeexec\Application | halt }
if ($regwrite(HKEY_CLASSES_ROOT\*\shell\Execute_mIRC_Commands\ddeexec\topic\,command) != $ok) { echo $colour(info) -at * /shellDDE: error writing registry key (HKEY_CLASSES_ROOT\*\shell\Execute_mIRC_Commands\ddeexec\topic | halt }
echo $colour(info) -qat * mIRC shell extension added!
if (!$isdde($ddename)) {
if ($show) !ddeserver on
else !.ddeserver on
echo $colour(info) -qat * mIRC's DDE server has to be enabled for this to work!
}
}
; Script by Raccoon@EFNet/#mIRC
; Will execute the same command on multiple-selected files for up to 5 seconds,
; without prompting for a command again. Modify -u5 flag to adjust.
alias dde_execute {
if ( !%DDE_EXECUTE.CMD ) set -u5 %DDE_EXECUTE.CMD $input( $&
Enter the mIRC Command(s) to be Executed. $crlf $+ $&
(Use $!1- where you want the filename inserted) $&
,129,Execute mIRC Command(s) on Selected File(s),%DDE_EXECUTE.LAST)
set %DDE_EXECUTE.LAST %DDE_EXECUTE.CMD
$eval(%DDE_EXECUTE.CMD,2)
}
;By querty (/me Couldn't get it working):
; Syntax:
; $regwrite(<key>/<value>,<data>,[type])
; [type] can be
; d, for REG_DWORD
; b, for REG_BINARY
; anything else (or nothing) for REG_SZ
; returns $ok if the operation was successful, otherwise $false
; Example: $regwrite(HKEY_CURRENT_USER\MyKey\,This is the key's data,s)
; Example: $regwrite(HKEY_CURRENT_USER\MyKey\MyDwordValue,5,d)
alias regwrite {
var %i = 1, %type = bstr, %3 = REG_SZ
while ($com(wshell $+ %i)) { inc %i }
var %name = wshell $+ %i
.comopen %name WScript.Shell
if ($comerr) {
.comclose %name
return $false
}
if d isin $3 { var %3 = REG_DWORD, %type = ui4 }
elseif b isin $3 { var %3 = REG_BINARY, %type = ui4 }
if ($com(%name,RegWrite,3,bstr,$1,%type,$2,bstr,%3) == 0) {
.comclose %name
return $false
}
.comclose %name
return $ok
}