I changed 2 lines in the code, instead of expecting 3.4 and 10.5 to sort the PDFs, it considers short PDFs when height is smaller than width and tall when height is bigger than width:
--Script by Colorblind, tested with Acrobat Pro 8 and InDesign CS4
set my_folder to choose folder with prompt "Choose the folder where the PDFs are"
tell application "Finder"
activate
set my_pdf_list to get every item in my_folder
set pdf_11high_list to {}
set pdf_3andhalfhigh_list to {}
repeat with mypdf in my_pdf_list
open mypdf using application file id "CARO"
tell application "Adobe Acrobat Professional"
activate
set b to get crop box of page 1 of active doc
set w1 to item 3 of b as integer
set w0 to item 1 of b as integer
set h1 to item 2 of b as integer
set h0 to item 4 of b as integer
set PDFheight to (h1 - h0) / 72
set PDFwidth to (w1 - w0) / 72
set pagecount to count every page of active doc
set idh to PDFheight & " i" as string
set idw to PDFwidth & " i" as string
if PDFheight > PDFwidth then set end of pdf_11high_list to mypdf
if PDFheight < PDFwidth then set end of pdf_3andhalfhigh_list to mypdf
close active doc without saving
end tell
end repeat
set doc_count to the length of pdf_11high_list
tell application "Adobe InDesign CS3"
activate
set my_counter to 1
repeat doc_count times
set mydoc to make document
tell document preferences of mydoc
set facing pages to false
set page width to "8.5 i"
set page height to "13.9 i"
set pages per document to 1
end tell
set page number of PDF place preferences to 1
-- the "crop PDF" parameter can be changed to the following: crop content/crop art/
--crop PDF/crop trim/crop bleed/crop media/crop content/crop art/¬
--crop PDF / crop trim / crop bleed / crop media
set PDF crop of PDF place preferences to crop PDF
set mypdfpage to place (item my_counter of pdf_3andhalfhigh_list as string) on page 1 of mydoc place point {0, 0}
set mypdfpage to place (item my_counter of pdf_11high_list as string) on page 1 of mydoc place point {0, 3.4}
set my_counter to my_counter + 1
end repeat
end tell
end tell
--Let me know if it works and don't forget to use Script Editor to run it