 |
VFP 愛用者社區 本討論區為 Visual Foxpro 愛用者經驗交流的地方, 請多多利用"搜尋"的功能, 先查看看有無前例可循, 如果還有不懂的再發問. 部份主題有附加檔案, 須先註冊成為社區居民才可以下載.
|
上一篇主題 :: 下一篇主題 |
發表人 |
內容 |
Patrick Wu
註冊時間: 2007-01-03 文章: 228 來自: 台北市
第 1 樓
|
發表於: 星期一 十二月 10, 2012 3:02 pm 文章主題: oWS.SendKeys("{}") 如何傳送 滑鼠左鍵 |
|
|
煩請各先進指導 ("Wscript.Shell") 如何傳送 滑鼠左鍵
oWS = CreateObject("Wscript.Shell")
oWS.SendKeys("{TAB}") == >> 傳送 TAB 鍵
oWS.SendKeys("{ENTER}") == >> 傳送 ENTER 鍵
.
.
.
.
oWS.SendKeys("{LEFTMOUSE}") == >> 傳送 滑鼠左鍵 === >> 無效 |
|
回頂端 |
|
 |
garfield Site Admin

註冊時間: 2003-01-30 文章: 2160
第 2 樓
|
發表於: 星期一 十二月 10, 2012 3:40 pm 文章主題: |
|
|
網路上找的, 你試一下
SendKeys Instruction
Syntax:
SendKeys Keys$[, Wait]
Group: Miscellaneous
Description:
Send Keys$ to Windows.
Parameter Description
Keys$ Send the keys in this string value to Windows. (Refer to table below.)
Wait If this is not zero then the keys are sent before executing the next instruction. If this is omitted or zero then the keys are sent during the following instructions.
Key - Description
+ Shift modifier key: the following key is a shifted key
^ Ctrl modifier key: the following key is a control key
% Alt modifier key: the following key is an alt key
(keys) Modifiers apply to all keys
~ Send Enter key
k Send k Key (k is any single char)
K Send Shift k Key (K is any capital letter)
{special n} special key (n is an optional repeat count)
{mouse x,y} mouse key (x,y is an optional screen position)
{k} Send k Key (any single char)
{K} Send Shift k Key (any single char)
{Cancel} Send Break Key
{Esc} Send Escape Key
{Escape} Send Escape Key
{Enter} Send Enter Key
{Menu} Send Menu Key (Alt)
{Help} Send Help Key (?)
{Prtsc} Send Print Screen Key
{Print} Send
{Execute} Send ?
{Tab} Send
{Pause} Send Pause Key
{Tab} Send Tab Key
{BS} Send Back Space Key
{BkSp} Send Back Space Key
{BackSpace} Send Back Space Key
{Del} Send Delete Key
{Delete} Send Delete Key
{Ins} Send Insert Key
{Insert} Send Insert Key
{Left} Send Left Arrow Key
{Right} Send Right Arrow Key
{Up} Send Up Arrow Key
{Down} Send Down Arrow Key
{PgUp} Send Page Up Key
{PgDn} Send Page Down Key
{Home} Send Home Key
{End} Send End Key
{Select} Send ?
{Clear} Send Num Pad 5 Key
{Pad0..9} Send Num Pad 0-9 Keys
{Pad*} Send Num Pad * Key
{Pad+} Send Pad + Key
{PadEnter} Send Num Pad Enter
{Pad.} Send Num Pad . Key
{Pad-} Send Num Pad - Key
{Pad/} Send Num Pad / Key
{F1..24} Send F1 to F24 Keys
Mouse:
Mouse movement and button clicks:
• {Move x,y} - move the mouse to (x,y)
• {ClickLeft x,y} - move the mouse to (x,y) and click the left button. (This is the same as {DownLeft x,y}{UpLeft}.)
• {DoubleClickLeft x,y} - move the mouse to (x,y) and click the left button. (This is NOT the same as {ClickLeft x,y}{ClickLeft}.)
• {DownLeft x,y} - move the mouse to (x,y) and push the left button down.
• {UpLeft x,y} - move the mouse to (x,y) and release the left button.
• {...Middle x,y} - similarly named keys for the middle mouse button.
• {...Right x,y} - similarly named keys for the right mouse button.
The x,y values are screen pixel locations, where (0,0) is in the upper-left corner. In all cases the x,y is optional. If omitted, the previous mouse position is used. _________________ 利用>>搜尋<<的功能會比問的還要快得到答案. |
|
回頂端 |
|
 |
Patrick Wu
註冊時間: 2007-01-03 文章: 228 來自: 台北市
第 3 樓
|
發表於: 星期一 十二月 10, 2012 5:07 pm 文章主題: |
|
|
謝謝 Garfield 版主先進
這篇文章 後學拜讀過了
後學本著 版主之指示 {利用>>搜尋<<的功能會比較問的還要快得到答案.}
找了些許 TRY 了些許 無解
謝謝版主 |
|
回頂端 |
|
 |
|
|
您 無法 在這個版面發表文章 您 無法 在這個版面回覆文章 您 無法 在這個版面編輯文章 您 無法 在這個版面刪除文章 您 無法 在這個版面進行投票 您 無法 在這個版面附加檔案 您 無法 在這個版面下載檔案
|
|