Atom_Monky 14 Posted October 27, 2018 Hi, can someone tell me how do i geht the current open display ? I want to progressSetPosition to a progressbar but in a fuction. I have multiple dialogs but they all have the same progesspbar control (idd=121212). so if i call the progress function i want that the progessbar updates no matter which dialog is shown. Currently i can update the progess only with the dialog "name"=WeaponsDialog; Function: AV_progress= { [...] for "_i" from 0 to _delay do { sleep 1; ((uiNamespace getVariable "WeaponsDialog") displayCtrl 121212) progressSetPosition (_i / _delay); }; [...] }; So i want to replace (uiNamespace getVariable "WeaponsDialog")with something dynamic. Thanks ;D Share this post Link to post Share on other sites
HazJ 1288 Posted October 27, 2018 You can filter through using: https://community.bistudio.com/wiki/allDisplays Share this post Link to post Share on other sites
Atom_Monky 14 Posted October 27, 2018 okay then I would have to check if one of the dialogs idd is listed there and ich could do a switch case on each dialog... quite complex what would happen if i do AV_progress= { [...] for "_i" from 0 to _delay do { sleep 1; ((uiNamespace getVariable "WeaponsDialog") displayCtrl 121212) progressSetPosition (_i / _delay); ((uiNamespace getVariable "myDialog") displayCtrl 121212) progressSetPosition (_i / _delay); ((uiNamespace getVariable "otherDialog") displayCtrl 121212) progressSetPosition (_i / _delay); ((uiNamespace getVariable "dialogsDialog") displayCtrl 121212) progressSetPosition (_i / _delay); ((uiNamespace getVariable "xxDialog") displayCtrl 121212) progressSetPosition (_i / _delay); }; [...] }; and if only one of the dialogues is open.. it thorws no script error but is it burdening the system ? Share this post Link to post Share on other sites
HazJ 1288 Posted October 27, 2018 Why not just check if in displays? Surely you know the IDD and if not, you can retrieve it... Share this post Link to post Share on other sites