Jump to content

Recommended Posts

Posted (edited)

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
  • Developers
Posted (edited)

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

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

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

Posted

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

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
×
×
  • Create New...