17 questions
0
votes
0
answers
47
views
AHK Function not returning result properly
I am relatively new in AHK so I apologize for my basic lack of knowledge.
I have the following script:
xpos1=
xpos2=
SetMouseDelay,-1
SetBatchLines, -1
col_outher_circle=0xFFFFFF
col_gray_area=...
-2
votes
1
answer
98
views
How do I use a variable to define key up/down?
test(key){
send "{key down}" ;no
; send "{%key% down}" ;no
sleep 500
send "{key up}"
}
test("w") ;test(w) doesnt work either as per the manual
%...
-2
votes
2
answers
61
views
Why would Send rearrange string?
My code:
#Requires AutoHotkey v2.0+
TextToSend := FileRead("textToSend.txt")
lines := StrSplit(TextToSend, "\n")
:*:st::{
Loop
{
SetKeyDelay 10000
...
-2
votes
1
answer
250
views
Error: This variable has not been assigned a value
I expect this code:
#Requires AutoHotkey v2.0+
#SingleInstance Force
ar := [1, 2, 3]
i := 0
:*:ab:: {
Loop 3 {
a := StrCompare(ar[i], "Hi")
Send(a)
i++
}
}
to work ...
0
votes
2
answers
87
views
Pressing another key interrupts timer/script when waiting for certain key pressed conditions
I'm a noob, so this might look ugly and could probably be improved.
The script below does the following:
When capslock is activated and
Spacebar is pressed down
Submit a space every 10ms
This works ...
-1
votes
2
answers
95
views
AHKv2 Unable to offset excel value with ComObjGet - 'Error: This value of type "String" has no method named "Offset".'
AUTOHOTKEY v2.0.18
I have 2 codes. One works flawlessly and the other, which is almost exactly the same, does not.
Can you identify where I'm going wrong here please?
WORKING - TEST CODE TO GET IT TO ...
0
votes
1
answer
55
views
auto hot key v2: block of code does not execute when holding shift key
this is actually a script for my little game.. when player is running (you need hold the shift to run faster/sprint) and if you do so the script does not work...you have to release the key and then ...
1
vote
1
answer
161
views
How can I replace my tab key with AutoHotkey?
My keyboard broke, and some keys are not working. To overcome this situation, I wrote a simple script that makes the letter 'q' act as 'Tab' when I hold down 'Shift':
+q::Send "{Tab}"
The ...
0
votes
1
answer
438
views
How can I get the width and height of a GUI window in AHK?
I'm trying to make a GUI window with an Edit control inside that will automatically resize to fit the GUI. How can I get the current dimensions of the GUI window?
Here's my code:
#Requires AutoHotkey ...
0
votes
0
answers
152
views
AHK Hotstring for Multi-language Input
I am bilingual (English and Persian), and I regularly switch between keyboard input languages by pressing Alt + Shift. Since it's not an easy type, I am trying to create a hotstring in Auto Hot Key (...
0
votes
1
answer
84
views
How to check if a variable has been assigned a variable in AutoHotKey?
How might one check if a variable exists before using it? For example, you might have an Object that can contains 36 keys, one for each alphanumeric character, and you want to set another variable to ...
2
votes
1
answer
277
views
AutoHotkey hotstring not replacing trigger text containing "!b" correctly [duplicate]
I'm having trouble with an AutoHotkey script where a hotstring isn't replacing the trigger text correctly.
Here's the specific line of code I used:
:*:;container;::>[!blank-container|float-left-...
1
vote
1
answer
2k
views
Autohotkey v2 script | copy, open an application, paste
I would like to select text, press a hotkey to trigger an application open, paste the selected text into the newly opened application. In my case, my application is called everything, a file locator ...
1
vote
1
answer
415
views
AHK V2 Class extends troubles
I'm not sure if I'm using classes wrong, but any assistance would be appreciated. I'm using Autohotkey V2 and I'm trying to make a class extend to another class.
Class Person{
__New(info){
this....
0
votes
1
answer
126
views
Switching chrome tabs not working correctly in Auto hot key
In the ahk script, i have created an action to change tabs by clicking the Xbutton1(back button) of my mouse with the scroll of the mouse. So when i press xbutton1 and scroll up or down the tabs in ...
0
votes
2
answers
112
views
Can't send the space key
I'm trying to fix double-typing on my keyboard.
For this I want to use an AutoHotkey (2) script like this:
SendMode "Input"
#SingleInstance
*g::
{
Send "{g}"
Sleep 50
}
...
0
votes
1
answer
863
views
how to make an AutoHotkey script wait for a GUI to completely load
I am trying to load a program via AutoHotkey script so I can identify the existance of an element on the loaded GUI. It normally takes about 15 seconds for everything on the scree to load completely ...