Jump to content

_Hold question


flick
 Share

Recommended Posts

Link to comment
Share on other sites

I did, this is edited script

I don't know how hold works and I can't find it in help file

You won't find hold in the help file it's a function which uses _IsPressed and Send which are both in the help file. If you read about those you can see why _IsPressed has the parameter 70 and you can see how to do what you want. If you don't understand the function then you need to read the help file a lot more.

The script won't work as it is anyway.

This looks more like it should be for the F1 key option to hold down the F2 key. You can't use the F1 key to hold down the F1 key or it will never get released.

#include <Misc.au3>

HotKeySet("{F1}", "_HoldF2")
While 1
    If _IsPressed("1B") Then Exit;press escape to exit
    Sleep(50)
WEnd


Func _HoldF2()
    Send("{F2 down}")
    While _IsPressed("70")
        Sleep(50)
    WEnd

    Send("{F2 up}")

    Return 1
EndFunc ;==>_HoldF2
Edited by martin
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...