Jump to content

Please Help - Fileopen


onestcoder
 Share

Recommended Posts

PLEASE HELP ME WITH THE FILEOPEN STUFF

What i need is for when the $combot = a value then it runs a spacific au3 script

If combot = 10 then

????????????????????

#include <GUIConstants.au3>

GUICreate("Synthsis Bot 0.1", 274, 200)

opt("GUICoordMode", 1)

$combo1 = GUICtrlCreateCombo("Cooking", 4, 4, 120, 100)
GUICtrlSetData($combo1, "Carrot Broth|Sliced Sardines|Salmon Sub|Orange Juice|Bug Broth|Apple Juice|Selbina Butter|Meat Jerky|Insect Paste|Dhalmel Steak|Pineapple Juice|Meatball|Meat Mithkabob|Jack-o-Lantern|Pet Food Delta Biscuit|Melon Juice|Pie Dough|Apple Pie|Fish Mithkabob|Crayfish Ball|Stone Cheese|Yagudo Drink|Melon Pie|Colored Egg|Pumpkin Soup|Squid Sushi|San d'Orian Tea|Raisin Bread|Pear au Lait|Navarin|Tuna Sushi|Shallops Tropicale|Whitefish Stew|Sole Sushi|Pumpkin Pie|Marron Glace|Rolanberry Pie|Seafood Stew|Tavnazian Salad|Rice Dumplings|Tavnazian Tacos|Sweet Rice Cakes|Red Curry|Cursed Soup", "Cooking")

$combo2 = GUICtrlCreateCombo("Woodworking", 4, 44, 120, 100)
GUICtrlSetData($combo2, "Arrowwood lumber|Workbench|Ash lumber|Bone Arrows|Bolts|Maple Sugar|Iron arrows|Silver Arrows|Beetle Arrows|Fang Arrows|Horn Arrows|Scorpion Arrows|Darksteel bolts|Chest|Bodkin Arrows|Demon Arrows|Platinum Arrows|Hume Fishing rod|Kilo Pumps|Mega pumps|Battle Staff|Cabinets|Kabura Arrows|Eight Sided Pole|Cythara Anglica|Laquer Tree sap|Lancewood lumber|Steel Splitter|Steel Walnut Lumber|Kinkobo Staff|Primate Staff|Orichalcum Lance|Staurobow ", "Woodworking")

$combo3 = GUICtrlCreateCombo("Goldsmith", 4, 84, 120, 100)
GUICtrlSetData($combo3, "Copper Ingot|Brass Ingot|Brass Flowerpots|Brass Hairpins|Silver Ingot|Silver Hairpin|Brass Hammer|Silver Rings|Silver Arrowheads|Hiraishin|Jeweled Silver Rings|Mythril Ingot|Mythril Sheet|Chain Gorget|Silver bangles|Mythril Ring|Gold Ingots|Jeweled Mythril Rings|Mythril Cuisses|Mythril Gorget|Platinum Ingot|Hydro Patas|Platinum Rings|Platinum Earring|Mythril Breastplate|Ashura|Sun Eings|Moon Ring|Torque|Gold Buckler|Gold Spear|Death Earrings|Elemental Bead|Orichalcum Ingot|Orichalcum Earring|Muscle Belt|Orichalcum Ring|Beaded Orichalcum Rings", "Goldsmith")

$combo4 = GUICtrlCreateCombo("Leathercraft", 4, 124, 120, 100)
GUICtrlSetData($combo4, "Sheep Wool|Sheep Leather|Rabbit Mantles|Leather Vest|Solea|Lizard Mantle|Dhalmel Leather|Warrior's Belt|Dhalmel Mantle|Sandals|Parchment|Ram Leather|Wolf Gorget|Waistbelt|Ram Mantles|Himantes|Moccasins|Raptor Gloves|Tiger Leather|Battle Boots|Beak Jerkins|Coeurl Leather|Tiger Mantle|Tiger Jerkin|War Boots|Coeurl Mantle|Coeurl Jerkin|Desert Mantle|Dusk Ledelsens|Dusk Gloves|Coeurl Jerkin|Tiger Mask|", "Leathercraft")

