2. นำไฟล์ AutoItX3.dll ไปวางไว้ในโฟลเดอร์เดียวกับสคริปต์ที่เขียนขึ้นแล้วเซฟ
3. ตัวอย่างสคริปต์สำหรับเรียกใช้ไฟล์ AutoItX3.dll ใน AutoIt สั่งให้กดปุ่ม 1 2 3 1 2 3
หมายเหตุต้องคอมไพล์เป็นแบบ 32 บิตเท่านั้น สำหรับคำสั่งอื่นๆ ใน AutoItX3.dll จะแปลงให้ใช้ในโอกาสต่อไป ผมทดลองสั่งกดคีย์ในหน้าต่างโปรแกรมทั่วไปได้ แต่ยังต้องการหาผู้ที่ทดลองนำไปกดบนเกมส์ที่มีตัวป้องกันการกดปุ่ม ได้ผลเป็นอย่างไรก็แจ้งให้ทราบด้วยครับ
- Code:
#AutoIt3Wrapper_UseX64=n
Sleep(1000)
DllCall("AutoItX3.dll", "ptr", "AU3_Send", "wstr","1","long",1)
Sleep(1000)
DllCall("AutoItX3.dll", "ptr", "AU3_Send", "wstr","2","long",1)
Sleep(1000)
DllCall("AutoItX3.dll", "ptr", "AU3_Send", "wstr","3","long",1)
Sleep(1000)
DllCall("AutoItX3.dll", "ptr", "AU3_Send", "wstr","1","long",1)
Sleep(1000)
DllCall("AutoItX3.dll", "ptr", "AU3_Send", "wstr","2","long",1)
Sleep(1000)
DllCall("AutoItX3.dll", "ptr", "AU3_Send", "wstr","3","long",1)
เพิ่มเติม คำสั่งคลิกเม้าส์ สั่งคลิกที่ตำแหน่ง 100x200
- Code:
DllCall("AutoItX3.dll", "long", "AU3_MouseClick", "wstr","LEFT","long",100,"long",200,"long",1,"long",10)
xxxxxx ย้ายเนื้อหาไปที่กระทู้ [You must be registered and logged in to see this link.] xxxxx
แก้ไขล่าสุดโดย POS เมื่อ 19/06/11, 04:20 pm, ทั้งหมด 2 ครั้ง