필자가 작성한 코드에 문제가 있습니다. 나는 직원 정보를 열거하는 테이블을 가지고있다. 레코드를 선택하고 마우스 오른쪽 버튼을 클릭 할 때 클립 보드에 전자 메일 주소 복사본이 있으려고합니다. 나는 다음과 같은 코드가 있습니다 :문이 작동하지 않는 경우 AutoIT
#include <GUIConstantsEx.au3>
#include <mssql.au3>
#include <MsgBoxConstants.au3>
#include <Array.au3>
#include <WindowsConstants.au3>
#include <AutoItConstants.au3>
global $title = "E-Mail address lookup"
global $name = InputBox($title,"Please type the name of the person you wish to find")
global $sqlCon = _MSSQL_Con("server", "username", "password", "directory-plus")
global $result = _MSSQL_GetRecord($sqlCon, "autoit_view","*", "WHERE cn LIKE '%" & StringStripWS($name,3) & "%'")
if StringLen(StringStripWS($name,3)) < 1 then
MsgBox(0, $title, "Name cannot be empty")
Else
Global $rset = UBound($result) - 1
Global $ControlID = GUICreate($title, 500, 150)
Global $idListview = GUICtrlCreateListView("Deparment|E-Mail Address|Name|Telephone Number", 10, 10, 480, 150)
for $count = 1 to $rset step 1
GUICtrlCreateListViewItem($result[$count][0] & "|" & $result[$count][2] & "|" & $result[$count][1] & "|" & $result[$count][2], $idListview)
if MouseClick($MOUSE_CLICK_RIGHT)==1 Then
ClipPut($result[$count][2])
EndIf
Next
GUISetState(@SW_SHOW)
GUISetState()
While 1
Global $Msg = GUIGetMsg()
Switch $Msg
Case -3, $ControlID
Exit
EndSwitch
WEnd
EndIf
나는 내 내 IF 문을 생각했을 트릭하지만를 할 것 루프에 대한 내 코드를 실행하면, 마지막 행했을 때의 이메일 주소 열에서 무엇이든 그것을 단지 복사 특정 행을 마우스 오른쪽 버튼으로 클릭 할 때 전자 메일 주소를 복사하려고하지만 실제로 수행 할 방법을 모르겠습니다.