From 10.4, you can now pass parameters to scripts run with oscascript. From that page:

Any arguments following the script will be passed as a list of strings
to the direct parameter of the ``run'' handler. For example:
a.scpt:
on run argv
return "hello, " & item 1 of argv & "."
end run
% osascript a.scpt world
hello, world.

Not the entire script: if you have properties, they'd go before the 'on run' line and if you have handlers (functions), they'd go outside of the run block as well. It's just similar to the main() function in C.

Here is a trick I learned from the ORA AppleScript book to pass args into a compiled AppleScript that works with all versions of OS X.

In a Bourne style shell do this (in csh style shells do a setenv):

my_foo=val osascript foo.scpt

Now at the beginning of the AppleScript add this:

set this_foo to system attribute "my_foo"

The "system attribute" corresponds to the environment variables, so what you are doing is passing an argument as an environment variable. You can now use this_foo in your script to get your passed value. In practice the overhead involved with accessing a separate AppleScript file and using the system extension to extract the value of the environment variable takes more time than compiling a SHORT AppleScript so keep this in mind. You will only see a speed increase for your longer AppleScripts, the ones that take a longer time to compile.