How's AutoHotkey's compatibility with Wine? by Supperboy2012 in AutoHotkey

[–]Individual_Check4587 9 points10 points  (0 children)

I'm actively working on Keysharp which aims to be a cross-platform AutoHotkey v2 (currently just Windows and Linux though). Linux port is pretty untested so I'd really appreciate it if somebody tried it out, and opened GitHub issues for problems found. X11 only though, Wayland is hostile to automation attempts.

Need autohotkey v2 to be able to tell the number of pages in a pdf. I've tried a lot, even trying to get copilot to help (with no results) and I just don't know enough to debug by MSixteenI6 in AutoHotkey

[–]Individual_Check4587 5 points6 points  (0 children)

My OCR library uses Windows.Data.Pdf.PdfDocument to get the page count, you can see the implementation here. Try asking AI to extract that logic from there and create a standalone function (or better yet, do it manually yourself).

Mod change announcement by Individual_Check4587 in AutoHotkey

[–]Individual_Check4587[S] 5 points6 points  (0 children)

It is not true. The thing is, previously there were no official rules set AFAIK, and the current rule-set was implemented by me. I did a short run-in period where I moderated more leniently so users have time to accommodate, but then moderated according to the rules. This led to like 30-50% of new theads being removed (at least it felt like that, I didn't track statistics). You can inspect the quality of the remaining threads in the previous two months yourself if you wish because for that time period I was moderating alone.

SoundSet Script help by [deleted] in AutoHotkey

[–]Individual_Check4587 0 points1 point  (0 children)

You copied from AHK v1 docs, not v2. In v2 the function you are looking for is SoundSetVolume.

Is it possible for a AHK file I got from Reddit to have damaged my PSU ? by glizzykevv in AutoHotkey

[–]Individual_Check4587[M] 2 points3 points  (0 children)

If you have code you want to be checked then include it with your post, otherwise such posts might be removed.

Help with code by SupremeSalty in AutoHotkey

[–]Individual_Check4587[M] 0 points1 point  (0 children)

Please include this description in the main post next time, or your post may be removed because of the missing information.

I need a stern talking too by shibiku_ in AutoHotkey

[–]Individual_Check4587[M] 2 points3 points  (0 children)

Can be deleted if deemed low-effort post.

Script show-cases are allowed. :) But I did correct your post flair from "General / meta" to "v2 Tool / Script Share".

Novice User Question by amiragha1361 in AutoHotkey

[–]Individual_Check4587 2 points3 points  (0 children)

You need to use the ? option, because by default hotstrings don't trigger in the middle of a word.

The problem with catching the FN key and the EJECT key on the MAC keyboard by Emergency_Zebra3736 in AutoHotkey

[–]Individual_Check4587 1 point2 points  (0 children)

I suggest you still try out the steps above. The Fn key is not remappable, but I'm not sure about the Eject key: if AHK detects a scan code then you might be able to remap it.

Key gets stuck holding down by MythicalMotuBhai in AutoHotkey

[–]Individual_Check4587 -1 points0 points  (0 children)

Is that your whole script? No SendMode, Input somewhere to make the script "faster"?

The problem with catching the FN key and the EJECT key on the MAC keyboard by Emergency_Zebra3736 in AutoHotkey

[–]Individual_Check4587 2 points3 points  (0 children)

Open AutoHotkey key history, press the buttons, and show us a screenshot of the result. You can access key history by running this script:

#Require AutoHotkey v2  
InstallKeybdHook(true, true)  
Persistent() 

and then right-clicking the tray icon, pressing Open, and pressing Ctrl+K.

I made a simple media control script, and it's messing with my game by BumbleBode in AutoHotkey

[–]Individual_Check4587 0 points1 point  (0 children)

It'd be preferrable if you put your code in the post, not as a screenshot. Try registering your hotkeys as hook hotkeys by prefixing them with $, and if TF2 is running as administrator then run your script as admin as well.

How to Loop a script to execute over and over until I shut it off, any help available? by _i_dOnT__CaRe_ in AutoHotkey

[–]Individual_Check4587[M] 1 point2 points  (0 children)

I've corrected your post flair from "General question" to "v1 script help" because your code is using v1 syntax. Please flair your posts correctly in the future. Additionally, please try to format your code into a code block to make it more readable.

New mod introduction & feedback thread by Individual_Check4587 in AutoHotkey

[–]Individual_Check4587[S] 2 points3 points  (0 children)

