Jump to content

ahk to autoit


Recommended Posts

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

 

 

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • Moderators
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.

"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!

Link to comment
Share on other sites

  • Moderators

@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!

Link to comment
Share on other sites

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 by nodelay
Link to comment
Share on other sites

@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:

 

Link to comment
Share on other sites

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
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...