mIRC Home    About    Download    Register    News    Help

Print Thread
#35655 11/07/03 05:38 AM
Joined: Jun 2003
Posts: 67
D
Babel fish
OP Offline
Babel fish
D
Joined: Jun 2003
Posts: 67
ok i want to RAR a file then delete it sounded simple
Code:
 alias HLDRAR {
  %HLD.RAR = $remove(F:\Sierra\Half-Life\cstrike\Demos\ %demostring,$chr(32),.dem)
  %HLD.DEMO = $remove(F:\Sierra\Half-Life\cstrike\ %demostring,$chr(32))
  run F:\program files\winrar\winrar.exe a %HLD.RAR %HLD.DEMO
  remove -b %HLD.DEMO
}
 

problem is that it removes the file before winrar rars it how do i cause mIRC to pause until WinRAR is done?


while (demi == nub) {
inc %skill
}
#35656 11/07/03 06:22 AM
Joined: Mar 2003
Posts: 54
J
Babel fish
Offline
Babel fish
J
Joined: Mar 2003
Posts: 54
You can use a /timer. Estimate how many seconds the RAR will take to be done.
/help /timer for more.

#35657 11/07/03 06:24 AM
Joined: Jun 2003
Posts: 67
D
Babel fish
OP Offline
Babel fish
D
Joined: Jun 2003
Posts: 67
well the raring time will vary depending on demo size and other misc variable


while (demi == nub) {
inc %skill
}
#35658 11/07/03 06:42 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Code:
alias HLDRAR {
  %HLD.RAR = $remove(F:\Sierra\Half-Life\cstrike\Demos\ %demostring,$chr(32),.dem)
  %HLD.DEMO = $remove(F:\Sierra\Half-Life\cstrike\ %demostring,$chr(32))
  var %file = rar.bat
  /write -c %file @ECHO OFF
  /write %file ECHO RARing file... (Please Wait)
  /write %file F:\program files\winrar\winrar.exe a %HLD.RAR %HLD.DEMO
  /write %file del /Q %HLD.DEMO
  /run %file
}


the only true way i can see doing it is have a batch file run it, and delete it. The batch won't conitnue until winrar is done (i believe) so it should be a failsafe.


-KingTomato
#35659 11/07/03 07:07 AM
Joined: Jun 2003
Posts: 67
D
Babel fish
OP Offline
Babel fish
D
Joined: Jun 2003
Posts: 67
i suppose that could work wink


while (demi == nub) {
inc %skill
}
#35660 11/07/03 10:42 AM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
You can make mirc wait until a program is finished with this snippet by Online (I don't know how many times I've linked to this wonderful snippet). Just use /xrun -w instead of /run.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#35661 11/07/03 03:54 PM
Joined: Jun 2003
Posts: 67
D
Babel fish
OP Offline
Babel fish
D
Joined: Jun 2003
Posts: 67
Actually i just notcied WinRAR has a -df switch which deletes the file after archiving it sorry for the trouble


while (demi == nub) {
inc %skill
}
#35662 12/07/03 04:33 AM
Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
I have a similar query. I have a script that i wrote that write a list to a file, then sends it to the user who requested the info. I want it to be able to delete the file after the send is done. Is there a way to do this without the use of timers. As depending on the request the file could be of varying sizes and take varying times to dcc to the user.

[Edit]Err, i should also have said without using a global variable.[/Edit]

Last edited by Om3n; 12/07/03 04:35 AM.

"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
#35663 12/07/03 04:41 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
name the file the same as the nick requesting it, then do bi-hourly check, or even 5 minute checks. Look for open dcc connections, and referance to files in the directory.


-KingTomato
#35664 12/07/03 06:04 AM
Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
Nah, ill just use the filesent/sendfail events and a variable. Was just curious if there was other methods.


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby

Link Copied to Clipboard