mwgainesjr Guest
|
Posted: Fri Oct 09, 2009 2:55 pm Post subject: Same Program, new problem |
|
|
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 |
|
|