2016-05-09 28 views
-1

大家好我有這段代碼無法正常工作,請用手。AutoHotKey宏不能正常工作

portal(){ 
 
    portalCommand: 
 
    \t BlockInput On 
 
    \t SendInput {i} 
 
    \t Sleep 2 
 
    \t MouseClick, right, 1775, 795 
 
    \t SendInput {i} 
 
    \t Sleep 2 
 
    \t MouseClick, left, 955, 380 
 
    \t BlockInput Off 
 
    \t return 
 
    }

這裏的問題我不知道爲什麼不發送或它對快速輸入我然後右鍵我再次點擊輸入和左擊,任何sugestions嗎?

+0

rip english:/ - – Blauhirn

+0

應該發生什麼?什麼是「{i}」?這是一個變量嗎?如果你只是發送字符「我」,像這樣做:'SendInput我'和順便說一句睡眠是'2毫秒',也許你想要2秒,就像這樣:'睡眠2000'告訴我們。 。 。 – PGilm

+0

這麼好的你Blauhirn你知道不是所有的人在這個世界上都知道英語可能是你應該在判斷這麼簡單之前先思考並且試着給出一個很好的答案不僅僅是用你的愚蠢來觸摸球 –

回答

0

每我的評論:

portal(){ 
portalCommand: 
    BlockInput On 
    SendInput i 
    Sleep 2000 
    MouseClick, right, 1775, 795 
    SendInput i 
    Sleep 2000 
    MouseClick, left, 955, 380 
    BlockInput Off 
    return 
} 
+0

希望得到一個積極的答案,這不以任何方式幫助,但謝謝你的時間 –

0

我忘了提,即時通訊在編程壞只是業餘愛好和需要它的遊戲打開庫存時任務「{我}」按有關睡眠你在此期間,我做了我的家庭作業,並閱讀了有關autohotkeys和東西,我得到了完美的工作結果感謝:)無論如何,這裏是我的工作代碼,這是我想要的,我會wxplain後(對我的英語傢伙我的覺得不太好,我沒有學過英語剛剛學到的道路:)

portal(){ 
 
portalCommand: 
 
     BlockInput On 
 
\t \t ;Pressing Space if any inventory is open 
 
     Send {space} 
 
     Sleep 50 
 
\t \t ;Opening Inventory 
 
     SendInput {i} 
 
\t \t Sleep 200 
 
\t \t ;Move the mouse to a specific location 
 
\t \t MouseMove, 1770, 790 
 
\t \t Sleep 400 
 
\t \t ;Pressing Mouse Right Button 
 
     Send, {RButton} 
 
     Sleep 400 
 
\t \t ;Move the mouse to a specific location 
 
\t \t MouseMove, 600, 370 
 
\t \t Sleep 400 
 
\t \t ;Pressing Mouse Left Button 
 
\t \t Send, {LButton} 
 
     BlockInput off 
 
\t return 
 
}

該放棄的代碼對我來說是一個解決方案,實際工作沒有任何問題,它發送空格鍵(這是遊戲設置關閉任何庫存打開),然後發送「I」鍵打開的盤點角色並轉到定義的位置,然後點擊城鎮門戶滾動,然後返回到定義的位置並左鍵單擊它進入門戶(這意味着去鎮上)位置基於監視器最大分辨率,因此座標可以根據任何需要進行調整以防其他人需要或使用此代碼;)