Hey, I have 0 control over config because I use built in functions for reading config, I donāt parse it line by line.
However commenting in config file shouldnāt be a problem. Do you have some particular example that doesnāt work for you?
Hey, I have 0 control over config because I use built in functions for reading config, I donāt parse it line by line.
However commenting in config file shouldnāt be a problem. Do you have some particular example that doesnāt work for you?
No I didnĀ“t try to use comments since I donĀ“t know how to markup them. Is it a leading ; ? If so maybe add it in the first post for documentation purposes.
Peruse AutoHotkeys documentation at its website.
ā
lol @tqFan - I just realized thoā¦ they are probably referring to your ini config files and not AHK scripts. DOH.
@Christian Thereās no need for that, write whatever and however you want, just avoid those things in the documentation / sample config at the start of the line. Your config can look like that for example:
[general]
THIS IS RESPONSIBLE FOR SUSPENDING THE HOTKEYS BUT NOT AUTOCASTS
suspend_key=Tab
[combo holds]
CAST AETHER RAY (0) ON DOUBE LEFT CLICK + HOLD
combo1=LButton:0
initial_delay1=50
double_press1=true
double_press_time_gap1=300
Also you cannot comment in this way after some value read by the program
double_press_time_gap1=300 // MY COMMENT
or this way
double_press_time_gap1=300 ; MY COMMENT
This is the function Iām using btw: IniRead - Syntax & Usage | AutoHotkey
Yes, I was referring to adding documentation to my ini-files.
Am I right in assuming, that every line that cannot be parsed is just ignored by the parser and wonĀ“t break the file?
So I could comment valid config lines out with an # at the start for example?
Thanks for the feedback by the way!
I preface all my comment lines with āCMT=ā. I know it isnāt necessary, but it makes then clearly comments and ensures that nothing that follows can affect the inputs. unless TqFan decides to make CMT an actual keyword, which seems darn unlikely. (I can see the April Fools day joke already! Donāt do it, TqFan. )
Having a way to add comments after the actual text of a functional statement (value read by the program) would be nice, but I understand the difficulty.
P.S. I just discovered [hide items]; as a current DoM player, Iām loving it. Many hugs TqFan.
Maybe i could just go over the config file and make a temporary copy of it stripped of these comments. And read it afterwards. The indicators of comments (do you have some in mind?) could be configurable in Defaults.ahk, but youād have to to recompile it yourself to change it . It super easy though
Iām glad you found it useful. You might be the second after me. I used it a lot in the past. Took some time to make it work reliably. The problem in grim dawn is you get stack up a lot of āitem hidden / shown messagesā depending on your config. These can be hidden by editing grim dawnās settings file but they still queue up albeit invisible delaying other messages
Yeah, the messages at the top of the screen become useless, but that happens with DoM any way if you are running with +heroes.
Pretty much anything that wouldnāt conflict with what can be coded would be fine. Semi-colon maybe?
I thought that would be the proposition. Iāve just checked and you can make it a hotkey in an AHK if you escape it:
`;::Space
This does not work in GDAutocaster (you get an error) but maybe I could potentially make it work someday. However the following works
[combo presses]
combo1=Space:;
Dunno, I started with C++ and //
comments so Iād probably choose that if thereās no better idea.
I started with Fortran (yeah, Iām old) and it used ā/xā to start a comment and ā**x/ā to end it. You definitely donāt want to deal with that nonsense. ā//ā is fine by me. (The āxā is supposed to be an asterisk, but for some reason it just doesnāt show up.)
I donāt know if you really need inline comments in an ini file. If you keep it standard ( ; for a line comment) users have the advantage of getting syntax highlight in their text editors. At least if they use a somewhat sophisticated one.
Last major updates 2 Nov 22:
[general]
suspend_key=Tab//tralala
comment=//
[combo presses]
combo1=Space:0 // BWC
suspend_key=Tab//tralala
// is the default if you donāt have this config entry.
I did it in this way because very little code was needed, the following does all the work
(and I already had a special function for reading config entries anyway):
comment_pos := InStr(output_var, comment, true)
if (comment_pos > 1)
output_var := SubStr(output_var, 1, comment_pos-1)
I also pushed to GitHub a lot of rewritten code because it was not very readable to me after a half year break so I had to make it clearer so watch out for some bugs (I tested everything but you never know).
TqFan, could you elaborate on this? I canāt seem to find any information on changing the speed or existence of the messages that flash at the top of the screen. If thereās a resource with this info, just point me to it.
You can edit this file:
so nothing is shown when these events happen but the empty messages are still shown which results in delaying other messages.
If you use āHide Itemsā GDAās feature, you may want to change
to
Unfortunately erasing them like this is the only thing Iāve found.
I even made a thread once here:
what file does config.ini refer to?
I execute the GDAutocaster.exe and download file GDAutocaster.ini
when i launch GDAutocaster.exe and i load GDAutocaster.ini , show the message lik this
Am I misunderstanding?
Hi. Donāt use GDAutocaster.ini config, itās not supposed to be used, it just shows all the options available. Make you own .in file with what you want, for example even very simple and short ones such as
[autocast by toggle]
cast1=q:1
delay1=1000
work. Write if you`d like a hel with writing a good config for your plastyle / build
i got it ! thanks
Last major update 19 Nov 22:
[gamepad]
delay=40
vertical_shift=-20
key=RButton
button_nr=6
Achieved by moving the cursor slightly which switches the game to & mode and then pressing or button with a skill. After that the user has to move the analog stick to go back to mode. Works best if you put the skill on RMB.
[gamepad]
delay=40
vertical_shift=-20
key=RButton
button_nr=6
delay [mandatory]
vertical_shift [mandatory]
key [mandatory]
button_nr [mandatory]
Hello, Iām watching your GDAutocaster tutorial, but how do I configure the program?? it looks for a config.ini file, should I look in the game folder??
You just make one yourself. A file with .ini extension, for example this one config.zip (219 Bytes) (unzip it)
Also remember to have your windows display extensions: https://www.howtogeek.com/205086/beginner-how-to-make-windows-show-file-extensions/ (if i.e. your text file display as FILE instead of FILE.TXT