anfo 118 Posted September 22, 2018 Hi We keep a number of topics in the SQF diary format otherwise known to ARMA as the briefing.sqf. Keeping the order want is easy enough as long as we know the first item in the list needs to be at the bottom of the script and then we work our way to the top. However when we get in game, we notice that the first item of maybe 5 or 6 diary records is never open or in focus. It might be the third, fifth or first. It's a bit random when all we ever wanted was the first diary record to be the one that's always shown first. Has anybody else experienced this and if they know of a workaround where the situation in a mission briefing always displays first? Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted September 22, 2018 Have you tried using BIS_fnc_selectDiarySubject? Cheers Share this post Link to post Share on other sites
anfo 118 Posted September 23, 2018 Thanks @Grumpy Old Man I think I probably should get my terms correct. To me, a Subject is the root menu list at top-left when entering the map screen. A diary Record is a sub-list under Subjects. Does that sound right? i.e. Subjects Diary Records ... Players Briefing --------> Situation ... Mission ... Execution ... So instead of wanting a Diary Subject to be default selected, I would like a Diary Record to be default selected, in this case "Situation" (which doesn't always occur). Now that I've broken it down it appears I want something like selectDiaryRecord if it exists. However a Google search shows no such command. Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted September 23, 2018 There doesn't seem to be such a command. Might be worth giving the development branch a shot, having the ability to influence which record is shown per default really should be a given. Cheers 1 Share this post Link to post Share on other sites
Larrow 2797 Posted September 23, 2018 The diary menu and its children are just listBoxes and can be selected as such by using the commands lbSetCurSel. You can also query them for their text to make sure you have the right one. There should be a couple of post of mine where I have provided examples before. Not on my main pc atm but will try to find them later for you if you cannot find them. Not the posts i was thinking of but will do as an example of manipulating them as listBoxes. 2 Share this post Link to post Share on other sites
Larrow 2797 Posted September 24, 2018 Correction they are actually listNBoxes, could of sworn that was not originally the case. //initPlayerLocal.sqf //For testing, add a selection of Diary records in a random order /w only one being 'Situation' _randomDiarySubjects = [ "Rnd1", "Rnd2", "Rnd3", "Rnd4", "Rnd5", "Rnd6", "Situation" ]; while { !( _randomDiarySubjects isEqualTo [] ) } do { player createDiaryRecord [ "Diary", [ _randomDiarySubjects deleteAt floor random( count _randomDiarySubjects ), "blah" ]]; }; //end test TAG_fnc_selectDiarySubject = { params[ "_subject", "_record" ]; if ( _subject == "Diary" ) then { _subject = "Briefing"; }; _fnc_selectIndex = { params[ "_ctrl", "_name" ]; for "_i" from 0 to ( lnbSize _ctrl select 0 ) -1 do { if ( _ctrl lnbText [ _i, 0 ] == _name ) exitWith { _ctrl lnbSetCurSelRow _i; }; }; }; _subjectList = uiNamespace getVariable "RscDiary" displayCtrl 1001; [ _subjectList, _subject ] call _fnc_selectIndex; _recordList = uiNamespace getVariable "RscDiary" displayCtrl 1002; [ _recordList, _record ] call _fnc_selectIndex; }; //Wait for briefing screen to initialise waitUntil { !isNull ( uiNamespace getVariable [ "RscDiary", displayNull ] ) }; //Select Situation record [ "Briefing", "Situation" ] call TAG_fnc_selectDiarySubject; //If we selected subject record during briefing, above may have been map for JIP if ( isNull ( findDisplay 12 ) ) then { //Wait for mission map screen to initialise waitUntil { !isNull ( findDisplay 12 ) }; //Select Situation record [ "Briefing", "Situation" ] call TAG_fnc_selectDiarySubject; }; 2 Share this post Link to post Share on other sites