Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoTrayIcon
- Opt('WinTitleMatchMode', 2)
- Global Const $TITLE = 'Khanh KG - 2015'
- main() ; Here we go!
- Func main()
- If Not ProcessExists('7giay.exe') Or Not WinExists($TITLE) Then
- MsgBox(16 + 262144, 'Error', 'Please run program first!')
- Return False
- EndIf
- WinActivate($TITLE)
- ControlClick($TITLE, '', '[NAME:batdau]')
- ; Auto calculate
- _setTxt(4, _getTxt('cong') + _getTxt('cong', 2))
- _setTxt(3, _getTxt('tru') - _getTxt('tru', 2))
- _setTxt(2,_getTxt('nhan') * _getTxt('nhan', 2))
- _setTxt(1, _getTxt('chia') / _getTxt('chia', 2))
- EndFunc ;==>main
- Func _getTxt($ctrl, $n = 1)
- $ctrl &= ($n == 1) ? 't' : 'p'
- Return Number(ControlGetText($TITLE, '', '[NAME:' & $ctrl & ']'))
- EndFunc ;==>_getTxt
- Func _setTxt($ctrl, $newTxt)
- Return ControlSetText($TITLE, '', '[CLASS:WindowsForms10.EDIT.app.0.378734a; INSTANCE:' & $ctrl & ']', $newTxt)
- EndFunc ;==>_setTxt
Add Comment
Please, Sign In to add comment