$combo5 = GUICtrlCreateCombo("Bonecraft", 150, 4, 120, 100)
GUICtrlSetData($combo5, "Bone Hairpin|Bone Arrowheads|Cornette|Bone Ring|Bone Mask|Bone Leggings|Bone Mittens|Bone Pick|Beetle Ring|Arrowheads Galore|Beetle Arrowheads|Fang Arrowhead|Horn Arrowheads|Carapace Mask|Scorpion Arrowheads|Blood Stone|Scorpion Ring|Demon Arrowheads|Scorpion Mask|Scorpion Leggings|Scorpion Subligar|Bone Patas|Demon's Ring|Tiger Fangs|Saintly Ring|Eremite's Ring|Dragon Mask|Carapace Gauntlets|Carapace Helm|Mammoth Tusk|Acheron Shield|Scorpion Gauntlets|Scorpion Helm|Scorpion Breastplate|Dragon Ring|Cursed Harness|Gavial Mask|Chronos Tooth", "Bonecraft")

$combo6 = GUICtrlCreateCombo("Smithing", 150, 44, 120, 100)
GUICtrlSetData($combo6, "Bronze Ingot|Bronze Ingot|Bronze Sheet|Bronze Scales|Xiphos|Bronze Rod|Tin Ingot|Paktong Ingot|Iron Ingot|Iron Sheet|Makibishi|Iron Scales|Bilbo|Iron Mask|Iron Chain|War Pick|Voulge|Steel Sheet|Twicer|Steel Scales|Iron Mittens|Juji Shuriken|Iron Subligar|Darksteel Ingots|Gust Claymore|Mythril Pick|Darksteel Ingot|Darkteel Sheet|Steel Ingot|Breastplate|Gauntlets|Kyofu|Darksteel Bolt Heads|Nodowa|Darksteel Falchion|Darksteel Bolt Heads|NODOWA|Darksteel Pick|Bascinet|Karimata Arrowheads|Bastard Sword|Darksteel Nodowa|Celata|Adaman Ingot", "Smithing")

$combo7 = GUICtrlCreateCombo("Alchemy", 150, 84, 120, 100)
GUICtrlSetData($combo7, "Antidote|Beeswax|Tsurara|Animal Glue|Silencing Potion|Deodorizer|Poison Dust|Mercury|Poison Potion|Echo Drops|Mokuto|Sairui-ran|Eye Drops|Artificial Lens|Potion|Prism Powder|Vitriol|Acid Bolt Heads|Holy Water|Holy Bolt|Cermet Chunk|Porcelain Flowerpot|Sleeping Potion|Hi-Potion|Venom Dust|Sleep Bolt Heads|Spartan Bullets|Paralysis Dust|Paralyze Potion|Kororito|Bloody Bolt Heads|Composite Fishing Rod|Ouka Ranman|Espadon|Mamush*to|Icarus Wings|Cannon Shells|Papillions|Platinum Nugget|Sun Water|Pro-Ether|", "Alchemy")

$combo8 = GUICtrlCreateCombo("Clothcraft", 150, 124, 120, 100)
GUICtrlSetData($combo8, "Grass Thread|Grass Cloth|Cape|Hachimaki|Linen Thread|Linen Cloth|Fisherman's Hose|Moblinweave|Heko Obi|Kaginawa|Fly Lure|Fisherman's Tunica|Shinobi-Tabi|Wool Thread|Wool Cloth|Bird Fletching|Hemp Gorget|Insect Fletching|Silk Thread|Velvet Cloth|Silk Cloth|Green Ribbon|Field Hose|Silk Headband|Field Tunica|Battle Bracers|Jester's Cape|Green Beret|Rainbow Thread|Rainbow Cloth|Jester's Headband|Arhat's Hakama|Errant Hat|Errant Slops|Giant Bird Fletchings|Dance Shoes|", "Clothcraft")

