I'm having a little problem
Here is a part of my code:
Func MouseScan() Local $count = 0 Local $expensive = Number(GUICtrlRead($CTRL_OrderSell)) < GUICtrlRead($CTRL_OrderBuy) Local $cheap = Number(GUICtrlRead($CTRL_OrderSell)) > GUICtrlRead($CTRL_OrderBuy) $x = MouseGetPos(0) $y = MouseGetPos(1) For $count = 0 to 9 step 1 Local $Box = _MemoryRead($ADDR_MsgBoxSell, $openmem, "word") MouseClick("left", MouseGetPos(0), MouseGetPos(1)-35, 2) GuiCtrlSetData($CTRL_MsgBoxSell, number($box)) If $expensive = 1 then Send("{ESC}") EndIf Next EndFunc
Here is what I wanna do:
1. Click on some part of the screen
2. When the msgbox pops, I want to compare 2 values from 2 inputbox ($CTRL_OrderSell and $CTRL_OrderBuy)
3. If no msgbox appears (value is stored in $CTRL_MsgBoxSell 1 if the msgbox is there / 0 if it's not), it moves to y-35
4. If $CTRL_OrderSell < $CTRL_OrderBuy it presses ESC and moves to y-35
5. If $CTRL_OrderSell > $CTRL_OrderBuy it presses ENTER and moves to y-35 (not in the code yet, since I'm having a problem from the previous step already)
6. Loop that until $count = 9 after that executes another function (another mousemove) and after the function has been executed repeat from step 1
Here is what happens:
Since it's in a loop, it won't "refresh" the values in their respective inputbox until the loop has been executed (therefore the comparison between OrderSell and OrderBuy fails)
I'm a bit lost...
Edited by xanathos, 31 May 2012 - 10:04 AM.







