How to use variables to create sequential numbers?

How to use variables to create sequential numbers?

Postby threedog » Mon Oct 10, 2016 2:51 am

Hi there,

I'm trying to use QuicKeys to rename a series of files using variables, and I cannot work out how to get the variable command to increment by one per loop. EG I want to take a series of randomly named clips and rename them to:

C001
C002
C003
C004
etc.

Please note I cannot use the Append Suffix command as I am working within another program (Avid Media Composer), and QuicKeys does not recognize the interface as a series of files.

I've found a range of articles on the subject, but I cannot seem to get them to work for this particular application.

Can anyone suggest how to go about this in QuicKeys?

Many thanks!
threedog
 
Posts: 1
Joined: Mon Oct 10, 2016 12:20 am

Re: How to use variables to create sequential numbers?

Postby gb2 » Mon Oct 10, 2016 10:49 am

this is how I would do it.

first you need to create a couple of variables SerialNumber, TensPlace and HundredsPlace. I'm going to set this up so that it displays a dialog so that you can test to make sure you have everything correct and you can later change it to insert the sequential value later.

Steps:

1. Assign Variable - SerialNumber = 1
2. Begin Repeat Loop - Repeat 100 times
3. Compare Variable - SerialNumber Is Less Than 10 - On Step Success Jump to Next Step, On Step Failure Jump to Step 5 with Numeric comparison checked
4. Assign Variable - TensPlace = 0 - On Step Success Jump to Step 6
5. Assign Variable - TensPlace = (nothing - leave field blank)
6. Compare Variable - SerialNumber Is Less Than 100 - On Step Success Jump to Next Step, On Step Failure Jump to Step 8 with Numeric comparison checked
7. Assign Variable - HundredsPlace = 0 - On Step Success Jump to Step 9
8. Assign Variable - HundredsPlace = (nothing - leave field blank)
9. Use Variable - C & HundredsPlace & TensPlace & SerialNumber - Display Value and Step automatically continues after 1 second - you would change this to Insert when you know that it is working
10. Assign Variable - SerialNumber = SerialNumber + 1
11. End Repeat Loop
User avatar
gb2
Site Admin
 
Posts: 2868
Joined: Mon Feb 06, 2006 5:22 pm


Return to QKM General Discussion

Who is online

Users browsing this forum: Google [Bot] and 2 guests