setting variables in an external script file

okay say i have the main script and i want to tell the secondary script (located elsewhere) to set its variables A and B to certain things. how would i do this? like you can with subroutines but can you do the same thing with external scripts? and can you run a subroutine from an external script in another script?

i hope that makes some sense

thanks a lot