mIRC Home    About    Download    Register    News    Help

Print Thread
#190090 15/11/07 08:35 PM
Joined: Nov 2007
Posts: 17
S
Pikka bird
OP Offline
Pikka bird
S
Joined: Nov 2007
Posts: 17
im getting to understand the scripting somewhat...

but how do i use a folder in a script if the folder has more than one name?
like c:\documents and settings
wont work in a script because it has three word in one folder
how do u make it work?

Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

Use quotes

"C:\Documents and Settings"

RoCk #190099 15/11/07 09:57 PM
Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
See also the $qt(), and $shortfn() identifiers in the help file.
Code:
echo -a $qt(C:\Documents and Settings)
-> "C:\Documents and Settings"
echo -a $shortfn(C:\Documents and Settings)
-> C:\DOCUMEN~1\

Bekar #190105 15/11/07 11:57 PM
Joined: Nov 2007
Posts: 17
S
Pikka bird
OP Offline
Pikka bird
S
Joined: Nov 2007
Posts: 17
what if i want to use an identifier in the quotes? will it work or will it think its part of the folder name??

Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
Code:
echo -a -> $qt($scriptdirExample\with some long stuff)
-> "C:\Program Files\mIRC\Example\with some long stuff"


No problems wink

Bekar #190113 16/11/07 01:15 AM
Joined: Nov 2007
Posts: 17
S
Pikka bird
OP Offline
Pikka bird
S
Joined: Nov 2007
Posts: 17
using quotes doesnt seem to work??

and im not sure how to use the $qt??


Last edited by shamguy4; 16/11/07 01:15 AM.
Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
Show us what you are doing.

Bekar #190119 16/11/07 04:06 AM
Joined: Nov 2007
Posts: 17
S
Pikka bird
OP Offline
Pikka bird
S
Joined: Nov 2007
Posts: 17
ON 1:TEXT:!pic *:#shamguy4:/send $nick C:\shamguy4\pictures\picture $+ $2 $+ .zip

this is supposed to set a trigger that when my friend wants a set of our class pics (year book stuff....) he types !pic and a number and it corresponds to the picture in my folder
i changed folders so i dont have the quote problem and theres only one word to each folder -cause it wasnt working when it was in documents and settings


when i send him manually it goes real fast
when he uses this trigger it goes real slow... what do i type to make it go as fast as when i use /send regular without remote script?

i could give them manually but i want to sorta learn how to do this

Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
Usually once you set the DCC SEND settings, they stay set.

Check your values for:
Code:
/dcc packetsize
/fsend
/pdcc

They should be something like 8192 (but really depends on your upload speed capabilities. Mine is set to 4096 for instance) and two on's.

Also, I take it you have an alias called 'send'? With a stock mIRC, it would be dcc send.

Given all this, it would appear as if the send alias is what was giving you the most issues. Try using this:

Code:
ON *:TEXT:!pic *:#shamguy4: {
  var %pic = $qt($+(C:\shamguy4\pictures\picture, $2, .zip))
  if ($exists(%pic)) {
    dcc send $nick %pic
  }
  else {
    msg $nick I don't have that one
  }
}

It checks to see if the file exists before sending it, and sends an message back if it doesnt.

It also shows the alternate form of the string concatenation identifier ($+() vs. $+), and how you would normally use $qt() in this sort of situation.

Bekar #190153 16/11/07 03:46 PM
Joined: Nov 2007
Posts: 17
S
Pikka bird
OP Offline
Pikka bird
S
Joined: Nov 2007
Posts: 17
oops!!
I forgot to set the trigger to only my chanel!!
I jus got banned from another channel
apparently they must use the same trigger of some sort
!


Link Copied to Clipboard