Hawkwing Posted March 8, 2009 Share Posted March 8, 2009 (edited) I'm constantly creating new abilities in the Warcraft 3 World Edit Abilities Editor. I am trying to create something to help create them. For example, if I had an ability that with every level, it heals 200 more than the last level, and it had 100 levels, it would be much faster to automate it than to type it all in. This is what I have so far CODE #include <GUIConstantsEx.au3> #include <EditConstants.au3> Opt ("guioneventmode", 1) $gui = GUICreate ("WE Ability Helper", 300, 200, 500, 0) $guitabnumber = GUICtrlCreateTab (0, 0, 100, 25) GUICtrlCreateTabItem ("Number") GUICtrlCreateLabel ("Levels Total", 5, 30) $ninputlevelstotal = GUICtrlCreateInput ("", 5, 43, 70, 22, $ES_NUMBER) GUICtrlCreateLabel ("Starting Level", 5, 70) $ninputstartinglevel = GUICtrlCreateInput ("4", 5, 83, 70, 22, $ES_NUMBER) GUICtrlCreateLabel ("Starting Number", 5, 110) $ninputstartingnumber = GUICtrlCreateInput ("", 5, 123, 70, 22, $ES_NUMBER) GUICtrlCreateLabel ("Number Interval", 5, 150) $ninputnumberinterval = GUICtrlCreateInput ("", 5, 163, 70, 22, $ES_NUMBER) $numberstart = GUICtrlCreateButton ("Start", 90, 30) GUICtrlSetOnEvent (-1, "numberstart") $guitabtext = GUICtrlCreateTab (100, 0, 100, 25) GUICtrlCreateTabItem ("Text") GUISetOnEvent ($GUI_EVENT_CLOSE, "close", $gui) GUISetState (@SW_SHOW) While 1 Sleep (100) WEnd Func numberstart () $nn = Number ($ninputstartingnumber + ($ninputnumberinterval * $ninputstartinglevel - 2)) $ncurrentlevel = (GUICtrlRead ($ninputstartinglevel)) Sleep (5000) While $ncurrentlevel < (GUICtrlRead ($ninputlevelstotal + 1)) $nn = ($nn + $ninputnumberinterval) $ncurrentlevel = ($ncurrentlevel + 1) Send ("{enter}") Send ($nn) Send ("{enter}") Send ("{down}") WEnd EndFunc Func close () Exit EndFunc As far as I can see, this should open up the box where you type in the number, send the variable, close the box, then select the next one. But it doesn't send the right number, and the while loop only goes once. Edited March 8, 2009 by pigeek The Wheel of Time turns, and Ages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Age that gave it birth comes again. 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