2014-04-24 2 views
0

확인란을 선택 취소하려면 어떻게하나요?AutoIt의 체크 박스를 어떻게 해제합니까?

정말이 확인란을 '선택 취소'하고 싶습니다. 전에 send_keys를 사용하고 있었고 토글 (공간)을 "checked/unchecked"로 보낼 수있었습니다. 그러나 토글을 보낼 때 실제로 선택을 해제 할 수 있었고, 그러면 내가 원하지 않는 체크를 할 수있었습니다. 확실히 유엔 조사를 받아보고 싶습니다.

어떻게하면됩니까?

여기 내 AutoIt이 스크립트는 지금까지의 : 내가 시도 모든 변종에 남아있는 한

#include <StaticConstants.au3> 
#include <EditConstants.au3> 
#include <WindowsConstants.au3> 
#include <MsgBoxConstants.au3> 

Local $Title = "Campus Portal Install" 

Run("C:\Temp\PortalInstall-13_1_A_HF5_0003\cmcportalinstall.exe") 

WinWaitActive($Title) 

Send("z:\CampusPortal\") 

ControlCommand($Title, "", "cbBackupIIS", "UnCheck") 
ControlCommand($Title, "", "[NAME:cbBackupIIS]", "UnCheck") 
ControlCommand($Title, "", 1049322, "UnCheck") 
ControlCommand($Title, "", "[CLASS:#1049322]", "UnCheck") 
ControlCommand($Title, "", "CLASS:Button]", "UnCheck") 
ControlCommand($Title, "", "[WindowsForms10.BUTTON.app.0.2004eee]", "UnCheck") 
ControlCommand("Campus Portal Install", "", "cbBackupIIS", "UnCheck") 
ControlCommand("Campus Portal Install", "", "[NAME:cbBackupIIS]", "UnCheck") 
ControlCommand("Campus Portal Install", "", 1049322, "UnCheck") 
ControlCommand("Campus Portal Install", "", "[CLASS:#1049322]", "UnCheck") 
ControlCommand("Campus Portal Install", "", "CLASS:Button]", "UnCheck") 
ControlCommand("Campus Portal Install", "", "[WindowsForms10.BUTTON.app.0.2004eee]", "UnCheck") 

MsgBox($MB_SYSTEMMODAL, "Title", "This message box will timeout after 10 seconds or select the OK button.", 10) 

; 그들은 거기에서 그들을 떠나는 데 아무런 해를 입히지 않으므로 오류가 없습니다. 게다가 내가 시도한 것을 보여줍니다.

ControlSend가 정상적으로 작동합니다.

여기 제어 정보의 :

>>>> Window <<<< 
Title: Campus Portal Install 
Class: WindowsForms10.Window.8.app.0.2004eee 
Position: 496, 166 
Size: 608, 523 
Style: 0x16CF0000 
ExStyle: 0x00050100 
Handle: 0x00450334 

>>>> Control <<<< 
Class: WindowsForms10.BUTTON.app.0.2004eee 
Instance: 15 
ClassnameNN: WindowsForms10.BUTTON.app.0.2004eee15 
Name: cbBackupIIS 
Advanced (Class): [NAME:cbBackupIIS] 
ID: 1049322 
Text: Backup IIS Entries? 
Position: 108, 142 
Size: 123, 15 
ControlClick Coords: 55, 6 
Style: 0x5601000B 
ExStyle: 0x00000000 
Handle: 0x001002EA 

>>>> Mouse <<<< 
Position: 663, 337 
Cursor ID: 0 
Color: 0xD6D3CE 

>>>> StatusBar <<<< 

>>>> ToolsBar <<<< 

>>>> Visible Text <<<< 
Version 13.1.a.hf5.0003\campusportal 
Backup IIS Entries? 
Backup Files? 
... 
C:\CampusPortalBackup\ 
Backup Path: 
... 
z:\CampusPortal\ 
Base Path: 
E&xit 
&Next > 
Choose a base location and which applications will be installed. 
Application Settings 


>>>> Hidden Text <<<< 
App Pool Credentials 
Password: 
Username: 
Use Integrated Authentication? 
Configure Portal Database? 
Run Portal SQL Update Scripts? 
Portal 
Password: 
Username: 
Database Name: 
Server Name: 
Campus 
Password: 
Username: 
Database Name: 
Server Name: 
Host Header: 
Register ASP.Net with IIS? 
IP Address: 
global 
DSBXDANSQL01 
Description: 
Branding Folder: 
URL Name: 
You are now ready to install/remove the selected applications. Click the Begin button below to start the installation/removal/configuration process. 
Clear All 
Select All 
Campus List: 
Student: 
Applicant: 
Activate? 
Employer: 
Staff: 
... 
http://localhost:80/ 
Portal: 
http://localhost:99/ 
Configuration Tool: 
http://localhost:98/ 
Admin Console: 
127.0.0.1 
SMTP Server: 
seconds. 
30 
Query Interval: 
50 
Records Quantity: 
Password: 
NT Domain\User: 
minute(s) 
Staff Active Directory Settings: 
dev 
NT Domain: 
dev.campusmgmt.com 
Fully Qual. Domain: 
LDAP://OU=CampusUsers,DC=dev,DC=campusmgmt,DC=com 
AD Path: 
Student Active Directory Settings: 
dev 
NT Domain: 
dev.campusmgmt.com 
Fully Qual. Domain: 
LDAP://OU=CampusUsers,DC=dev,DC=campusmgmt,DC=com 
AD Path: 
1 
Cache Refresh: 
doc|rtf|pdf|xls|txt 
0 
Allowable File Types: 
Cache Refresh Time: 
Add 
Allow IPs 
... 
http://localhost:91/ 
http://localhost:97/ 
Security Service: 
Login Service: 
... 
http://localhost:95/ 
http://localhost:93/ 
http://localhost:92/ 
http://localhost:96/ 
Online Registration: 
Payment Service: 
Messaging Service: 
http://localhost:94/ 
Reporting Service: 
Portal Data Service: 
\\DSBXDANSQL01\Reports 
Default Report Path: 
\\DSBXDANSQL01\Reports 
Custom Report Path: 
+0

이 명령이 작동 : ControlSend ($ 제목, "", "[NAME : cbBackupIIS]", "") 그래서 적어도 내가 지금 올바른 방법을 알고 컨트롤을 지정하십시오. – Arluin

+0

그리고 "UnCheck", ""를 사용하여 시도했습니다. – Arluin

+1

IsChecked는 항상 0을 반환합니다. 그러나 IsEnabled는 1을 반환합니다. – Arluin

답변

0

here에서, 당신은 체크 박스가 선택되어 있는지 확인 _IsChecked($hWnd)을 사용할 수 있어야합니다. 버튼이 올바른 클래스 유형의 체크 박스입니다.

+2

저는 Autoit으로 인해 발생하는 문제는 컨트롤 상태를 확인하는 함수가 자동 생성 컨트롤에서만 작동한다는 것입니다. 하지만 캠퍼스 포털 설치 응용 프로그램의 제어 상태에 액세스하려고하면 비표준을 사용하기 때문에 작동하지 않습니다. GUICtrlRead ($ hwnd)는 항상 0을 반환합니다. – Arluin

+0

나는 올바른 창을 가지고 있다고 확신합니다. ControlGetHandle ($ Title, "", "[NAME : cbBackupIIS]")는 Finder 도구를 확인란 위에 놓으면 Windowit Autoit과 같은 값을 반환합니다. – Arluin

0

광산도 항상 0을 반환합니다.

나는 그것을 사용하여 작업을 진행하게 관리

If ControlCommand("Login", "Login", $checkBox, "IsChecked") Then 
     ControlCommand("Login", "Login", $checkBox, "Uncheck") 
    EndIf 
관련 문제