flick Posted November 9, 2008 Share Posted November 9, 2008 #include <Misc.au3>HotKeySet ( "{F1}", _HoldF2() )Func _HoldF2() While _isPressed(70) Send("{F1 down}") WEnd Send("{F1 up}") Return 1EndFunchow do I change _HoldF2() to the letter p? Link to comment Share on other sites More sharing options...
dbzfanatic Posted November 9, 2008 Share Posted November 9, 2008 It's rude to start a new topic on a question that's already been asked. Read how _IsPressed() works. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
flick Posted November 11, 2008 Author Share Posted November 11, 2008 It's rude to start a new topic on a question that's already been asked. Read how _IsPressed() works.I did, this is edited scriptI don't know how hold works and I can't find it in help file Link to comment Share on other sites More sharing options...
martin Posted November 11, 2008 Share Posted November 11, 2008 (edited) I did, this is edited script I don't know how hold works and I can't find it in help fileYou 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 November 11, 2008 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now