; OK BUTTON
$button_1 = GUICtrlCreateButton("OK", 4, 160, 75, 25)
GUICtrlSetState($button_1, $GUI_FOCUS); the focus is on this button

;EXIT BUTTON
$n2 = GUICtrlCreateButton("EXIT", 150, 160, 75, 25)


GUISetState()

Do
   
   $cook = GUICtrlRead($combo1)
   
   $wood = GUICtrlRead($combo2)
   
   $gold = GUICtrlRead($combo3)
   
   $leather = GUICtrlRead($combo4)
   
   $bone = GUICtrlRead($combo5)
   
   $smith = GUICtrlRead($combo6)
   
   $alch = GUICtrlRead($combo7)
   
   $cloth = GUICtrlRead($combo8)
   
   If $cook = "Carrot Broth" Then
      $cook2 = 10
   Else
      $cook2 = 0
   EndIf
   
   If $wood = "Arrowwood lumber" Then
      $wood2 = 11
   Else
      $wood2 = 0
   EndIf
   
   If $gold = "Copper Ingot" Then
      $gold2 = 12
   Else
      $gold2 = 0
   EndIf
   
   If $leather = "Sheep Wool" Then
      $leather2 = 13
   Else
      $leather2 = 0
   EndIf
   
   If $bone = "Bone Hairpin" Then
      $bone2 = 14
   Else
      $bone2 = 0
   EndIf
   
   If $smith = "Bronze Ingot" Then
      $smith2 = 15
   Else
      $smith2 = 0
   EndIf
   
   If $alch = "Antidote" Then
      $alch2 = 16
   Else
      $alch2 = 0
   EndIf
   
   If $cloth = "Grass Thread" Then
      $cloth2 = 17
   Else
      $cloth2 = 0
   EndIf
   
   $combot = $cook2 + $wood2 + $gold2 + $leather2 + $bone2 + $smith2 + $alch2 + $cloth2
   
   $msg = GUIGetMsg()
   
   If $msg = $button_1 & $combot = 10 Then
      FileOpen("\Includes\var1\1_12x.exe", 0)
   EndIf
   
   If $msg = $n2 Then
      Exit
   EndIf
Until $msg = $GUI_EVENT_CLOSE

Need a website: http://www.iconixmarketing.com

Link to comment
Share on other sites

i think i should be useing Run().

or

Select
    Case $combot = 10
    Run("\includes\var1\1_9x.exe")
EndSelect

is this it

I dont know >< I'm such a newb :lmao:

Edited by onestcoder

Need a website: http://www.iconixmarketing.com

Link to comment
Share on other sites

how about this

If $msg = $button_1 Then
        If $combot = 10 Then
            Run("\Includes\var1\1_12x.exe", 0)
        Else
            MsgBox(64, "Sorry", "The combot does not = 10   ")
        EndIf
    EndIf

8)

I have another idea i will post in a sec

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

this is an example of using the como to "hold" the value... rather than all of the "if wood = word" etc..etc

this reads the last two digits in the combo box that contains the value

****** not this is an example and i ONLY fixed the first portion of "cooK" values

#include <GUIConstants.au3>

GUICreate("Synthsis Bot 0.1", 274, 200)

opt("GUICoordMode", 1)

$combo1 = GUICtrlCreateCombo("Cooking-Value", 4, 4, 120, 100)
GUICtrlSetData($combo1, "Carrot Broth 10|Sliced Sardines 09|Salmon Sub 12|Orange Juice 15|Bug Broth 02|Apple Juice|Selbina Butter|Meat Jerky|Insect Paste|Dhalmel Steak|Pineapple Juice|Meatball|Meat Mithkabob|Jack-o-Lantern|Pet Food Delta Biscuit|Melon Juice|Pie Dough|Apple Pie|Fish Mithkabob|Crayfish Ball|Stone Cheese|Yagudo Drink|Melon Pie|Colored Egg|Pumpkin Soup|Squid Sushi|San d'Orian Tea|Raisin Bread|Pear au Lait|Navarin|Tuna Sushi|Shallops Tropicale|Whitefish Stew|Sole Sushi|Pumpkin Pie|Marron Glace|Rolanberry Pie|Seafood Stew|Tavnazian Salad|Rice Dumplings|Tavnazian Tacos|Sweet Rice Cakes|Red Curry|Cursed Soup", "Cooking")

