If you set a layout script trigger, it will call each time. However, you could set a global variable. Then it can check to see if it has been set the subsequent times. Basically you can wrap your script steps to only run when the $$flg_set global variable has not been set.
If [ not $$flg_set ]
(Whatever script steps you want to run the first time
Set Variable [ $$flg_set; 1 ]
If the app is used via FMserver setting a global value as a flag can be a problem since served globals are not retained. Like other globally scoped things such as prefs you may need to record it's last setting as a locally scoped value and at startup xfer it into the global.... if using server... IMO always design as if using server... but that's just MO!
Good to see you on here. I hope that you enjoyed the rest of the cruise. ;)
From the little information that was given by the OP, I had deduced that this was being used in a session. I had thought about telling the OP to store the settings in a user record or pref table if it were a one time thing, but I still think its per session. However, we can only guess. :)
Why would a script trigger run more than one time after going to a layout?
I read it as running the script trigger only the first time going to the layout. But again, we are only shooting in the dark here.
my fault, i mean,
i want to use a script trigger to run a script only one time aftering going to a layout.
and everytime i change the layout and go back to the Layout again, still one time running.
Could you be a lot more clearer? You still havent stated if you want this script to run independantly for multiple people if you are using it in a shared environment.
Second, I dont know what you mean bythe whole: "everytime i change the layout and go back to the Layout again, still one time running"
1. i want to run this script independantly
2. i want to run this script everytime after going to the Layout
AND i want to run this script only one time after going to the Layout
for example: i got layout A, B and Script C
i want to run the Script C only one time i going to the Layout A.
Somtimes you change the layout A to B, than you change back to Layout A. i also want to run the Script C at this time. But this is not actually the really first time i go to the Layout A, it is second time, third time ,.... that is what i mean "everytime".
Are you using OnLayoutLoad?