mIRC Home    About    Download    Register    News    Help

Print Thread
#141238 06/02/06 10:29 PM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
any ideas guys why this gives insufficient parameters in mirc..

Code:
Private Sub gfdgfdfdg_Click()
    
    'Create a DDE connection
    If Text1.LinkMode = vbNone Then
        Text1.LinkTopic = "mIRC|COMMAND" 'Set link topic.
        Text1.LinkMode = vbLinkManual ' Set link mode.
    End If

    Text1.LinkExecute "/dde mirc command "" /echo -a %test"

End Sub


even tried changing it to $(%test, 0) - still no luck

#141239 07/02/06 01:44 AM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
At a guess I'd say it's because you're trying to use " inside a string. That would make the string end (thus making you call /dde mirc command.)

Try this:

Code:
Private Sub gfdgfdfdg_Click()
    
    'Create a DDE connection
    If Text1.LinkMode = vbNone Then
        Text1.LinkTopic = "mIRC|COMMAND" 'Set link topic.
        Text1.LinkMode = vbLinkManual ' Set link mode.
    End If

    Text1.LinkExecute "/dde mirc command " & chr(34) & chr(34) & " /echo -a %test"

End Sub


By the way, I'd recommend sticking to one language, if you keep switching between different languages you won't get anywhere.

#141240 07/02/06 05:04 PM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
Thanks, what if thrre was something like this..

Dim test As String
test = "%hi"

how would i then send

echo -a test to mIRC

which would echo: %hi
any ideas? i can't seem to get around this problem as you cant put vb variables inside the "

#141241 07/02/06 05:19 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
& is the concatenation operator in VB (just like $+ in mIRC), so it would be:

Code:
"/echo -a " & test


Link Copied to Clipboard