$combo2 = GUICtrlCreateCombo("Woodworking", 4, 44, 120, 100)
GUICtrlSetData($combo2, "Arrowwood lumber|Workbench|Ash lumber|Bone Arrows|Bolts|Maple Sugar|Iron arrows|Silver Arrows|Beetle Arrows|Fang Arrows|Horn Arrows|Scorpion Arrows|Darksteel bolts|Chest|Bodkin Arrows|Demon Arrows|Platinum Arrows|Hume Fishing rod|Kilo Pumps|Mega pumps|Battle Staff|Cabinets|Kabura Arrows|Eight Sided Pole|Cythara Anglica|Laquer Tree sap|Lancewood lumber|Steel Splitter|Steel Walnut Lumber|Kinkobo Staff|Primate Staff|Orichalcum Lance|Staurobow ", "Woodworking")

$combo3 = GUICtrlCreateCombo("Goldsmith", 4, 84, 120, 100)
GUICtrlSetData($combo3, "Copper Ingot|Brass Ingot|Brass Flowerpots|Brass Hairpins|Silver Ingot|Silver Hairpin|Brass Hammer|Silver Rings|Silver Arrowheads|Hiraishin|Jeweled Silver Rings|Mythril Ingot|Mythril Sheet|Chain Gorget|Silver bangles|Mythril Ring|Gold Ingots|Jeweled Mythril Rings|Mythril Cuisses|Mythril Gorget|Platinum Ingot|Hydro Patas|Platinum Rings|Platinum Earring|Mythril Breastplate|Ashura|Sun Eings|Moon Ring|Torque|Gold Buckler|Gold Spear|Death Earrings|Elemental Bead|Orichalcum Ingot|Orichalcum Earring|Muscle Belt|Orichalcum Ring|Beaded Orichalcum Rings", "Goldsmith")

$combo4 = GUICtrlCreateCombo("Leathercraft", 4, 124, 120, 100)
GUICtrlSetData($combo4, "Sheep Wool|Sheep Leather|Rabbit Mantles|Leather Vest|Solea|Lizard Mantle|Dhalmel Leather|Warrior's Belt|Dhalmel Mantle|Sandals|Parchment|Ram Leather|Wolf Gorget|Waistbelt|Ram Mantles|Himantes|Moccasins|Raptor Gloves|Tiger Leather|Battle Boots|Beak Jerkins|Coeurl Leather|Tiger Mantle|Tiger Jerkin|War Boots|Coeurl Mantle|Coeurl Jerkin|Desert Mantle|Dusk Ledelsens|Dusk Gloves|Coeurl Jerkin|Tiger Mask|", "Leathercraft")

$combo5 = GUICtrlCreateCombo("Bonecraft", 150, 4, 120, 100)
GUICtrlSetData($combo5, "Bone Hairpin|Bone Arrowheads|Cornette|Bone Ring|Bone Mask|Bone Leggings|Bone Mittens|Bone Pick|Beetle Ring|Arrowheads Galore|Beetle Arrowheads|Fang Arrowhead|Horn Arrowheads|Carapace Mask|Scorpion Arrowheads|Blood Stone|Scorpion Ring|Demon Arrowheads|Scorpion Mask|Scorpion Leggings|Scorpion Subligar|Bone Patas|Demon's Ring|Tiger Fangs|Saintly Ring|Eremite's Ring|Dragon Mask|Carapace Gauntlets|Carapace Helm|Mammoth Tusk|Acheron Shield|Scorpion Gauntlets|Scorpion Helm|Scorpion Breastplate|Dragon Ring|Cursed Harness|Gavial Mask|Chronos Tooth", "Bonecraft")

$combo6 = GUICtrlCreateCombo("Smithing", 150, 44, 120, 100)
GUICtrlSetData($combo6, "Bronze Ingot|Bronze Ingot|Bronze Sheet|Bronze Scales|Xiphos|Bronze Rod|Tin Ingot|Paktong Ingot|Iron Ingot|Iron Sheet|Makibishi|Iron Scales|Bilbo|Iron Mask|Iron Chain|War Pick|Voulge|Steel Sheet|Twicer|Steel Scales|Iron Mittens|Juji Shuriken|Iron Subligar|Darksteel Ingots|Gust Claymore|Mythril Pick|Darksteel Ingot|Darkteel Sheet|Steel Ingot|Breastplate|Gauntlets|Kyofu|Darksteel Bolt Heads|Nodowa|Darksteel Falchion|Darksteel Bolt Heads|NODOWA|Darksteel Pick|Bascinet|Karimata Arrowheads|Bastard Sword|Darksteel Nodowa|Celata|Adaman Ingot", "Smithing")

$combo7 = GUICtrlCreateCombo("Alchemy", 150, 84, 120, 100)
GUICtrlSetData($combo7, "Antidote|Beeswax|Tsurara|Animal Glue|Silencing Potion|Deodorizer|Poison Dust|Mercury|Poison Potion|Echo Drops|Mokuto|Sairui-ran|Eye Drops|Artificial Lens|Potion|Prism Powder|Vitriol|Acid Bolt Heads|Holy Water|Holy Bolt|Cermet Chunk|Porcelain Flowerpot|Sleeping Potion|Hi-Potion|Venom Dust|Sleep Bolt Heads|Spartan Bullets|Paralysis Dust|Paralyze Potion|Kororito|Bloody Bolt Heads|Composite Fishing Rod|Ouka Ranman|Espadon|Mamush*to|Icarus Wings|Cannon Shells|Papillions|Platinum Nugget|Sun Water|Pro-Ether|", "Alchemy")

$combo8 = GUICtrlCreateCombo("Clothcraft", 150, 124, 120, 100)
GUICtrlSetData($combo8, "Grass Thread|Grass Cloth|Cape|Hachimaki|Linen Thread|Linen Cloth|Fisherman's Hose|Moblinweave|Heko Obi|Kaginawa|Fly Lure|Fisherman's Tunica|Shinobi-Tabi|Wool Thread|Wool Cloth|Bird Fletching|Hemp Gorget|Insect Fletching|Silk Thread|Velvet Cloth|Silk Cloth|Green Ribbon|Field Hose|Silk Headband|Field Tunica|Battle Bracers|Jester's Cape|Green Beret|Rainbow Thread|Rainbow Cloth|Jester's Headband|Arhat's Hakama|Errant Hat|Errant Slops|Giant Bird Fletchings|Dance Shoes|", "Clothcraft")

; OK BUTTON
$button_1 = GUICtrlCreateButton("OK", 4, 160, 75, 25)
GUICtrlSetState($button_1, $GUI_FOCUS); the focus is on this button

;EXIT BUTTON
$n2 = GUICtrlCreateButton("EXIT", 150, 160, 75, 25)


GUISetState()

While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE then Exit
    
    If $msg = $combo1 Then
        $cook = StringRight(GUICtrlRead($combo1), 2)
        MsgBox(64, "Cook Value", $cook); for testing
    EndIf
    
    If $msg = $button_1 Then
        $combot = $cook; + $wood2 + $gold2 + $leather2 + $bone2 + $smith2 + $alch2 + $cloth2; fix later
        If $combot = 10 Then
            Run("\Includes\var1\1_12x.exe", 0)
        Else
            MsgBox(64, "Sorry", "The combot does not = 10   ")
        EndIf
    EndIf
    
    If $msg = $n2 Then
        Exit
    EndIf
WEnd

8)

NEWHeader1.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...