• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • about repair window

    Discussion in 'Community Developer Forum' started by vitazzz, Jan 18, 2015.

    1. vitazzz

      vitazzz New Member

      Joined:
      Oct 4, 2014
      Messages:
      13
      Likes Received:
      0
      Trophy Points:
      0
      When repairing window opens, Repair.IsOpen is false , but SelectIconString.IsOpen is true ?
       

      Attached Files:

    2. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,343
      Likes Received:
      382
      Trophy Points:
      83

      Strange, is that the self repair window or the npc repair window?
       
    3. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,343
      Likes Received:
      382
      Trophy Points:
      83
      Code:
      ClearLog();
      foreach (var foundwindow in RaptureAtkUnitManager.GetRawControls)
       {
      Log(foundwindow);
       }
      
      Could you run this when you have the window open and paste the output please.
       
    4. vitazzz

      vitazzz New Member

      Joined:
      Oct 4, 2014
      Messages:
      13
      Likes Received:
      0
      Trophy Points:
      0
      this is npc repair window.

      I enter the command step by step test.

      first select repair npc.

      console run: t1.png
      step 1 Core.Player.CurrentTarget.Interact();
      step 2 ff14bot.RemoteWindows.SelectIconString.ClickLineContains("修理");
      step 3 Log(ff14bot.RemoteWindows.SelectIconString.IsOpen);
      Log(ff14bot.RemoteWindows.Repair.IsOpen);



      ClearLog();
      foreach (var foundwindow in RaptureAtkUnitManager.GetRawControls)
      {
      Log(foundwindow);
      }

      Result:

      FadeBack
      FadeMiddle
      NowLoading
      Filter
      ScreenFrameSystem
      FilterSystem
      ContextMenu
      ContextIconMenu
      AddonContextMenuTitle
      Tooltip
      InventoryGrid
      InventoryGridCrystal
      Inventory
      InventoryGrid3
      InventoryGrid2
      InventoryGrid1
      InventoryGrid0
      InventoryCrystalGrid
      InventoryEventGrid2
      InventoryEventGrid1
      InventoryEventGrid0
      InventoryLarge
      ChatLogPanel_0
      ChatLogPanel_1
      ChatLogPanel_2
      ChatLogPanel_3
      ChatLog
      Talk
      AreaMap
      NamePlate
      ScreenLog
      ItemDetail
      ActionDetail
      DragDropS
      _PopUpText
      _FlyText
      _MiniTalk
      Hud
      _Money
      _MainCommand
      _MainCross
      _ParameterWidget
      _Status
      _Exp
      _BagWidget
      _TargetInfo
      _TargetCursor
      _TargetCursorGround
      _ScreenInfoFront
      _ScreenInfoBack
      _Notification
      _DTR
      _CastBar
      _NaviMap
      _ActionBar
      _ActionBar01
      _ActionBar02
      _ActionBar03
      _ActionBar04
      _ActionBar05
      _ActionBar06
      _ActionBar07
      _ActionBar08
      _ActionBar09
      _ActionBarEx
      _ActionCross
      _PartyList
      _AllianceList1
      _AllianceList2
      _EnemyList
      _ToDoList
      _FocusTargetInfo
      _BattleTalk
      _LimitBreak
      _AreaText
      _Image
      _LocationTitle
      _LocationTitleShort
      _ScreenText
      _WideText
      _PoisonText
      _TextError
      _AreaText
      _Image
      _ScreenText
      _WideText
      _PoisonText
      _TextChain
      _TextClassChange
      Repair
      CursorAddon
      OperationGuide
       
      Last edited: Jan 18, 2015
    5. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,343
      Likes Received:
      382
      Trophy Points:
      83
    6. vitazzz

      vitazzz New Member

      Joined:
      Oct 4, 2014
      Messages:
      13
      Likes Received:
      0
      Trophy Points:
      0
      I think it is a cache problem.

      if on SelectIconString's window run command , open next window and re run command will be the same result of previous .
       
    7. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,343
      Likes Received:
      382
      Trophy Points:
      83
      Please post all your code, there shouldn't be any cache interference. I run the code both on the window and when the repair window is open and i get the expected results.
       
    8. vitazzz

      vitazzz New Member

      Joined:
      Oct 4, 2014
      Messages:
      13
      Likes Received:
      0
      Trophy Points:
      0
      I see the updated repair api, so test it in the console.
      Now there is no actual code.
      Only some test command.

      Log(ff14bot.RemoteWindows.SelectIconString.IsOpen);
      Log(ff14bot.RemoteWindows.Repair.IsOpen);

      //GameObjectManager.GetObjectByName("杂用商人").Target();
      //Core.Player.CurrentTarget.Interact();
      //ff14bot.RemoteWindows.SelectIconString.ClickLineContains("修理");
      //ff14bot.RemoteWwindows.SelectIconString.ClickSlot(0);
      //ff14bot.RemoteWindows.SelectYesno.ClickYes();
      //ff14bot.RemoteWindows.Repair.Close();
       
    9. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,343
      Likes Received:
      382
      Trophy Points:
      83
      Ah, ok so the issue here is your essentially clicking the button and then looking for the new window which hasn't opened yet. Your going to need to make a coroutine.

      https://www.thebuddyforum.com/rebor...um/192348-quick-coroutine-plugin-example.html

      You can do something like
      Code:
      clickthe button
      
      await Coroutine.Wait(Timeout.InfiniteTimeSpan, () => !Repair.IsOpen);
      Repair.Repairall()
      await Coroutine.Wait(Timeout.InfiniteTimeSpan, () => !SelectYesNo.IsOpen);
      SelectYesNo.Yes()
      
      
       
    10. vitazzz

      vitazzz New Member

      Joined:
      Oct 4, 2014
      Messages:
      13
      Likes Received:
      0
      Trophy Points:
      0
      thank you for your help!!I will test later. But now I want to sleep.
       
    11. Yasuko

      Yasuko Member

      Joined:
      Oct 28, 2010
      Messages:
      314
      Likes Received:
      6
      Trophy Points:
      18
      Does this mean that it works on self repair window as well? ..That would really come in hand for us who have all crafts at 50 and can self repair anywhere/anytime
       
    12. Yasuko

      Yasuko Member

      Joined:
      Oct 28, 2010
      Messages:
      314
      Likes Received:
      6
      Trophy Points:
      18
      Nevermind that question.. Decided to not be lazy and test it myself. At first I thought that npc repair window would be different than self repair window.. but it appears that it is not..

      So to answer my own question.. yes it does work on self repairs.
       
    13. iyake

      iyake Member

      Joined:
      Oct 19, 2014
      Messages:
      143
      Likes Received:
      5
      Trophy Points:
      18
      I'm trying to write a tag to self repair for my crafting profile. How were you able to open the self repair window?
       
    14. Yasuko

      Yasuko Member

      Joined:
      Oct 28, 2010
      Messages:
      314
      Likes Received:
      6
      Trophy Points:
      18
      Unfortunately I wasnt able to open it through the API, can only check to see if it is open and close it through the API (that I know of).. I ended up having to do something I didnt like doing which was to keybind the repair option in the game (since there is no in game command that im aware of to open the window) and send the keystroke like kagamihiiragi17 does in repear after hooking into the process with the processId that RB uses for the game.. combine that with IsOpen and you can verify that the keystroke went through and that the window is open.. then just send the RepairAll call through the api..


      I would be very interested in your tag for repair if you get it to work.. one thing preventing me from afk crafting all night..
       
      Last edited: Jan 24, 2015
    15. iyake

      iyake Member

      Joined:
      Oct 19, 2014
      Messages:
      143
      Likes Received:
      5
      Trophy Points:
      18
      I never got around to writing a self repair tag, but here's one that uses an npc. I imagine you could remove all that stuff about finding/targetting npc and replace it with hitting your self repair hotkey to get it to work.

      View attachment NPCRepairTag.cs
       

    Share This Page