AutoHotkey Community

It is currently May 27th, 2012, 12:08 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: October 9th, 2009, 3:55 pm 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 9th, 2009, 8:09 pm 
Offline

Joined: June 8th, 2006, 9:38 pm
Posts: 307
Code:
if CNN <> 'ClaText_01000000H1'


I don't think you want the quotes here.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], BrandonHotkey, Google Feedfetcher, Leef_me, Pulover, rjgatito, XstatyK, Yahoo [Bot] and 13 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group