How to get control name from other files?

I want to separate ui and script part by include<"file_name"> function(s),but I don't know how to get control name from other files.

Example:
--layerout.ms
utility uiPart "someTools"
(
--Use visual maxscript editor generat these code
button btnSayHi "Rename" pos:[87,256] width:64 height:22
--I want to running it only add these code,but how can I get button name from main.ms?
on uiPart open do
(
include "main.ms"
)
)

--main.ms
on btnSayHi pressed do
(
messageBox "Hi!"
)

Thanks