Your answer might be here:
https://www.townlong-yak.com/framexm...Roster.lua#361
I'm not in a guild, so I have no way to test... but would something like this do it?
Lua Code:
function foo(guildIndex)
if (GuildFrame and GetGuildRosterInfo(guildIndex)) then
GuildFrame:Show()
SetGuildRosterSelection(guildIndex)
GuildFrame.selectedGuildMember = guildIndex
GuildFramePopup_Show(GuildMemberDetailFrame)
end
end