T-language Hotkey Start method

Source: Internet
Author: User

How to use hotkey controls with hotkey controls

The first step: Select the hotkey to add to the panel.

Step two: Hotkey control properties Select the Hotkey key value.

Step three: Add the Hotkey event feature.

Hot-Key Mode selection

1. Normal mode

2. Software mode

3. Hardware mode

Basic operation of the script

Script Start

Function Hotkey Start _ Hotkey ()    //Add here the code thread handle you want to execute    = Threadbegin ("Execute", "")    End

  

Script pauses and restores

Function Hotkey Pause _ Hotkey ()    //Add here the code you want to execute if    (! Pause)        whether to pause = True        threadsuspend (thread handle)    else        whether or not to pause = False        Threadresume (thread handle)    end    End

  

Script paused

Function Hotkey Stop _ Hotkey ()    //Add here the code you want to execute    threadclose (thread handle)    end

Instance code:

var x1  var y1 var  x2  var y2  var thread handle = 0var Pause = falsefunction execute ()    x1 = editgettext ("x1 coordinate", "mouse Dot")    y1 = editgettext ("y1 coordinate", "mouse dot")    x2 = editgettext ("x2 coordinate", "mouse dot")    y2 = editgettext ("y2 coordinate", "mouse dot")    while (true)        //1th        MouseMove (x1,y1)        sleep (+)        Mouseleftclick ()        sleep (+)        //second point        MouseMove (x2,y2)        sleep (+)        Mouseleftclick ()        sleep (+)    Endendfunction Exit _ Click ()    Here you add the code you want to execute    exit () endfunction Start _ Click ()    //Here Add the code thread handle you want to execute    = Threadbegin ("Execute", "") Endfunction Hotkey Stop _ Hotkey ()    //Add here the code you want to execute    threadclose (thread handle)    Endfunction Hotkey Start _ Hotkey ()    //Add here the code thread handle you want to execute    = Threadbegin ("Execute", "")    Endfunction Hotkey Pause _ Hotkey ()    //Here Add the code you want to execute if    (!) Pause        = True        Threadsuspend (thread handle)    else        whether or not to pause = False        Threadresume (thread handle)    end    End

  

Function Hotkey Start _ Hotkey ()//Add here the code thread handle you want to execute = Threadbegin ("Execute", "") End

T-language Hotkey Start method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.