Jump to content

Launch Program When Finished - PROBLEM (Please Help)


janullrich

Recommended Posts

I really hope somebody can help me as I am banging my head against the wall at the moment.

All I want to do is launch a script when a torrent is FINISHED (which is to say has downloaded and then seeded to the appropriate ratio). If I try and launch it from the "Run on Finished State" box the script doesn't run even if I just put notepad in there. It will only run from the "Run on Changes State" box.

The problem is UT goes into the FINISHED stage temporarily (too quick to see) between each stage e.g between Downloading and Seeding.

I thought right I'll use the Previous State of the torrent to check whether it was previously Seeding and therefore the Finished is correct or whether it was Downloading and in which case the Finished is incorrect and to exit the script.

NOPE. That didn't work because if the torrent is Seeding and then goes into Queued Seed we hit the temporary Finished stage again and triggers the previous state check which it now passes (incorrectly though).

Here is the beginning of the script:

set State=%1
set Kind=%2
set Directory=%3
set FileName=%4
set Title=%5
set Label=%6
set FilePath=%~7
set Previous=%8

IF %State%=="Finished" GOTO PREVCHECK
IF NOT %State%=="Finished" GOTO END

:PREVCHECK
IF %Previous%=="5" GOTO OTHER
IF %Previous%=="8" GOTO OTHER
IF NOT %Previous%=="5" GOTO END

I am at a loss with what to do. The launch on Finished doesnt appear to work and on change state is next to useless.

Can someone please please help me figure out how to get this working.

Thanks

Gaz

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...