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 

Same Program, new problem

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
mwgainesjr
Guest





PostPosted: Fri Oct 09, 2009 2:55 pm    Post subject: Same Program, new problem Reply with quote

I now have a program that displays a listview of names and emails when F3 is pressed when a certain screen is active. user checks the rows they want and press ok. The screen then goes away and past in the email addresses of their selections where the cursor is in the window.

My problem is that I don't want the user doing this with the cursor out of the Email To Text box.

Windows spy gives me the ClassNN of the Text box.

I'm using GuiControlGet, outputvar, focus to try and retrieve the classnn of the current control and run a comparison with the classnn provided by windows spy. What am I doing wrong?

Code:
F3::
#ifwinactive, Time Matters Email
GuiControlGet, CNN, Focus
if CNN <> 'ClaText_01000000H1'
return
Gui, Add, ListView, Grid Checked AltSubmit r20 w700 glistview, Last Name|First Name|Email Address
Gui, Add, Button, Default, OK
Gui, Add, Button, Default, Cancel
Loop, read, C:\Documents and Settings\gainesm1.NATION\Desktop\Database Export.csv
{
stringsplit,BX,A_LoopReadLine,`,
   LV_Add("",BX1,BX2,BX3)
}


Gui, Show
return

ButtonOK:
clipboard = ;
Gui,1:Listview, Listview
Loop
    {
    RNM := LV_GetNext(RNM,"checked")
    if not RNM
        break
    LV_GetText(B3,RNM,3)
   clipboard = %Clipboard% %B3%;
}
Gui, Destroy
send, %Clipboard%
return


ListView:
return

GuiClose:  ; Indicate that the script should exit automatically when the window is closed.
ButtonCancel:
return
Back to top
Roland



Joined: 08 Jun 2006
Posts: 307

PostPosted: Fri Oct 09, 2009 7:09 pm    Post subject: Reply with quote

Code:
if CNN <> 'ClaText_01000000H1'


I don't think you want the quotes here.
Back to top
View user's profile Send private message
Display posts from previous:   
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