Resource Tab. how to select resource based on resource tabs
-
hello guys,
i'm new to BAS using premium. i wonder how to Main function can only run script using resource based on active/selected tabs interface only.
for example i have tab_resource1 and tab_resource2, if i select tab_resource1 then my script runs function1 or if i select tab_resource2 my script runs function2.
can someone give me some way to do that?
-
Create resource Select write your options inside it.
set a variable using your resource as value.
then use if, for example if [[TYPE]]=="Resource1" = call function "Resource1".
You can use else and more if, if you have more functions.
And so one until you can call your function based on what you choosed in select.
If you still dont understand it, I can leave an example script for this.
-
hello sir, thanks for your reply. This is the example condition what i want to execute
I have script that handle more action than this image example. main idea is i want my script can choose wich function/script to run by selecting on the left tab panel. can u make example script for the condition based on the image example?
thanks before
-
@malda You cannot interact with these tabs. You can only create a special resource in which the user will select the necessary actions.
-
I want something like this image example, bot with many Tabs that can run different script/function on each Tab. the problem is in Main function i cant figure out how to achieve this method :D
i hope someone can show me an example script for this.
@UserTrue 
-
Oh, sorry I understood it wrong. This is pretty interesting I never seen this before.
Im wondering how the logic inside the "tab function" looks like. You sure that its working like this?
-
@NotWegant yeah sure. anyway i've figured out the solution. thanks for your time sir
-
Could you tell it to me?
-
@NotWegant why are you setting your resource as a variable at the beginning? You don’t have to do that.
-
@duckingfyslexia idk, this is the way I learned it.
-
@NotWegant all that is doing is sorting the resources. Each of those tabs are just tabs, and each ones group of resources relates to its function.