Page 1 of 1

Calling User Functions From Compiled Script

Posted: Wed Aug 22, 2018 9:14 am
by hans.dominic
Hi,

I have scripts (all user codes) and compiled to EXE and each of those scripts has a common user function. Now if I'll be having some changes on that user function, I have to re-compile all those scripts which is really time consuming because there are at least 2K scripts. Can someone give me an idea on how to have a better solution for this?

Thanks in advance for your help.

-- Hans

Re: Calling User Functions From Compiled Script

Posted: Wed Aug 22, 2018 11:00 am
by hans.dominic
Never mind, just ignore this post. I have just found a solution. Thanks.

Re: Calling User Functions From Compiled Script

Posted: Wed Aug 22, 2018 11:06 am
by odklizec
Hi,

I was about to suggest you to build your custom methods in a dll and reference this dll in all your projects. Then it should be required to rebuild just the dll. Something as described here:
https://www.ranorex.com/blog/organizing ... nOfModules

Anyway, could you please share your solution? I'm sure, it may help other forum members ;)

Re: Calling User Functions From Compiled Script

Posted: Wed Aug 22, 2018 11:14 am
by hans.dominic
Thanks for your suggestion.

Actually it is similar to what you have suggested. I just don't know how to create custom DLLs so I just compiled the project (EXE) which contains all custom methods and reference this to my projects.

Re: Calling User Functions From Compiled Script

Posted: Wed Aug 22, 2018 11:26 am
by odklizec
Hi,

Your solution is basically the same as I suggested ;) Just for future, you can select the type of app in Project settings >> Application tab. Class Library would turn the project to dll...
ClassLibrary.png

Re: Calling User Functions From Compiled Script

Posted: Wed Aug 22, 2018 11:46 am
by hans.dominic
Woow! I didn't know that... This is really what I am looking for. You save my day!

Re: Calling User Functions From Compiled Script

Posted: Wed Aug 22, 2018 12:00 pm
by odklizec
You are welcome ;)