# CraftScreen Methods to interact with the crafting screen on a furnace. - - - ## CraftScreen.IsOpen ```pascal function TCraftScreen.IsOpen(): Boolean; function TCraftScreen.IsOpen(waitTime: Int32): Boolean; ``` Returns true if the gold crafting screen is visible. You can optionally specify a `waitTime`. Example: ```pascal if CraftScreen.IsOpen() then CraftScreen.ClickItem(ECraftItem.GOLD_BRACELET, -1); ``` - - - ## CraftScreen.Close ```pascal function TCraftScreen.Close(PressEscape: Boolean = False): Boolean; ``` Closes the gold crafting screen. Depending on `PressEscape` the function will either click the button or press backspace. Example: ```pascal if CraftScreen.Close() then Writeln('Closed the gold crafting screen'); ``` - - - ## CraftScreen.SetQuantity ```pascal function TCraftScreen.SetQuantity(Amount: Int32): Boolean; ``` Sets the interface quantity to the set amount. Acceptable parameters include 1,5,10,X (custom amount) and -1 for 'All'. Example: ```pascal CraftScreen.SetQuantity(-1); ``` - - - ## CraftScreen.CanCraftItem ```pascal function TCraftScreen.CanCraftItem(CraftItem: ECraftItem): Boolean; ``` Returns if the given ECraftItem can be crafted. Example: ```pascal if CraftScreen.CanCraftItem(ECraftItem.RUBY_RING) then CraftScreen.ClickItem(ECraftItem.RUBY_RING, 5); ``` - - - ## CraftScreen.IsItemHighlighted ```pascal function TCraftScreen.IsItemHighlighted(CraftItem: ECraftItem): Boolean; ``` Returns if the given ECraftItem is highlighted on the crafting interface. Example: ```pascal if CraftScreen.IsItemHighlighted(ECraftItem.GOLD_BRACELET) then Keyboard.PressKey(VK_SPACE); ``` - - - ## CraftScreen.CraftItem ```pascal function TCraftScreen.CraftItem(Item: TItem; Quantity: Int32; UseSpaceBar: Boolean=False): Boolean; ``` Sets the desired quantity then crafts the given ECraftItem on the gold crafting interface. If the item is highlighted (previously crafted) and UseSpaceBar is set to true, then the spacebar is used, if not then the interface item is clicked. Returns false if the given ECraftItem is not found on the interface. Example: ```pascal if CraftScreen.CraftItem(ECraftItem.RUBY_AMULET, 5) then Writeln('Beginning crafting...'); ```