AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Msgbox returning no result

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Logman



Joined: 19 Feb 2008
Posts: 55

PostPosted: Sat Aug 23, 2008 5:00 pm    Post subject: Msgbox returning no result Reply with quote

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%                             
         
                   
Back to top
View user's profile Send private message
[VxE]



Joined: 07 Oct 2006
Posts: 1496

PostPosted: Sat Aug 23, 2008 6:46 pm    Post subject: Reply with quote

Try putting a space between ahk_id and %id%.
_________________
My Home Thread
More Common Answers: [1]. It's in the FAQ [2]. Ternary ( a ? b : c ) guide [3]. Post code inside [code][/code] tags !
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group