Variable in function name?
-
Im trying to automate many platforms.
I have thought of this way to do it:
- take one platform domain from resource list
- check if the platform is either reddit or pinterest (or 100 other platforms)
- then call function RedditCom
is there more automated way to do it? So i dont create separate IF and "call function" every platform?
It can get very messy once I reach 100 platforms this way
-
@yourfriendkarol Yes, eval() is what you need. It is obvious.
-
@ruzne oh so eval executes string as code. But how do I call function in BAS then using code? I tried call(FunctionName)
-
@yourfriendkarol
You can do like this._call(eval([[FUNCTION_NAME]]),null)!
Following solution will work for run mode, but won't work in record mode.