Yusi Posted May 18, 2023 Share Posted May 18, 2023 Hello, I want to make the map bigger until the icon that symboling my player on map interface is visible so the point is even if widget is not visible on main screen osbot dedects it as visible. It works more like != null than isVisible() even if i use something like this: randomQuestWidget = Quests.Quest.Doric's_Quest if (randomQuestWidget != null && randomQuestWidget.isVisible()) { randomQuestWidget.hover(); } it hovers the mouse on invisible quest -> https://prnt.sc/ROEan6Kj0oZH how can i check if a widget actually isVisible or not? Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted May 18, 2023 Share Posted May 18, 2023 9 hours ago, Yusi said: Hello, I want to make the map bigger until the icon that symboling my player on map interface is visible so the point is even if widget is not visible on main screen osbot dedects it as visible. It works more like != null than isVisible() even if i use something like this: randomQuestWidget = Quests.Quest.Doric's_Quest if (randomQuestWidget != null && randomQuestWidget.isVisible()) { randomQuestWidget.hover(); } it hovers the mouse on invisible quest -> https://prnt.sc/ROEan6Kj0oZH how can i check if a widget actually isVisible or not? You check the Y coordinate to be in the actual visible rectangle 1 Quote Link to comment Share on other sites More sharing options...
Yusi Posted May 18, 2023 Author Share Posted May 18, 2023 44 minutes ago, Khaleesi said: You check the Y coordinate to be in the actual visible rectangle I have made this and its working properly thank you if (ernestTheChickenQuest != null && ernestTheChickenQuest.isVisible() && ernestTheChickenQuest.getAbsY() > 254 && ernestTheChickenQuest.getAbsY() < 415) { log("koyashScript"); } Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted May 18, 2023 Share Posted May 18, 2023 26 minutes ago, Yusi said: I have made this and its working properly thank you if (ernestTheChickenQuest != null && ernestTheChickenQuest.isVisible() && ernestTheChickenQuest.getAbsY() > 254 && ernestTheChickenQuest.getAbsY() < 415) { log("koyashScript"); } Nice! 1 Quote Link to comment Share on other sites More sharing options...