Author Topic: No matter what I do, I can't get this command to run more than once per trigger.  (Read 2024 times)

iceblast

  • Sr. Member
  • ****
  • Posts: 374
No matter what I do, I can't get this command to run more than once per trigger.

Code: [Select]
Set Text [SetLength] to [Saved Value]
Begin Text Compare : [{ACTIVEWINDOWTITLE}] Contains 'Total Commander'
    Pause 0.5 seconds
    Press and release Left Shift+F6 keys
    Pause 0.2 seconds
    Press and release Left Ctrl+C keys
    Set integer [Length] value to the converted value of {TXTLEN:SetLength}
    Set Text [Stripped] to '{EXP:SUBSTRING('{CLIP}',1,{INT:Length})}'
    Set Windows clipboard to '{TXT:Stripped}'
    Write '[Blue] {EXP:SUBSTRING('{CLIP}',1,{INT:Length})}' to log
    Write '[Blue] {INT:Length)' to log
    Pause 0.2 seconds
    Press and release Left Ctrl+V keys
    Pause 0.2 seconds
    Press and release Enter key
    Pause 0.2 seconds
    Press and release Down key
End Condition - Exit when condition met

I've tried checking the box to repeat command when holding key.
I've tried Command repeats continuously
I've tried Command repeats just so many times.
I've tried loops.

Nothing seems to work. I have to manually trigger the command over and over again till my task is complete.

This command sets up the variable in the one above.
Code: [Select]
Begin Text Compare : [{ACTIVEWINDOWTITLE}] Contains 'Total Commander'
    Pause 0.2 seconds
    Press and release Left Ctrl+C keys
    Set Text [SetLength] to '{CLIP}' (save value to profile)
    Say, 'Set'
End Condition - Exit when condition met

What both these codes do is this.

Here's a list of file name.
Stargate.SG1.S02E01.AC3.DivX.DVDRip-AMC.avi
Stargate.SG1.S02E02.AC3.DivX.DVDRip-AMC.avi
Stargate.SG1.S02E03.AC3.DivX.DVDRip-AMC.avi
Stargate.SG1.S02E04.AC3.DivX.DVDRip-AMC.avi
Stargate.SG1.S02E05.AC3.DivX.DVDRip-AMC.avi
Stargate.SG1.S02E06.AC3.DivX.DVDRip-AMC.avi
Stargate.SG1.S02E07.AC3.DivX.DVDRip-AMC.avi
Stargate.SG1.S02E08.AC3.DivX.DVDRip-AMC.avi

The second command sets the length.

>Stargate.SG1.S02E01<.AC3.DivX.DVDRip-AMC.avi
Stargate.SG1.S02E02.AC3.DivX.DVDRip-AMC.avi
Stargate.SG1.S02E03.AC3.DivX.DVDRip-AMC.avi
Stargate.SG1.S02E04.AC3.DivX.DVDRip-AMC.avi
Stargate.SG1.S02E05.AC3.DivX.DVDRip-AMC.avi
Stargate.SG1.S02E06.AC3.DivX.DVDRip-AMC.avi
Stargate.SG1.S02E07.AC3.DivX.DVDRip-AMC.avi
Stargate.SG1.S02E08.AC3.DivX.DVDRip-AMC.avi

The first command takes that info and strips everything else off the file name, but the extension.

Stargate.SG1.S02E01.avi
Stargate.SG1.S02E02.avi
Stargate.SG1.S02E03.avi
Stargate.SG1.S02E04.avi
Stargate.SG1.S02E05.avi
Stargate.SG1.S02E06.avi
Stargate.SG1.S02E07.avi
Stargate.SG1.S02E08.avi

Making it look like this. Then I have another command that will take the titles for each episode from IMDB and add it to the files, Like this.

Stargate.SG1.S02E01.The Serpent's Lair.avi
Stargate.SG1.S02E02.In the Line of Duty.avi
Stargate.SG1.S02E03.Prisoners.avi
Stargate.SG1.S02E04.The Gamekeeper.avi
Stargate.SG1.S02E05.Need.avi
Stargate.SG1.S02E06.Thor's Chariot.avi
Stargate.SG1.S02E07.Message in a Bottle.avi
Stargate.SG1.S02E08.Family.avi

Because I can't run the first command automatically say 22 times for a whole season, I have to do it manually, and if you do it to fast, I'll get an expression error. Which makes this take even longer.

I hope someone can help me with this. I'm having no luck figuring it out.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4778
  • RTFM
Well...yeah, you're telling the command to stop when the condition is true.

Try
Code: [Select]
End Conditioninstead.

The "Exit when condition met" means just that, the command exits if the condition is met.

iceblast

  • Sr. Member
  • ****
  • Posts: 374
Oh Jeez, I didn't know that would effect the ability to repeat the command. Out of all the commands I have, and this is the first time I've had this issue.

Pfeil, thanks again for your help! :)