1

I can run erl from my application and it must be turned on, I really don't want to make win32API Hook + sentMessage to run c(mymodulename), that's why I'm interesting if there some auto-load for modules or I can add it to erl properties ?

thank you.

cnd
  • 32,616
  • 62
  • 183
  • 313

2 Answers2

2

Generally, what you need is to use the OTP (Open Telecom Platform) features. You can define an Application and simplify any start-up procedure.

There's also a nice tool, rebar which will handle every aspect of application management from the start of your project to the deployment. It will generate Erlang/OTP configuration files, base application source files and start-up scripts.

Pindatjuh
  • 10,550
  • 1
  • 41
  • 68
2

erl -s module_name will call module_name:start ()

in module_name:start () you can call all what you want

Sergey Miryanov
  • 1,820
  • 16
  • 29
  • I don't need to start, I need to load my functions so I can use them later ? Or maybe make simple application that will load my beams ? – cnd Aug 19 '11 at 12:25
  • start is just a function - you can use/call it without making application – Sergey Miryanov Aug 19 '11 at 13:19