hixxa321 Posted April 6, 2017 Share Posted April 6, 2017 Hello, i'm new in AutoIt so i don't know some (most of) things, and i have an issue GUICtrlSetData($PotworHP, $PotworHP - 200) GUICtrlSetData($MP, $MP - 150) $PotworHP is a value that is not always same, sometimes it can be 200, sometimes 400 or sometimes other number (from GUICtrlCreateLabel) $MP = 300 (or sometimes less, but not higher) (from GUICtrlCreateLabel) It's used when button is clicked And why $MP becomes -136 and $PotworHP becomes -181? It shouldn't Sorry for my bad English, English isn't my native language :c Link to comment Share on other sites More sharing options...
Developers Jos Posted April 6, 2017 Developers Share Posted April 6, 2017 You will have to show the whole script for us to understand why thing could go wrong, but my wild guess is that you assume that $mp contains the value of the control and not its handle. To get the value you need to do GuiCtrlRead($mp). Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Joboy2k Posted April 6, 2017 Share Posted April 6, 2017 (edited) you need to write guictrlread($potworHP) when reading whats in the control GUICtrlSetData($PotworHP, Guictrlread($PotworHP) - 200) GUICtrlSetData($MP, Guictrlread($MP) - 150) Sorry Jos, i didn't read your whole message before posting mine xD Edited April 6, 2017 by joboy2k Link to comment Share on other sites More sharing options...
Developers Jos Posted April 6, 2017 Developers Share Posted April 6, 2017 Isn't that what I already stated? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Joboy2k Posted April 6, 2017 Share Posted April 6, 2017 yeah i noticed after i had posted and edited mine to apologise xD Link to comment Share on other sites More sharing options...
hixxa321 Posted April 7, 2017 Author Share Posted April 7, 2017 Thank you @joboy2k and @Jos for answer, now it works, i'm using it to make in my "game" skills, -200 for enemy HP, -150 you mana (MP). Link to comment Share on other sites More sharing options...
Developers Jos Posted April 7, 2017 Developers Share Posted April 7, 2017 2 minutes ago, hixxa321 said: i'm using it to make in my "game" skills, -200 for enemy HP, -150 you mana (MP). Then you better now first read our forum rules with respect to our stands on game automation. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts