Jump to content
Sign in to follow this  
alaa777

hotkeyset() problem

Recommended Posts

alaa777

when i set hotkey for a function such as

HotKeySet("{a}","a")
While 1
WEnd
Func a()
    Send("{a}")
    $x[1]= "a"
EndFunc

it detect sending "a" as the key a is pressed so it keep looping in the function and" Send("a") " don`t solve the problem but send("A") is working but i don`t want it capital letter

if there`s a way to use HotKeySet() or similer function when the hotkey that is pressed it type it too it will help

Edited by alaa777

Share this post


Link to post
Share on other sites
Jos

HotKeySet("a", "a")
While 1
WEnd
Func a()
    HotKeySet("a")
    Send("a")
    $x[1] = "a"
    HotKeySet("a", "a")
EndFunc ;==>a

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Beginner321

when i set hotkey for a function such as

HotKeySet("{a}","a")
While 1
WEnd
Func a()
    Send("{a}")
    $x[1]= "a"
EndFunc

it detect sending "a" as the key a is pressed so it keep looping in the function and" Send("a") " don`t solve the problem but send("A") is working but i don`t want it capital letter

if there`s a way to use HotKeySet() or similer function when the hotkey that is pressed it type it too it will help

When you are sending letters, you dont need the { } around it.

hotkeyset("a","a")

Share this post


Link to post
Share on other sites
alaa777

HotKeySet("a", "a")
While 1
WEnd
Func a()
    HotKeySet("a")
    Send("a")
    $x[1] = "a"
    HotKeySet("a", "a")
EndFunc;==>a
thx so much this is smart one ^^

Share this post


Link to post
Share on other sites
Jos

thx so much this is smart one ^^

Not really as this is documented in the Helpfile .... you just proven you didn't read it all :D Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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  

×