mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2003
Posts: 9
N
NMB Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
N
Joined: Mar 2003
Posts: 9
E.G
<table><tr>
<td class="tdcss1" id="Largeicon1" onmouseover="javascript:changecss(this);" onmouseout="javascript:changecss(this);"
onclick="cmd('pal.flood_set')">
<td></tr></table>

Can I shell mirc command in the html?
use DDE?

now I only use status_change for IE(nhtmn.dll)

<script>
function cmd(temp)
temp = replace(temp,"$","@0@")
temp = replace(temp,"%","@1@")
window.Status = "<cmdscript> " & temp & " </cmdscript>"
window.Status = "Full"
end function
</script>

alias inHTMLn.handler {
if ($2 == status_change) {
if ($left($3-,11) == <Cmdscript> && $right($3-,12) == </Cmdscript>) {
var %inputmsg = $remove($3-,<Cmdscript>,</Cmdscript>)
var %temp = $replace($mid(%inputmsg,2-),@0@,$chr(36),@1@,$chr(37))
. $+ $eval(%temp,2)
}
return S_OK
}

Please HELP ME,.Sorry ,my english is so bad.

Joined: Dec 2002
Posts: 89
N
Babel fish
Offline
Babel fish
N
Joined: Dec 2002
Posts: 89
If you want to send a message to your script from a web page, simply use JScript to open some fake URL, like http://this.is.some.useful.info

In your event handler, catch the "before_navigate" event (or whatever it was called) and suppress it by returning S_FALSE. $3- will contain the text of the URL.


Sincerely,
Necroman, #mIRC @ Undernet
Joined: Mar 2003
Posts: 9
N
NMB Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
N
Joined: Mar 2003
Posts: 9
I want to use DDE in HTML file

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
no. you cannot. it is technically impossible and would raise many security issues if it were.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Dec 2002
Posts: 89
N
Babel fish
Offline
Babel fish
N
Joined: Dec 2002
Posts: 89
Why can't you send a signal to your script to make it use DDE?


Sincerely,
Necroman, #mIRC @ Undernet
Joined: Feb 2003
Posts: 309
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Feb 2003
Posts: 309
You CAN do it, but its not very friendly. Here's the source from DDECommander - find visual basic 6 EE and compile it into a ActiveX object, find some hapless coder to modify some of the non friendly bits to fit your task.

save this as a .FRM file:
VERSION 5.00
Begin VB.Form frmDDE
BorderStyle = 1 'Fixed Single
Caption = "DDE Commander"
ClientHeight = 1425
ClientLeft = 45
ClientTop = 420
ClientWidth = 4680
Icon = "frmDDE.frx":0000
LinkMode = 1 'Source
LinkTopic = "DDECommander"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1425
ScaleWidth = 4680
StartUpPosition = 3 'Windows Default
Begin VB.OptionButton optEvaluate
Caption = "Evaluate"
Height = 195
Left = 120
TabIndex = 8
Top = 1200
Width = 1335
End
Begin VB.OptionButton optCommand
Caption = "Command"
Height = 195
Left = 120
TabIndex = 7
Top = 960
Value = -1 'True
Width = 1335
End
Begin VB.TextBox mIRC
Height = 315
Left = 1800
TabIndex = 0
Text = "/"
Top = 360
Width = 1455
End
Begin VB.CommandButton bttHelp
Caption = "&Help"
Height = 375
Left = 3480
TabIndex = 5
Top = 960
Width = 1095
End
Begin VB.CommandButton bttAbout
Caption = "&About"
Height = 375
Left = 2160
TabIndex = 4
Top = 960
Width = 1095
End
Begin VB.ComboBox cmbDDEServerList
Height = 315
Left = 120
Style = 1 'Simple Combo
TabIndex = 2
Text = "mIRC"
Top = 360
Width = 1455
End
Begin VB.CommandButton bttDDE
Caption = "&DDE"
Height = 375
Left = 3480
TabIndex = 1
Top = 360
Width = 1095
End
Begin VB.Line Line1
X1 = 120
X2 = 4560
Y1 = 840
Y2 = 840
End
Begin VB.Label Label2
Caption = "DDE Message/Value"
Height = 255
Left = 1800
TabIndex = 6
Top = 120
Width = 1575
End
Begin VB.Label Label1
Caption = "DDE Server Name"
Height = 255
Left = 120
TabIndex = 3
Top = 120
Width = 1455
End
End
Attribute VB_Name = "frmDDE"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub bttAbout_Click()
MsgBox "DDE Commander by CloCkWeRX, [email]gekko_dev@hotmail.com"[/email]
End Sub

Private Sub bttDDE_Click()
Dim strConcatMe As String

If optCommand.Value Then
strConcatMe = "|COMMAND"
mIRC.LinkItem = "//showmirc -srxo | "
Else
strConcatMe = "|EVALUATE"
mIRC.LinkItem = ""
End If

On Error GoTo NoServer
mIRC.LinkTopic = frmDDE.cmbDDEServerList.Text & strConcatMe
mIRC.LinkMode = vbLinkNone
mIRC.LinkItem = mIRC.LinkItem & mIRC.Text
'reload -rs <script from command line>
mIRC.LinkMode = vbLinkManual

If optCommand.Value Then
mIRC.LinkPoke
Else
mIRC.LinkRequest
End If

mIRC.LinkMode = vbLinkNone
Exit Sub

NoServer:
MsgBox "Server not found."
End Sub

Private Sub bttHelp_Click()
Dim tVar As String
tVar = tVar + "You can get the DDE Server name for mIRC by typing //echo -a $ddename." & vbCrLf
tVar = tVar + "Enter this value into the DDE Server Name field." & vbCrLf & vbCrLf
tVar = tVar + "If you choose 'Command' then it sends mIRC a /command. Useful for testing aliases, etc. Evaluate will fetch a value, such as a varible, custom identifier, or identifier."
MsgBox tVar
End Sub

Private Sub Command1_Click()
MsgBox "test"
End Sub

Private Sub Form_Load()
If Not Command = "" Then
frmDDE.Visible = False
optCommand.Value = True
mIRC.Text = Command
bttDDE_Click
End
End If
End Sub

Private Sub optEvaluate_Click()
If (mIRC.Text = "/") Then
mIRC.Text = "$"
End If

mIRC.SetFocus
End Sub
Private Sub optCommand_Click()
If (mIRC.Text = "$") Then
mIRC.Text = "/"
End If

mIRC.SetFocus
End Sub

Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
/me quickly remembers why he stayed away from VB.

Joined: Feb 2003
Posts: 309
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Feb 2003
Posts: 309
heh, its a messy lil posterchild language isn't it.


Link Copied to Clipboard