Using "choose file" in script designed as droplet

Here’s the problem. I’m editting an existing script to choose a file when clicking run instead of acting as a droplet-script. Reason being, I want to log all events to really learn the script. But I can’t get the script to recognize the file chosen as a document and not just an alias.
Here’s the current code:

on run
display dialog “This is a droplet.” buttons {“OK”} with icon 0
end run
on open theItems
if (count theItems) is greater than 0 then
tell application “Finder”
repeat with num from 1 to count theItems…yada-yada

My revision:
on run
set theItems to choose file
if (count theItems) is greater than 0 then
tell application “Finder”
repeat with num from 1 to count theItems…yada-yada

The result to my version is the script skips all of the way to the “end run” and declares count theItems as 0.

Suggestions??

Model: g5
AppleScript: Script Editor
Browser: Safari 419.3
Operating System: Mac OS X (10.4)

Hi,

the reason is, your form of choose file returns only one file, which is an alias, not a list

this does it (the “greater than 0” line is not needed. If the list is empty, the whole repeat block will be skipped)

on run
set theItems to choose file with multiple selections allowed -- this returns a list of alias(es)
tell application "Finder"
repeat with num from 1 to count theItems...yada-yada

Thank you, that did it!
You know if it wasn’t for the helpful community surrounding Applescript (and all programming really) I wouldn’t be able to get anything to work.
Stacy

Moving to OS X…

(No commentary this time, StefanK. ;))