ewerybody / a2.modules Goto Github PK
View Code? Open in Web Editor NEWThe standard a2 Autohotkey script collection
License: GNU General Public License v3.0
The standard a2 Autohotkey script collection
License: GNU General Public License v3.0
Whenever i use the calculator, i need to switch between some programs and the ONE calculator window...
ctrl-tab works, but needs a number of presses, if i had more than one window active since last using the calc...
To open more than one calc, i would add ctrl-N for as a hotkey while the calculator is active.
Maybe could also be part of Calculaid?
So just today the undocumented google translate api reported about unusual high traffic from my account... Later it worked again! But well this is kinda shitty. We might wanna make it possible to use other translation APIs too.
Maybe there is something here: https://stackoverflow.com/a/32455253/469322
The new Cancel thing is nice but there seems to be more than 1 separators appearing? Investigate plz.
When pasting things from the clipboard there should be some more options for the name.
follow up for #34
The Scope editor conveniently allows to set up multiple scopes to in or exclude but when saving these to a Hotstrings scope only the first of these will remain.
Thats due to the nature of the whole setup: the dictionary to hold scoped hotstrings uses the scope definition as a key! Which can not be a list! This will be solved with a completely overhaul of the data structure. I already lined it out in the docstring but for reference here: This will be the new layout:
{
'last_group': '', # UI setting to remember the last selected group
'last_hotstring': '', # to remember the last selected hotstring in that group
'groups': { # dictionary of all the hotstring groups
'global': { # the main group will be "global" but it could be renamed, why not? I'd restrict scoping it tho with this name.
'enabled': True, # groups can be turned on or off in the future!
'hotstrings': { # dictionary of all the hotstrings under this group
'shortcut1': { # a key is the shortcut string
'text': some_string, # text is the replacement
'ignore' True,
'mode': ...
'...':
'some name': {
'scopes': [], # now actually a list!
'scope_type': 'scope_incl' # global groups won't have a `scope type`
...
"ReadingRuler " is one of ac'tivAids requested extensions to be ported to a2.
more info needed.
Oh well. There is something broken!
This will almost never appear when you have lots of entries.
But I just tried having 1... boom.
Also ... pls rename this thing!
My favourites are still missing ;-)
RecentDirs
ReadingRuler
FileRenamer
And, how much work is it to translate these, or rather modules in general from ac'tivaid?
I guess it depends... but maybe more can be said about that?
In ActivAid, the plugin "CommandLine" enables the user to run a command in the shell from the address bar of the explorer.exe
The a2 "CommandLine" enables the user to use key combinations that Windows does not allow in the shell
So people can come up with their own list of files and default texts within.
Currently the translations are hardcoded en > de
💩
We can actually have any number of from > to language combinations.
Make that possible with a lister widget 👍
The CalculAid docs are tbd :|
While at it: Write down how we try to find the Calculator-windows at ALL! (Darn You MS!!)
To hide something in the Explorer: there is Alt + Enter, Down (folder) or Right (for a file), Space, Enter and for another Dialog on folders: Up, Enter.
Would be nice to have this on a Hotkety to toggle selected items.
Just Ctrl+Shift+H bam!
@Cyberkabauter contributed some ideas in a2#250 and has some code already to improve ComfortResize:
I adapted a script from the ahk forum to my needs. You may want to integrate some ideas of that:
I postet: my version of the script here. (search for "Modification Cyberklabauter"). The mentioned improvements are added to the script by myself, feel free to use it.
Well the current implementation covers most from the original ac'tivAid version. But I totally miss the maximized window resize as well! That's really a good one to fix! 👍
I never thought about having the cursor jump to the corners. That's the idea, right? (haven't seen the code yet)
Sounds a little weird to me as I'd rather keep control of my cursor and OH: also sometimes work with a tablet in screen mode! So that wouldn't work there. But I'd totally need to see it in action and it's a valid option anyway :)👍
Resizing active window when cursor is outside would of course disable moving inactive windows which I really like. But it's also a good option! 👍
@Cyberkabauter contributed an idea in a2#250:
It would be great, if I could define the fileformat of the textfile (UTF8 and so on)
Yes! Good idea! I wonder if that acually works if there is no content given yet but it all comes down to the capabilities we get from Autohotkeys FileEncoding
You'd want to have the settings only applied to a certain type of screen setup, right?
So we need a combobox to select the setup via virtual desktop size you want to edit.
There is already GetVirtualScreenCoordinates()
in ahklib/functions/
. We'll use that as an identifyer.
this one will be prefixed to the data thats analysed by the restore function. Where there is currently:
[["procname.exe", "classname"...], ['procname2.exe', ...], ...]
it will be:
{
"4520, 1920": [["procname.exe", "classname"...], ['procname2.exe', ...], ...],
"1920, 1080": [[...], ...]
}
Sometimes when I want to paste a thing it takes a moment for AHK to perform the paste.
Is it because its loading up Clipboard access? If so: Show some nfo about that.
@Cyberklabauter reported some issues on a2#250:
Somehow doesn’t work properly. After first entry I still got the message “There is nothing to popup! Apparently there was no data added yet?” Than it started working. after I checked the box “finished after first selected item”. Pasting the item still fails (I getting an empty popup-menu with “cancel” entry only). Keys and values are not saved. After a while my test entries where gone again.
This module is kinda new. Had some revisions yet but I guess initilizing is rather badly covered?
Surely we need some testing starting off with NO data yet.
Eventually this should have some defaults for the user to play around and overwrite/delete then.
"FileRenamer" is one of ac'tivAids requested extensions to be ported to a2.
more info needed.
Follow-up of #24
Instead of the scrope string as the "title" of a scoped group in Hotstrings one could have "any" kind of groups there. Stuff that gets imported should end up in a new group so one can sort it out more easily.
One could have named groups for their abreviations and one for emojis or .... ¯\_(ツ)_/¯ exactly!
On top of that should be the scoping.
...
There is already quite some code regarding this and the process is kinda nailed down. But first:
What am I trying to solve: Windows 10 is constantly shifting around my meticulously arranged windows and desktop icons when I log back in or have been connected through VPN.
In SessionRestore you'll be able to collect window descriptions that when match will be rearranged on demand or when you log back in if the screen sizes also match.
Process of rearranging multiple subwindows:
I installed a2 with the installer and it is installed in the ../Appdata/Local.. No errors.
Next step is to add source to use this tool.
Choosing "Add Source - featured - a2.modules " get the error:
The mentioned url is present and I can find a zip file with the packages!? But I have no plan how to handle this as a workaround. Can I copy a SubDirectory of the .zip to the installations folder to work? And in which subfolder?? Does a2 than autodetect this package?
Any help till fixing the bug apreciated.
Thanks for the great work till here. If you like support in documetation, you can contact me.
"RecentDirs" is one of ac'tivAids requested extensions to be ported to a2.
more info needed.
Put it to the Module menu then: ewerybody/a2#173
Maybe this can be done with Enter key?
I just learned that there is a builtin OCR solution in Windows that AutoHotkey can easily make use of.
https://www.autohotkey.com/boards/viewtopic.php?f=6&t=72674
Lets dig into it and make an a2 module out of it :D
image := a2capture(300, 200, 87, 3)
and Voilà you have the image data in the variable.Sometimes you just want a single element pasted. Voilà.
Make a check to a category so after first paste its good.
this should goto line 42:
; entry_name might be a simple number! Make sure this is a string pointing into the object:
value := details_popup_data[_details_popup_menu_name]["" entry_name ""]
@Cyberkabauter contributed a couple gtranslate issues in a2#250:
In MS Word: Selecting the translated entry doesn’t replace the hightlighted source text. Sometime it pastes my clipboard content instead, whatever content it is. In Google Chrome it worked as expected.
Oh dang! Yeah pasting things via clipboard was already a constant issue in early ac'tivAid times ☹ I have yet another mitigation in dev yet unreleased. We could have apps acting up like these blacklisted to fallback to Send
contents or maybe do send things rather by default as the issue turns up over again. (I had this on the DetailsPopup too). Well texts with gtranslate won't ever be thaaat big. So sending should be fine. You know some apps hog in on input and Send might take quite a while "typing" the text for you thats why pasting is so attractive: It offers instant results always right away. But yeah: going through clipboard can be bad and Send often is quick enough. So be it! 👍
Another idea would be, to make use of the text to voice function of the translate.googleapis com. Have a look at this script, which I adapted from teadrinkers in which I have the funtionalty included and gives you an idea how I would like to have it added.
Oh I didn't know abouvt this! Nice! So we'd have another option in the menu which plays back the sound of the translation! Nice 👍 looking forward to that1!
Sometime looking for a german word (auto -> en) results in the same german word (e.g. “Haus” or “egal”). I know that teadrinkers translate skript will return the same word back, if the search did not find something. But an error message may would the better approach.
hehe yeah! I think I could have some more info from the returned metadata displayed to show what it actually got. Turns out: Haus is autodetected as english! eehhh it's the plural of hau 🤷♀️ . For "egal" if get "no matter" back.
But yeah: lets have some feedback on same words returned! 👍
ExplorerHotkeys is missing some super easy features from the ac'tivAid version.
The code is already in the script. This needs to be done after #15 so when the combobox is there: add a checkbox to tell to save the icons.
There should be some default file types to create.
Also IF the user actually deleted all there needs to be a warning popup or something.
Maybe directing to the module so things could be added?
I didn't know that this can happen ... but yeah understandable. This needs to be trimmed and when clicked copied with the complete data!
Menu item name too long.
---> 028: Menu,wInfoMenu,Add,commandline: %cmd_line%,getWinfoMenuHandler
Usually pasting via clipboard would be the way to go but sometimes Autohotkey has to wait for the Clipboard to be accessible...
This is often frustrating as it seems that a2 is the problem here.. Thats why we already have this message here!
Have an option to make use of Send, ...
rather than clipboard_paste
. This should probably be default...
While at it: Maybe look into AHK and see if there is a general issue about this. I suppose waiting for the Windows Clipboard is something that even AHK cannot do anything about? And its a Windows issue? 🤔
what else?
Add "import" and "export" buttons to the UI in order for the user to be able to save his list.
Currently I think you can just hit Enter and the default name will write to the same file even if it already exists!! 🤯
In this case the dialog should offer an already incremented name!
Just like with the images.
It says path exists but then goes to My Computer
pls investigate.
I constantly get a wrong mouse cursor and always have to
cur
, Enterhere is some input:
https://autohotkey.com/board/topic/32608-changing-the-system-cursor
AFAIK, Windows 10 now allows the user to use Ctrl+V in the cmd.exe prompt.
The current behavior of the module should be tested in this regard. And if so, the script should not bind the keys if WinVer >= Win10.
Needs to be done...
I just tried to remove the title of a scoped group in the Hostrings module:
It stays right there. No can do :(
So from the a2 task ewerybody/a2#133
I created a new module gtranslate
The needed ahklibs have been added to the libs include. But still doesn't seem to work ... 💩
When I do https://translate.googleapis.com/translate_a/single?client=gtx&sl=en&tl=de&dt=t&q=response
by hand I get back [[["Antwort","response",,,2]],,"en"]
tho.
Currently this is Clipboard Image.png
could be more flexible I guess :)
While dabbing around with the GDI lib I thought about what would be really cool:
This could also be done with text files? Whenever there are no file ids in the clipboard and one does Ctrl + V in Explorer. What else? 🤔
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.