How can I hold down a key
Moderators: Dorian (MJT support), JRL
How can I hold down a key
I am trying to make macro that will hold down a key in my case "v" and release after a certain amount of time. I am unable to figure this out I have read the help text but im not exactly sure what I need here. Can someone please help me out here. Thank you!
I tried that and it isn't working, It might be the client I am running it under, I am trying to simulate a game key being held down to make certain things easier for me. I am not sure why this wouldn't work, any insight on how to get around this?
I tried this from a different forum post
Let>VK_control=86
Let>ExtendedKey=0
Let>KeyUp=2
LibFunc>user32.dll,keybd_event,r,VK_control,0,ExtendedKey,0
Let>FLAGS={%ExtendedKey% OR %KeyUp%}
wait>5
LibFunc>user32.dll,keybd_event,r,VK_control,0,FLAGS,0
but cant seem to get this to work either.
I tried this from a different forum post
Let>VK_control=86
Let>ExtendedKey=0
Let>KeyUp=2
LibFunc>user32.dll,keybd_event,r,VK_control,0,ExtendedKey,0
Let>FLAGS={%ExtendedKey% OR %KeyUp%}
wait>5
LibFunc>user32.dll,keybd_event,r,VK_control,0,FLAGS,0
but cant seem to get this to work either.
Try Let>ExtendedKey=1
Checked my sample code for playing a flash demo.
Also checked the forums for ExtendedKey.
In all cases the code was just like yours except:
Let>ExtendedKey=1
Does that work?
Gale
Also checked the forums for ExtendedKey.
In all cases the code was just like yours except:
Let>ExtendedKey=1
Does that work?
Gale
Here is what I have so far everything else works fine, just have a problem with holding a key down. I could use send>v but that only used it once and spamming v over and over doesn't work properly.
Code: Select all
label>start
wait>3
send>w
wait>2
send>r
label>action
wait>3
//Insert key press here for "v"
wait>2
label>action2
wait>3
send>r
wait>3
send>7
wait>1
send>n
wait>10
goto>start
What application are you sending the key presses to?
What app are you running that is supposed to respond to your key presses and releases?
Did you write it, or is it on a web site we can try out?
Gale
Did you write it, or is it on a web site we can try out?
Gale
Try SetFocus, maybe Send>vvvvvvv is way to go.
Make sure your script has a SetFocus on the Darkfall window. Your Press and Send commands may be landing where they are ignored. This may especially happen if you are running with the Macro Scheduler editor open.
Also, do you need to be moving the mouse to a location where game will react to the key strokes?
I did a web seach for "Darkfall online" "Macro Scheduler" and found several cheat and bot sites with sample Macro Scheduler code. None used any advanced features like libfunc. Instead they used Press and Release for holding down the Alt, shift, and ctrl keys and the Send> command to send key strokes. They used what you call the spam method, often in a loop for a period of time or until the objective was met.
Gale
Also, do you need to be moving the mouse to a location where game will react to the key strokes?
I did a web seach for "Darkfall online" "Macro Scheduler" and found several cheat and bot sites with sample Macro Scheduler code. None used any advanced features like libfunc. Instead they used Press and Release for holding down the Alt, shift, and ctrl keys and the Send> command to send key strokes. They used what you call the spam method, often in a loop for a period of time or until the objective was met.
Gale
Keydown is problematic in games.
Read post dated Sun Jun 12, 2005 10:54 am:
http://www.mjtnet.com/usergroup/viewtop ... =1991#8081
In the above post the method (repeated libfuncs) suggested by support worked for some applications, but not for the game in question. Maybe it will work for you.
In the game forums some players say bots should not be used to gain "skill", wonder if the Darkfall developers are trying to disable the bots?
Gale
http://www.mjtnet.com/usergroup/viewtop ... =1991#8081
In the above post the method (repeated libfuncs) suggested by support worked for some applications, but not for the game in question. Maybe it will work for you.
In the game forums some players say bots should not be used to gain "skill", wonder if the Darkfall developers are trying to disable the bots?
Gale