Jump to content
Sign in to follow this  
nodelay

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

 

 

Share this post


Link to post
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...

Share this post


Link to post
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 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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:

 

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...