Logman
Joined: 19 Feb 2008 Posts: 55
|
Posted: Sat Aug 23, 2008 5:00 pm Post subject: Msgbox returning no result |
|
|
I've tried to do this task a few ways and failed at all of them. I've resorted to a msgbox to see what's coming through and nothing is happening at that point. Other ways I have gone about it result in the first part working, but the second stage after the else never works, even if I don't use an else and go about it another way. Is there some reason why I can't get text in that msgbox after what has taken place so far?
| Code: |
Function(id)
{
global 1Part, 2Part, 3Part, Amount
ControlGetText, Good, static2, ahk_id%id%
{
StringTrimLeft, Amount Good, 10
ControlGetText, Text, Button8, ahk_id%id%
IfInString, text, Help
{
StringTrimLeft, 1Bye, Text, 6
StringTrimRight, 2Bye, 1Bye, 1
1Part := 2Bye * 2
2Part := Amount
Result := 1Part + 2Part
}
Else
ControlGetText, 2Text, Button10, ahk_id%id%
{
msgbox, %2Text%
|
|
|