Jump to content

I have an issue


Recommended Posts

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

  • Developers

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

  • Developers
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

  • Jos locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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