Minikori Posted March 10, 2009 Share Posted March 10, 2009 (edited) Hello, I'm working on a Periodic Table script that can give the info of elements. But for some reason, just the metals on the left side of the table aren't responding. I don't know when it started doing this, but I do know that they used to work. Any help would be greatly appreciated. Code: expandcollapse popup#include <GUIConstantsEx.au3> Dim $E[106] $Name = StringSplit("Hydrogen|Helium|Lithium|Beryllium|Boron|Carbon|Nitrogen|Oxygen|Flourine|Neon|Sodium|Magesium|Aluminum|Silicon|Phosphorus" & _ "|Sulfur|Chlorine|Argon|Potassium|Calcium|Scandium|Titanium|Vanadium|Chromium|Manganese|Iron|Cobalt|Nickel|Copper|Zinc" & _ "|Gallium|Germanium|Arsenic|Selenium|Bromine|Krypton|Rubidium|Strontium|Yttrium|Zirconium|Niobium|Molybdenum|Technetium|Ruthenium|Rhodium" & _ "|Palladium|Silver|Cadmium|Indium|Tin|Antimony|Tellurium|Iodine|Xenon|Cesium|Barium|57 To 71|Lanthanum|Cerium|Praseodymium|Neodymium" & _ "|Promethium|Samarium|Europium|Gadolinium|Terbium|Dysprosium|Holmium|Erbium|Thullium|Ytterbium|Lutetium|Hafnium|Tantalum|Tungsten|Rhenium" & _ "|Osmium|Iridium|Platinum|Gold|Mercury|Thallium|Lead|Bismuth|Polonium|Astantine|Radon|Francium|Radium|89 To 103|Actinium|Thorium" & _ "|Protactinium|Uranium|Neptunium|Plutonium|Americium|Curium|Berkelium|Californium|Einsteinium|Fermium|Mendelevium|Nobelium|Lawrencium", "|") $Symbol = StringSplit("H|He|Li|Be|B|C|N|O|F|Ne|Na|Mg|Al|Si|P|S|CL|Ar|K|Ca|Sc|Ti|V|Cr|Mn|Fe|Co|Ni|Cu|Zn|Ga|Ge|As|Se|Br|Kr|Rb|Sr|Y|Zr|Nb|Mo|Tc|Ru|Rh|Pd|Ag|Cd|In|Sn" & _ "|Sb|Te|I|Xe|Cs|Ba| |La|Ce|Pr|Nd|Pm|Sm|Eu|Gd|Tb|Dy|Ho|Er|Tm|Yb|Lu|Hf|Ta|W|Re|Os|Ir|Pt|Au|Hg|Tl|Pb|Bi|Po|At|Rn|Fr|Ra| |Ac|Th|Pa|U|Np|Pu|Am|Cm|Bk|Cf|Es|Fm|Md|No|Lw", "|") $Weight=StringSplit("1.0080|4.003|6.939|9.012|10.81|12.011|14.007|15.9994|18.998|20.183|22.990|24.31|26.98|28.09|30.974|32.064|35.453|39.948|39.102|40.08" & _ "|44.96|47.90|50.94|52.00|53.94|55.85|58.93|58.71|63.54|65.37|69.72|72.59|74.92|78.96|79.909|83.80|85.47|87.62|88.91|91.22" & _ "|92.91|95.94|(99)|101.1|102.90|106.4|107.87|112.40|114.82|118.69|121.75|127.60|126.90|131.30|132.91|137.34|N/A|138.91|140.12|140.91|144.24" & _ "|(147)|150.35|151.96|157.25|158.92|162.50|164.93|167.26|168.93|173.04|174.97|178.49|180.95|183.85|186.2|190.2|192.2|195.09|197.0|200.59" & _ "|204.37|207.19|208.98|(210)|(210)|(222)|(223)|226.05|N/A|(227)|232.04|(231)|238.03|(237)|(242)|(243)|(247)|(249|(251)|(254)|(253)" & _ "|(256)|(254)|(257)", "|") $Type = StringSplit("None|Noble Gas|Metal|Metal|Nonmetal|Nonmetal|Nonmetal|Nonmetal|Nonmetal|Noble Gas|Metal|Metal|Metal|Nonmetal|Nonmetal|Nonmetal|Nonmetal|Noble Gas|Metal|Metal|Transition Metal|Transition Metal|Transition Metal|Transition Metal|Transition Metal|Transition Metal|Transition Metal|Transition Metal|Transition Metal|Transition Metal|Metal|Metal|Nonmetal|Nonmetal|Nonmetal|Noble Gas|Metal|Metal|Transition Metal|Transition Metal|Transition Metal|Transition Metal|Transition Metal|Transition Metal|Transition Metal|Transition Metal|Transition Metal|Transition Metal|Metal|Metal|Metal|Nonmetal|Nonmetal|Noble Gas|Metal|Metal|Lanthanide Series|Lanthanide Series|Lanthanide Series|Lanthanide Series|Lanthanide Series|Lanthanide Series|Lanthanide Series|Lanthanide Series|Lanthanide Series|Lanthanide Series|Lanthanide Series|Lanthanide Series|Lanthanide Series|Lanthanide Series|Lanthanide Series|Lanthanide Series|Transition Metal|Transition Metal|Transition Metal|Transition Metal|Transition Metal|Transition Metal|Transition Metal|Transition Metal|Transition Metal|Metal|Metal|Metal|Metal|Nonmetal|Noble Gas|Nonmetal|Actinide Series|Actinide Series|Actinide Series|Actinide Series|Actinide Series|Actinide Series|Actinide Series|Actinide Series|Actinide Series|Actinide Series|Actinide Series|Actinide Series|Actinide Series|Actinide Series|Actinide Series|Actinide Series|Actinide Series", "|") $EL=StringSplit("43.723.43.83.523.563.603.643.683.723.43.83.523.563.603.643.683.723.43.83.123.163.203.243.283.323.363.403.443.483.523.563.603.643.683.723" & _ ".43.83.123.163.203.243.283.323.363.403.443.483.523.563.603.643.683.723.43.83.123.163.203.243.283.323.363.403.443.483.523.563.603.643.683.723" & _ ".163.203.243.283.323.363.403.443.483.523.563.603.643.683.723.43.83.123.163.203.243.283.323.363.403.443.483.523.563.603.643.683.723", ".") $ET=StringSplit("103.103.143.143.143.143.143.143.143.143.183.183.183.183.183.183.183.183.223.223.223.223.223.223.223.223.223.223.223.223.223.223.223.223.223.223" & _ ".263.263.263.263.263.263.263.263.263.263.263.263.263.263.263.263.263.263.303.303.303.343.343.343.343.343.343.343.343.343.343.343.343.343.343.343" & _ ".303.303.303.303.303.303.303.303.303.303.303.303.303.303.303.343.343.343.383.383.383.383.383.383.383.383.383.383.383.383.383.383.383.383", ".") GUICreate("Periodic Table", 800, 600) GUICtrlCreateGraphic(40, 140, 80, 240) GUICtrlCreateGraphic(40, 100, 40, 1, 0x07) GUICtrlCreateGraphic(720, 100, 40, 1, 0x07) GUICtrlCreateGraphic(40, 140, 80, 1, 0x07) GUICtrlCreateGraphic(520, 140, 240, 1, 0x07) GUICtrlCreateGraphic(40, 180, 80, 1, 0x07) GUICtrlCreateGraphic(520, 180, 240, 1, 0x07) GUICtrlCreateGraphic(40, 220, 720, 1, 0x07) GUICtrlCreateGraphic(40, 260, 720, 1, 0x07) GUICtrlCreateGraphic(40, 300, 720, 1, 0x07) GUICtrlCreateGraphic(40, 340, 720, 1, 0x07) GUICtrlCreateGraphic(40, 380, 720, 1, 0x07) GUICtrlCreateGraphic(160, 420, 600, 1, 0x07) GUICtrlCreateGraphic(40, 100, 1, 280, 0x07) GUICtrlCreateGraphic(80, 100, 1, 280, 0x07) GUICtrlCreateGraphic(120, 140, 1, 240, 0x07) GUICtrlCreateGraphic(160, 220, 1, 200, 0x07) GUICtrlCreateGraphic(200, 220, 1, 200, 0x07) GUICtrlCreateGraphic(240, 220, 1, 200, 0x07) GUICtrlCreateGraphic(280, 220, 1, 200, 0x07) GUICtrlCreateGraphic(320, 220, 1, 200, 0x07) GUICtrlCreateGraphic(360, 220, 1, 200, 0x07) GUICtrlCreateGraphic(400, 220, 1, 200, 0x07) GUICtrlCreateGraphic(440, 220, 1, 200, 0x07) GUICtrlCreateGraphic(480, 220, 1, 200, 0x07) GUICtrlCreateGraphic(520, 140, 1, 280, 0x07) GUICtrlCreateGraphic(560, 140, 1, 280, 0x07) GUICtrlCreateGraphic(600, 140, 1, 280, 0x07) GUICtrlCreateGraphic(640, 140, 1, 280, 0x07) GUICtrlCreateGraphic(680, 140, 1, 280, 0x07) GUICtrlCreateGraphic(720, 100, 1, 320, 0x07) GUICtrlCreateGraphic(760, 100, 1, 320, 0x07) $NameL = GUICtrlCreateLabel("Name: ", 40, 450, 200) $WeightL = GUICtrlCreateLabel("Weight: ", 40, 475, 100) $ANL = GUICtrlCreateLabel("Atomic Number: ", 40, 500, 100) $TypeL = GUICtrlCreateLabel("Type: ", 40, 525, 200) $Title = GUICtrlCreateLabel("Periodic Table of Elements", 10, 10, 780, 80) GUICtrlSetFont(-1, 49) For $x = 1 To $Symbol[0] $E[$x] = GUICtrlCreateLabel($Symbol[$x], $EL[$x], $ET[$x], 32, 32) Next GUISetState() While 1 $msg = GUIGetMsg() $cur = GUIGetCursorInfo() If $msg = $GUI_EVENT_CLOSE Then ExitLoop EndIf For $x = 1 To $Symbol[0] If $msg = $E[$x] Then GUICtrlSetData($NameL, "Name: " & $Name[$x]) GUICtrlSetData($WeightL, "Weight: " & $Weight[$x]) GUICtrlSetData($TypeL, "Type: " & $Type[$x]) If $x < 57 Then GUICtrlSetData($ANL, "Atomic Number: " & $x) ElseIf 57 < $x And $x < 90 Then GUICtrlSetData($ANL, "Atomic Number: " & $x - 1) ElseIf $x > 89 Then GUICtrlSetData($ANL, "Atomic Number: " & $x - 2) EndIf EndIf Next WEnd Exit Elements not responding: - Lithium (Li) - Beryllium (Be) - Sodium (Na) - Magnesium (Mg) - Potassium (K) - Calcium (Ca) - Rubidium (Rb) - Strontium (Sr) - Cesium (Cs) - Barium (Ba) - Francium (Fr) - Radium (Ra) Edited March 10, 2009 by Minikori For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com Link to comment Share on other sites More sharing options...
Authenticity Posted March 10, 2009 Share Posted March 10, 2009 Change the first graphic control's style to 0x07 (it's 240 for some reason). ;] Link to comment Share on other sites More sharing options...
Minikori Posted March 10, 2009 Author Share Posted March 10, 2009 Change the first graphic control's style to 0x07 (it's 240 for some reason). ;]That surprisingly fixed it. Thank you. For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now