Hi! I play destiny 2, and have very little experience with autohotkey.
One issue of contention in D2 is deleting massive amounts of items in the game, whether it's shaders, consumables, extra tokens, your vault, you name it: sometimes you need to delete hundreds of items at a time.
This involves holding a key for a set amount of time, letting it go for a set amount of time, and then repeating the process. Ideally, I would like to make a script that does the following:
The user will Press LCtrl + s + d, and holding those keys, enter a number with their other hand (LCtrl, s, and d are all easily pressable with one hand).
Once they are done entering the number, which might be two, three, or even four digits, they release those three keys.
They then position their mouse, hit another key, and the process begins: they can afk while their hundreds or thousands of items are deleted.
So I see the following:
-> when LCtrl is pressed, allow the hotkey sd to activate.
-> while LCtrl, s, and d are held, record input.
-> when they are released, interpret that input as a number
-> when another hotkey is pressed (I was going to say the delete key, seems right) the process begins and loops the number of times indicated by the number value entered
-> process is a delete script that holds a key (for most people, 'f') for a set number of seconds (1.2), and then releasing it for a set number of seconds (.5)
Could I have some help roughing it out? Ideally, if either I can make this or someone else can point me in the right direction (functions, commands, methods to use), I can share it with the Destiny 2 pc community.
Many Thanks!
Destiny 2 Shader Deletion Script: I suck at writing scripts
-
- Posts: 4
- Joined: 10 Aug 2018, 15:54
-
- Posts: 4
- Joined: 10 Aug 2018, 15:54
Re: Destiny 2 Shader Deletion Script: I suck at writing scripts
Aiight, I'm seeing views and no replies. when I get around to it, I'll post what I have here so that other people can have the script.
Re: Destiny 2 Shader Deletion Script: I suck at writing scripts
id really advise against this hodgepodge of hotkeys, stick to single letter/ modifier(s)+letter
Code: Select all
#NoEnv
#SingleInstance Force
SetBatchLines -1
Gui Input: New, +AlwaysOnTop +ToolWindow -Caption
Gui Margin, 2, 2
Gui Add, Edit, w50 Number vRepeatCount +HwndhRepeatCount
#If GetKeyState("Ctrl", "P")
s & x::
ControlSetText, , , % "ahk_id " hRepeatCount
Gui Input: Show
return
#If
s & x Up::Gui Input: Submit
Del::
Loop % RepeatCount
doProcess()
return
doProcess() {
ToolTip % "Something's happening... " A_Index
Sleep 50
}
-
- Posts: 4
- Joined: 10 Aug 2018, 15:54
Re: Destiny 2 Shader Deletion Script: I suck at writing scripts
Thank you so much for your reply! I just want to make sure I understand what the script is doing before I use it. Here's my best intuition:
Do I have that all right?
Also, is there a default way to cancel a script while its running if I somehow mess it up? Is there a way I can add that in?
Thank you again so much for your help!
Creates a window for me to enter a number of loops I want it to run, stored as RepeatCountswagfag wrote:Code: Select all
Gui Input: New, +AlwaysOnTop +ToolWindow -Caption Gui Margin, 2, 2 Gui Add, Edit, w50 Number vRepeatCount +HwndhRepeatCount
I am unsure of what ControlSetText is doing, but this looks like it shows the window when I press the hotkey Ctrl + s + xswagfag wrote:Code: Select all
#If GetKeyState("Ctrl", "P") s & x:: ControlSetText, , , % "ahk_id " hRepeatCount Gui Input: Show return
This accepts the input once I let go of the hotkey and starts the loop. Fairly sure.swagfag wrote:Code: Select all
#If s & x Up::Gui Input: Submit Del:: Loop % RepeatCount doProcess() return
...And here I should put in what I want my delete script to be?swagfag wrote:Code: Select all
doProcess() { ToolTip % "Something's happening... " A_Index Sleep 50 }
Do I have that all right?
Also, is there a default way to cancel a script while its running if I somehow mess it up? Is there a way I can add that in?
Thank you again so much for your help!
Re: Destiny 2 Shader Deletion Script: I suck at writing scripts
1. yes
2. it just clears the box evry time u open it. u can remove it and backspace everything manually.. something i found rather annoying.
3. Del starts ur loop
4. yes
u can bind a hotkey to Reload or ExitApp
2. it just clears the box evry time u open it. u can remove it and backspace everything manually.. something i found rather annoying.
3. Del starts ur loop
4. yes
u can bind a hotkey to Reload or ExitApp
-
- Posts: 4
- Joined: 10 Aug 2018, 15:54
Re: Destiny 2 Shader Deletion Script: I suck at writing scripts
Thanks so much!
Who is online
Users browsing this forum: No registered users and 244 guests