not exactly - what you do is place a command in each menu that stores it in a variable if the player enters that menu, and have the exit function for all menus clear that variable.
After that, any of your scripts can check where the player currently is by checking that variable.
Okay, I understand the idea. But I'm not very competent in script. How to write it ?
That isn't easily explained to someone who doesn't know programming, so let's take a step back.
Why do you want to check that? What difference does that make to the game mechanics?
I originally assumed it was because you wanted to script something, but if you don't know much about scripting then it's probably something else - and in most non-script-cases, there are better ways to handle such situations. But I can only help after I know what you want to do (as opposed to knowing how you want to do it)
It IS possible to check in what scene the player currently is, it is a built-in method, a very handy one in that.
if SceneManager.scene_is?(Scene_Equip)
This would check if the scene is the equip scene or not.
You can check for all scenes in the game, just replace 'Scene_Equip' with the name of the scene class you want to check for.
But you used quite a confusing explanation, because if I understood it right, you want to check if a specific window is active or not.
Screen or menu means the whole menu which appears on the screen. That is the scene itself.
To check if a window is active or not, you would use this:
if @window_name.active
Replace '@window_name' with the name of the window you want to check for.
You should be able to find which window name you need if you look through the Scene_Equip class.
The slot selection window is '@slot_window', I think, and the equipment selection window is '@item_window', if I remember right, but still check it, I haven't checked that class for a while now.
Thanks for your explanations. With @slot_window, I succeeded to solve my problem. Thanks you very much.