need help i made a script for minecraft potionpvp but the problem is that when i press "E" to open up minecrafts inventory it doesnt work
because im using ''E'' in my ahk script to reload it. is there any ways to make ''E'' key work in minecraft and in ahk at the same time ?
btw i joined a day ago and dont know how to post here my script, it works but it has some issues, maybe i did something wrong in script and that slows it down.
[Mod edit: Moved from AHK v2 help since it is a v1 question. See below.]
Minecraft: Opening inventory doesn't work
-
- Posts: 5
- Joined: 08 Apr 2024, 17:10
- Contact:
Re: Minecraft: Opening inventory doesn't work
I have split your post from an unrelated topic. Please create your own topics for your questions, going forward.
So far, it is unclear to me, why you would want to use the same key for reloading your script and opening the game's inventory.
If you are looking for context-sensitive hotkeys, I would look into #HotIf. See also https://www.autohotkey.com/docs/v2/Hotkeys.htm#Context
To not block a key's native function, you could use the ~ modifier.
If it is not huge, just copy and paste it into a new post and apply code tags.dont know how to post here my script
So far, it is unclear to me, why you would want to use the same key for reloading your script and opening the game's inventory.
If you are looking for context-sensitive hotkeys, I would look into #HotIf. See also https://www.autohotkey.com/docs/v2/Hotkeys.htm#Context
To not block a key's native function, you could use the ~ modifier.
-
- Posts: 5
- Joined: 08 Apr 2024, 17:10
- Contact:
please help im a beginner
i use this script in minecraft potionpvp, if you are not familiar with it you can look it up, it works but the problem is that its not fast enought and when all potions are used in my minecraft hotbar i need to click ''E'' (which opens up my inventory) and drag stuff from my inventory to my hotbar, but at the same time ''E'' key must reload my script. i tried to add () in my script and it works but
then the ''E'' key doesnt work in minecraft. the same happent to ''ctrl'' it is used in minecraft to make my character sprint
but everytime i hold down ''ctrl'' the script doesnot work at all. i tried disabling ''ctrl'' in ahk but then it doesnt work in minecraft
it is very confusing but long story short i want to use keys in ahk and in minecraft at the same time. the script works fine but its
not very accurate maybe needs some changes? sorry for bothehring
Code: Select all
E::Reload
then the ''E'' key doesnt work in minecraft. the same happent to ''ctrl'' it is used in minecraft to make my character sprint
but everytime i hold down ''ctrl'' the script doesnot work at all. i tried disabling ''ctrl'' in ahk but then it doesnt work in minecraft
it is very confusing but long story short i want to use keys in ahk and in minecraft at the same time. the script works fine but its
not very accurate maybe needs some changes? sorry for bothehring
Code: Select all
i:=!i ; initiate counter
q::
if ( i = 1 ) {
send, 3
sleep, 1
Click, Right
sleep, 1
send, 1 ; replace with action
i++ ; count increment
}
else if ( i = 2 ) {
send, 4
sleep, 1
Click, Right
sleep, 1
send, 1 ; replace with action
i++ ; count increment
}
else if ( i = 3 ) {
send, 5
sleep, 1
Click, Right
sleep, 1
send, 1 ; replace with action
i++ ; count increment
}
else if ( i = 4 ) {
send, 6
sleep, 1
Click, Right
sleep, 1
send, 1 ; replace with action
i++ ; count increment
}
else if ( i = 5 ) {
send, 7
sleep, 1
Click, Right
sleep, 1
send, 1 ; replace with action
i++ ; count increment
}
else if ( i = 6 ) {
send, 8
sleep, 1
Click, Right
sleep, 1
send, 1 ; replace with action
i++ ; count increment
}
else if ( i = 7 ) {
send, 9
sleep, 1
Click, Right
sleep, 1
send, 1
; replace with action
i:=!!i ; initiate counter
}
return
Last edited by gregster on 09 Apr 2024, 13:24, edited 1 time in total.
Reason: Merged topics. Moved from AHK v2 help since this is v1 code.
Reason: Merged topics. Moved from AHK v2 help since this is v1 code.
Re: Minecraft: Opening inventory doesn't work
@danielmacros -- Did you try what was suggested below?
-
- Posts: 5
- Joined: 08 Apr 2024, 17:10
- Contact:
~Lctrl ~Rctrl woesnt work
after using (~) this modifier Lctrl and Rctrl is still blcked
and is it possible to make my script faster and more accurate?
and is it possible to make my script faster and more accurate?
Code: Select all
i:=!i ; initiate counter
~q::
if ( i = 1 ) {
send, 3
sleep, 1
Click, Right
sleep, 1
send, 1 ; replace with action
i++ ; count increment
}
else if ( i = 2 ) {
send, 4
sleep, 1
Click, Right
sleep, 1
send, 1 ; replace with action
i++ ; count increment
}
else if ( i = 3 ) {
send, 5
sleep, 1
Click, Right
sleep, 1
send, 1 ; replace with action
i++ ; count increment
}
else if ( i = 4 ) {
send, 6
sleep, 1
Click, Right
sleep, 1
send, 1 ; replace with action
i++ ; count increment
}
else if ( i = 5 ) {
send, 7
sleep, 1
Click, Right
sleep, 1
send, 1 ; replace with action
i++ ; count increment
}
else if ( i = 6 ) {
send, 8
sleep, 1
Click, Right
sleep, 1
send, 1 ; replace with action
i++ ; count increment
}
else if ( i = 7 ) {
send, 9
sleep, 1
Click, Right
sleep, 1
send, 1
; replace with action
i:=!!i ; initiate counter
}
return
~e::reload
~LCtrl::
return
~RCtrl::
return
Re: Minecraft: Opening inventory doesn't work
Do you really mean the Ctrl doesn't work? Or do you mean that when you hold Ctrl, then pressing q doesn't launch your hotkey routine? Those are two very different things. The reason for the latter would be that your hotkey isn't Ctrl+q, it's just q. If you want it to fire even when you're holding Ctrl, then make it ~*q::.
-
- Posts: 5
- Joined: 08 Apr 2024, 17:10
- Contact:
script not fast enought
finally fixed it. boiler i really appreciate it. btw is it possible to make my script faster? the sleep time is on 1 but still it isnt fast enough.
i tried to remove sleep, 1 (code) but then it messes up the commands.
i tried to remove sleep, 1 (code) but then it messes up the commands.
Re: Minecraft: Opening inventory doesn't work
If removing the Sleep causes it to have problems, then you really don't want to speed it up. You need it to have some delays for it to work (for Minecraft to handle it), apparently. Btw, it doesn't sleep for 1 ms. When you ask it to do that, it's actually sleeping for either 10 ms or 15.6 ms, depending on your machine.
-
- Posts: 5
- Joined: 08 Apr 2024, 17:10
- Contact:
reload script without ::reload
last question; is it possible to reload my script (make it start from the beginning) without (::reload) command?
the problem with it is that everytime my script reloads, then it resets and starts again it doesnt start fast enough for example
when all the commands are fired and need to reset it all, it doesnt reset fast enough and has slight delay. i want to make a (key)
and everytime i press it, the script starts from the beginning instantly.
sorry for bothering
the problem with it is that everytime my script reloads, then it resets and starts again it doesnt start fast enough for example
when all the commands are fired and need to reset it all, it doesnt reset fast enough and has slight delay. i want to make a (key)
and everytime i press it, the script starts from the beginning instantly.
sorry for bothering
Re: Minecraft: Opening inventory doesn't work
I don't know a way of making it stop whatever it's doing and start from the beginning as if nothing was already running without Reload or equivalent. Maybe someone else will have an idea.
Who is online
Users browsing this forum: No registered users and 33 guests