nodelay 0 Posted July 24, 2019 hi, I need to pass a script from ahk to autoit but I am not able to achieve it. script: $F1:: While GetKeyState("F1","P") Loop { Send,{F1} MouseClick, left if not GetKeyState("F1","P") break } return If anyone can help me, I would appreciate the help Share this post Link to post Share on other sites
Nine 993 Posted July 24, 2019 I do not know ahk and have no intent of learning it. Since this is an AutoIt forum, how about YOU learn AutoIt ! Post your code if you have trouble with it. We will then help you... Not much of a signature but working on it... Spoiler Block all input without UAC Save/Retrieve Images to/from Text Tool to search content in au3 files Date Range Picker Sudoku Game 2020 Overlapped Named Pipe IPC x64 Bitwise Operations Multi-keyboards HotKeySet Fast and simple WCD IPC GIF Animation (cached) Share this post Link to post Share on other sites
water 2,387 Posted July 24, 2019 As we do not know AHK it would help if you could tell us what the goal of your AHK script is. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - WikiTask Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - WikiTutorials:ADO - Wiki, WebDriver - Wiki Share this post Link to post Share on other sites
JLogan3o13 1,637 Posted July 24, 2019 5 hours ago, Nine said: I do not know ahk and have no intent of learning it. Since this is an AutoIt forum, how about YOU learn AutoIt ! Post your code if you have trouble with it. We will then help you... I've noticed another rash of unhelpful opinionated comments from you lately. Look through the history of this forum and you will see many times where we've helped people transition from AHK to AutoIt, as there are many here who do know both languages. If you "have no intent of learning it" great, or have nothing to actually add to a post, keep moving and let someone who does want to help do so. 2 FrancescoDiMuro and Werty reacted to this "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Share this post Link to post Share on other sites
JLogan3o13 1,637 Posted July 24, 2019 @nodelay GetKeyState just looks for the state of a keyboard key. Since you are using "physical" for the mode, look in the AutoIt help file for _IsPressed as an equivalent. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Share this post Link to post Share on other sites
nodelay 0 Posted July 26, 2019 On 7/24/2019 at 9:05 AM, JLogan3o13 said: @nodelay GetKeyState just looks for the state of a keyboard key. Since you are using "physical" for the mode, look in the AutoIt help file for _IsPressed as an equivalent. ok, i'll try. thx Share this post Link to post Share on other sites
nodelay 0 Posted July 26, 2019 (edited) On 7/24/2019 at 3:03 AM, Nine said: I do not know ahk and have no intent of learning it. Since this is an AutoIt forum, how about YOU learn AutoIt ! Post your code if you have trouble with it. We will then help you... The objective of the script is a macro of "f1 + left click" by holding down f1, and pausing when released. sorry if the question is wrong, I'm trying to learn this Edited July 26, 2019 by nodelay Share this post Link to post Share on other sites
FrancescoDiMuro 420 Posted July 26, 2019 @nodelay Don't worry. Many people comes from AHK and have the need to convert their scripts from AHK to AutoIt, but each of them at least did a try, and posted some AutoIt code, which makes whomever want to help, more induced in helping the user, so, make your tries, and when you need further help, post what you got, and someone will help you for sure Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Share this post Link to post Share on other sites
Seminko 11 Posted July 26, 2019 @nodelay not sure if this is what you're after, but here you go: #include <Misc.au3> While 1 Sleep(50) If _IsPressed(70) Then ; 'hex 70 is F1 (more here https://www.autoitscript.com/autoit3/docs/libfunctions/_IsPressed.htm)' Send("{F1}") MouseClick("left") EndIf WEnd Share this post Link to post Share on other sites
nodelay 0 Posted July 27, 2019 22 hours ago, Seminko said: @nodelay not sure if this is what you're after, but here you go: #include <Misc.au3> While 1 Sleep(50) If _IsPressed(70) Then ; 'hex 70 is F1 (more here https://www.autoitscript.com/autoit3/docs/libfunctions/_IsPressed.htm)' Send("{F1}") MouseClick("left") EndIf WEnd oh thanks, this is really costing me, it's hard. Do not post anything I am doing because I am really somewhat lost. I'ts something new for me. The script does not work exactly as I am looking for it, but it is a great help to understand and be able to continue. Thank you <3 Share this post Link to post Share on other sites
Seminko 11 Posted July 27, 2019 No worries, man. If you need further help on this, just let me know. Share this post Link to post Share on other sites