internal static void ReloadFrames(Object proObj) { Professions professions = (Professions)proObj; InterfaceHelper.ReloadFrames(); Thread.Sleep(2000); ClickHooked("SpellbookMicroButton"); ClickHooked("SpellBookFrameTabButton2"); List <Frame> mainFrames = new List <Frame>(); List <Frame> statusFrames = new List <Frame>(); mainFrames.Add(ClickHooked("PrimaryProfession1")); mainFrames.Add(ClickHooked("PrimaryProfession2")); mainFrames.Add(ClickHooked("SecondaryProfession1")); mainFrames.Add(ClickHooked("SecondaryProfession2")); mainFrames.Add(ClickHooked("SecondaryProfession3")); mainFrames.Add(ClickHooked("SecondaryProfession4")); //foreach(Frame frame in InterfaceHelper.GetFrames) //{ // Debug.WriteLine(frame.GetName); //} statusFrames.Add(ClickHooked("PrimaryProfession1StatusBar")); statusFrames.Add(ClickHooked("PrimaryProfession2StatusBar")); statusFrames.Add(ClickHooked("SecondaryProfession1StatusBar")); statusFrames.Add(ClickHooked("SecondaryProfession2StatusBar")); statusFrames.Add(ClickHooked("SecondaryProfession3StatusBar")); statusFrames.Add(ClickHooked("SecondaryProfession4StatusBar")); int x = 0; foreach (Frame frame in mainFrames) { List <Frame> frameChildren = frame.GetChilds; Profession profession = new Profession(); profession.Name = frameChildren.ElementAt(0).GetText; int p = x > 1 ? 1 : 3; profession.Rank = RankFactory.getRank(frameChildren.ElementAt(p).GetText); Frame statusFrame = statusFrames.ElementAt(x); List <Frame> statusChildren = statusFrame.GetChilds; String[] levels = statusChildren.ElementAt(0).GetText.Split('/'); profession.Level = int.Parse(levels[0]); professions.addProfession(profession, professions); x++; } //ClickHooked("PrimaryProfession1"); //ClickHooked("PrimaryProfession1StatusBar"); //ClickHooked("ArchaeologyFrameSummaryPageRace4"); professions.parseProfession(); Thread.Sleep(1000); CloseFrames(); Thread.Sleep(1000); professions.callback(); }