Sequential and Random Selection at the same time

I read your original post as indicating that there were successive blocks of trials of the same type, rather than a single block of trials of interleaved trial types. A double-loop arrangement won’t help with this. What is probably easiest is a single loop, and with the conditions and image names determined in code rather than in a conditions file.

Insert a code component (from the “custom” component panel) and put something like this in the “begin experiment” tab, to create lists of image names (like intact_24.jpg etc):

# create image lists:
intact_images = [f'intact_image_{i}.jpg' for i in range(100)]
scrambled_images = [f'scrambled_image_{i}.jpg' for i in range(25)]

# randomise their order:
shuffle(intact_images)
shuffle(scrambled_images)

Then in the “Begin routine” tab, put something like this, to figure out what condition this trial is, and to sample an image name without replacement from the appropriate list:

# figure out the condition to use, based on every third trial 
# being a "scrambled" one. calculate by checking that the 
# remainder is 0 when diving by 3:
if (the_name_of_your_loop.thisN + 1) % 3 == 0: 
    # trial is a multiple of three, so:
    image_type = 'scrambled'
    image_file = scrambled_images.pop()
else:
    image_type = 'intact'
    image_file = intact_images.pop()

# record these in the data:
thisExp.addData('image_type', image_type)
thisExp.addData('image_file', image_file)

Now just put $image_file in the “image” field of your image stimulus component, set to update every repeat. Make sure that the code component is above the image stimulus component, so that this variable is updated in time for the image stimulus to refer to it.

Note that the loop will only run 75 times before an error occurs, as the scrambled_images list will be emptied at that point, but the numbers you give in your posts above jump around a bit.