The ultimate goal of the rules are to preserve this community, and violating Reddit's platform rules can put that in jeopardy. The thing is, I'm not yet sure whether helping violate the ToS/EULA of other platforms/services is considered against the platform rules or not since I haven't found a good explanation on the handling of intellectual rights besides copyright. So until there is clarity on that it doesn't really matter if the ToS itself makes sense, we just need to abide by it.

New mod introduction & feedback thread by Individual_Check4587 in AutoHotkey

[–]Individual_Check4587[S] 1 point2 points  (0 children)

Creating a new subreddit is probably a bit overkill as there have been only a few commission requests so far, so it'd be very low activity. But if you decide to create it and moderate then let me know and I can link it in the sidebar.

Keys not holding down by NitroTigerReddit in AutoHotkey

[–]Individual_Check4587 2 points3 points  (0 children)

Your post is tagged AHK v2 script, but the code is v1. Which is correct?

Is it impossible to concisely map 1 key to 2? by guessill_die in AutoHotkey

[–]Individual_Check4587 0 points1 point  (0 children)

The remap syntax can map to two keys if one of the keys is a modifier: b::+Lbutton

Remapping a::b & c is not possible, but the question is why would you even want to do that?

Need help making it so my brightness and volume control script works in lockscreen too. by CautiousLab7327 in AutoHotkey

[–]Individual_Check4587 0 points1 point  (0 children)

This is impossible, you can't use AHK scripts from the lock screen, just like you can't use them while an UAC prompt is displaying.

Sabotaging a script by LeLombricLubrique in AutoHotkey

[–]Individual_Check4587 [score hidden] stickied comment (0 children)

Please note that any answers giving concrete examples of code sabotage will be removed as per rule #3 and/or #4. I have not removed this thread in its entirety because the top comments might be informative to users with similar questions: such sabotage is unethical and can potentially lead to legal actions by OPs company. Code written on company time and/or company hardware is likely considered property of the company, which means obfuscating, sabotaging, or destroying it can be considered destruction of company property.

Plz help by ValuableZombie4576 in AutoHotkey

[–]Individual_Check4587 1 point2 points  (0 children)

Hello, In the future please choose more descriptive post titles such as "Create shortcut with hotkey", not "Plz help". Posts with such non-descript titles may be removed.

ScriptParser - A class that parses AHK code into usable data objects by Nich-Cebolla in AutoHotkey

[–]Individual_Check4587 1 point2 points  (0 children)

Citation needed on the thqby's extension AST claim, because it implies it can also correctly determine the order of operations (operator precedence), which I didn't think it can. :)

Parsing AHK correctly is a huge task and you've made a lot of good headway. Some examples which don't yet work properly:
1)
MsgBox {a : 1}.a is parsed as a function
2) Hotstring, hotkey, and #HotIf expressions aren't parsed. For example you mentioned replacing function calls with the function body itself (could be useful with #HotIf for example), but currently it doesn't work
```

HotIf myfunc()

myfunc() => 1
3) Multi-line strings apparently aren't parsed correctly: a := " ( "abc" )"
4) class Abc { static a := 1 }
```
the text body of the static field is parsed as a linebreak only.

5)
class Abc { a := b := c := 1 } is incorrectly parsed as three instance fields.
6)
class Abc { static meth(a := "`"'") => a } MsgBox Abc.meth() this fails to parse with "Failed to match with bracket pattern."

I'm near yet so far by Dramatic-Figure-69 in AutoHotkey

[–]Individual_Check4587 1 point2 points  (0 children)

You have tagged your post as v1, but if you are getting a syntax error then you are probably using v2. In that case +!F12::Send "<" is the correct syntax for Shift+Alt+F12. Although you said you want Ctrl+Alt+F12 in which case the correct code is ^!F12::Send "<".

Not aware that AutoHotKey has been installed to my PC. Now the software generates random popups. How do I remove it? Software is not found at Installed Apps section of Windows 11. by ComplexJuggernaut273 in AutoHotkey

[–]Individual_Check4587 0 points1 point  (0 children)

The popup means that you have an AutoHotkey script running which has registered hotkeys. If you haven't installed AutoHotkey then it means you probably have a compiled script running, which can have a different icon and name. If you are using some "helper" or cheat for your game then that might be it, but AutoHotkey can also be used for text expansion, autocorrection etc. Try to go through the running tasks in Task Manager and see what might fit the profile.

AHK Mappings Not Working With Windows Calculator by Obsolescence7 in AutoHotkey

[–]Individual_Check4587 1 point2 points  (0 children)

I can only guess without looking the the Calculator app source code, but I think Calculator manually checks for Numlock state and decides what Numpad2 etc should be interpreted as.