🌉 bridged from @MonkCanatella@sh.itjust.works by Tidepool
MonkCanatella
@monkcanatella.sh.itjust.works.ap.tdpl.io
for the time being, we are consolidating to !ahk@programmer.dev. This may change in the future
!ahk@programmer.dev https://programming.dev/c/ahk
Capacities is now fully offline capable! A short comparison between capacities, anytype, obsidian and logseq
I've liked Capacities a lot but never used it as my main PKMS because it was online only and didn't have a mobile app. They've been on a roll recently, adding a very polished mobile app, and now the latest update has added offline mode. I've tested on my cell phone by closing the app, turning off all radios, and opening again. It works like a charm! I then edited a note, closed the app, turned on my data and opened the app again and it handled it just as expected. very impressive! The mobile app needs some love though it is still pretty new. I would say Capacities and Anytype have similar app experiences, with Logseq and Obsidian being somewhat less refined. The syncing is also very fast - capacities takes about 4-5 seconds, while obsidian (with obsidian livesync and a selfhosted couchdb) takes 3-4, and anytype being just a touch faster usually being around 3 seconds to sync. Logseq gets a dishonorable mention here, often taking over 15 seconds to sync, and often requiring opening and closing the app the sync. between anytype, obsidian, and capacities, startup time is pretty good. logseq takes a dogs age to start up and then finish syncing. This could be because I have a larger graph with logseq, but I would say it's small-medium if anything. Capacities also has editable transclusion which is a prerequisite for me to check out a PKMS. it allows you to embed a note within another note and edit right there. Logseq has it built in but the implementation is very very clunky, especially on mobile. It takes up a lot of extra space. Obsidian doesn't have it out of the box, but the Make.md community plugin is unbelievably good! It's one of my favorite implementations of transclusion, and it works on mobile. I especially like that any link can be expanded to view its full content, just by clicking an arrow to the right of the link. you can also make full embeds as well. Capacities has really nice implementation of transclusion as well with one major caveat. embeds are not viewable on the mobile app! I probably will wait to switch over until this is addressed. Transclusion is unfortunately not supported on anytype at this time. This adds another polished app that fits 4 of my primary criteria for a PKMS: cross-platform, offline capable (full read and write), fast syncing under 30 seconds, and editable transclusion.
Clara Schumann - 3 Romances for piano Op. 11 (audio + sheet music)
youtube.com
www.youtube.com
Joachim Raff - String Quartet No. 3, Op.136 (1866)
youtube.com
Sharing another fantastic composition by Joachim Raff. Bartje Bartmans has been uploading his entire string quartets, and I believe there's quite a bit more music by him on the channel.
I absolutely loved this right from the start. The texture and polyphony is just intoxicating right off the bat. Raff is highly underrated considering ingenuity of his works
www.youtube.com
Josef Suk - Serenade for Strings Op. 6 (1892)
youtube.com
I've just discovered this work and it's immediately a favorite. I'm not really even that into string music.
www.youtube.com
Zemlinsky - String Quartet No. 1
youtu.be
I just love the part starting at around 30 seconds where the strings kinda sound like they're whispering some sort of secret phrase. it's magical
youtu.be
Cloud Kingdom Guadalajara (OC)
youtube.com
I've been making timelapses in Guadalajara for a couple years now. Glad to have a space to share them!
www.youtube.com
OrgPad is an excellent mix of mindmap and pkms. It even has transclusion support. You can put an entire mindmap inside of a node within a mindmap 🤯
Today I discovered a tool called OrgPad which has a lot of potential. Unlike all the major players in the mindmap space right now, each node isn't just a heading, but an actual piece of content, with a title. Each node can be expanded or collapsed so you can focus on what you want to while maintaining context.
It's also got an amazing interface that's incredibly polished.
I've also just discovered TheBrain, which is also a delightful mindmap tool, but the cost is prohibitive at around $20/month just to sync across devices, the interface isn't as slick as mindmeister or xmind, in fact it looks ancient. But it's very powerful and feels really good to use. It also has the benefit of making notes a first class object instead of a tiny icon on a node which the more popular mindmaps do. But the win goes to org mode for being superior in most ways, at a fraction of the cost.
orgpad.com
In depth Blocky setup guide
youtube.com
I just finished using this guide to get Blocky set up. Part 2 shows how to set up the grafana dashboard. I was inspired to set up blocky instead of the other more popular alternatives due to his other video showing that blocky has the best latency of all blocky vs pihole vs adguard
www.youtube.com
Alexander Scriabin - Piano Sonata (1889) {Roberto Szidon}
youtube.com
Scriabin can be kind of hit or miss with me. Some of his works I find utterly sublime. This is one of those that I've only just heard that immediately struck me as sublime. enjoy!
www.youtube.com
Trying to install blendos alongside other linux installs. Doesn't show up in boot menu
This is on a uefi system. I do manual partitioning and select fat32 drive with 1g for Boot and a 100gb brtfs partition for System.
I have Fedora, Endeavour and PopOS installed on the same drive in different partitions and they all show up in the boot menu and boot just fine. Blendos doesn't show up. I've reinstalled several times and nothing.
I wrote a script to sync Readwise to Raindrop
Check the comment of the gist for instructions on how to use. You can set this up to run every few minutes, keeping your readwise items, highlights, and annotations synced with Raindrop! I didn't see anything that accomplished this, even with the multitude of paid automation solutions. I was tempted to sign up for a free one when I realized they were all very flawed, so I just wrote one up for free!
Hope you enjoy! Suggestions and contributions more than welcome :)
gist.github.com
The best PKMS for projects, my review
• The 3 I'm considering have 2 things in common: • They're open source • They're offline first. Meaning you'll never lose access to read or edit your notes if you find yourself without internet, in a tunnel, elevator, airplane, etc. This excludes notion and the like from this list • They are Anytype, Logseq, and SiYuan ( a less known but still incredible PKMS) • please note these pros and cons are only in relation to using as a method of brainstorming and working on projects. • FYI: Logseq is my current PKMS of choice and i've settled on it though if Anytype ever gets trasnclusion support I'll have to go back and see. Also to note: Anytype is currently free, the rest will cost you if you want to utilize syncing across devices
• Anytype
• Pros
• beautiful, slick interface • creating types allows for projects to have a more first class feeling. • A project can be a type with multiple templates • a feature can be a type with multiple templates • sets allow for displaying alist of projects based on what type of tepmlates, same for any type (anytype, get it?) • excellent layout and customizability
• Cons
• Major con no Transclusion. I HOPE they introduce it. my discussion on github is the highest after the docker container ask and the stuf the staff prepopulated. Looks like one of the maintainers noticed it.
• Mobile experience
• by far the most robust and fuck up proof mobile solution. It handled anything I threw at it and it syncs practically immediately
• Collaboration
• I believe this is one of their primary focuses at the moment
• Examples
• List of projects. Note these can be any scale - a small script, an extension to a browser, an entire program suite or OS, a physical product. Choose your own way of organizing and anytype should be able to accommodate • image • Example project main page: Note that I'd prefer to use transclusion here instead of the card previews but anytype doesn't have transclusion support. at first I wrote off the emoji/background, but it's so easy to do (only a couple of clicks) that I did it on a whim and realized I actually love it, and not only that, that little bit of imagery makes it's at least 1 million times easier to quickly identify what page you're on and bring some immediate context to the forefront of your mind. It's a little thing that makes a surprisingly big difference. Anytype uses upsplash images and you just type in what you're looking for (for this example I typed in books), and you'll find a great selection of high quality banners for your pages. • also note the organization here. You can have page links (here in cards with previews) as many across as you like and it's easy to arrange them that way. • image
• Logseq
• this is infinite outliner first. collect and connect knowledge. Etc. For projects, it's not as robust as anytype, and while it has transclusion, it doesn't add a lot to a project page • This would be better for doing some very quick notes at the genesis of a project. I guess that counts as brainstorming. That said I don't feel as organized and secure as I do working on projects in anytype
• Pros
• great for really quick brain dumping (though that's no different than anything else on this list). • Transclusion support. though not as beautiful as SiYuan's, it adds about 3 indentations before beginning the actual transcluded content, something they say they're going to address at some point.
• Cons
• Interface was designed by engineers and it shows. • Feels easy to wreck things • has some bugs to work out • mobile experience is mostly lackluster and seems to be low priority
• Mobile Experience
• mobile is like, mostly unusable for me currently due to a bug where the text your typing scrolls down below your keyboard. so yeah you're typing blind. hope they figure that out soon as it's a breaking bug. Syncing is fairly slow - you can expect to see changes propagate between 10-15 seconds. sometimes a device will say it's fully synced when it's not, and if you don't notice that's not good. best to restart and make it goes through the full sync
• Collaboration
• on the radar though not currently in the works. I believe it will come some day and that there are some workarounds but nothing built in
• Examples
• project list • image • example project • image •
• SiYuan
• Pros
• Beautiful editor and transclusion implementation • fastest PKMS that exists by a mile • can have several notes open in tabs, and it's by far the best implementation of this concept I've seen in any PKMS • nice visual customization in line with notion or anytype.
• Cons
• no sets/collections/queries. There's no project page unless you build it and update it yourself I take this back, I forgot that SiYuan actually has SQL queries! It's actually VERY robust. You can for example, run a widget that queries all your projects and embeds information from them. It's extremely powerful and belongs in the PROs section but I will keep it here
• Mobile Experience
• Mobile device is probably about equal with logseq. Nothing spectacular, nothing too extremely buggy but it just feels like you're a bull in a chinashop with this. Like you have to be very careful not to break things. Still, from what I've seen, it doesn't have the same litany of bugs logseq has
• Collaboration
• No idea where they're at with this. I don't believe it's a priority.
• Examples
• This is just their tutorial landing page, but you can get an idea of the layouts and customization possible. It just looks gorgeous and it's the fastest PKMS I've used. • image
• Ending thoughts:
• Mobile: Anytype wins
• without a doubt the best mobile experience. more polished and robust. You don't feel like a bull in a chinashop like you do in logseq or even siyuan to a degree. That said, logseq still wins in one very small but very important department, and that's swiping to adjust indentation. may seem small but if indentation is buried behind several menus, it's just painful when your'e in the middle of jotting down some important notes. That said logseq mobile is broken (at least for me)
• Collaboration: no one wins, though anytype is focusing on this
• Most likely will have to choose another program, probably something that isn't offline first. For this there are a million great options
• Best overall: Anytype.
• Being able to create a type is awesome. Then having multiple templates off that type, and "collections/sets" to allow organizing lists of those projects with fairly strong filters and sorting is great. This ability, while exists on logseq, requires knowledge of some programming languages. I think called datalog. In SiYuan I don't believe it's possible. One quick sidenote about SiYuan though, it's a fantastic app and the developers/maintainers work at a blinding pace. One time I made a comment about the line spacing on their english forum, liuyun.io, and the developer answered within a few minutes stating that it was already fixed and in the upcoming version. Anything said about SiYuan is liable to change at a moment's notice (but in a good way!)
• Best for early/initial braindump: Logseq
• With its infinite outliner, logseq is fantastic for braindumping quick and dirty prototypes to be fleshed out more fully in another PKMS. I definitely don't think Logseq is the best for projects, but it's definitely not worthlesss
• Best price: Anytype (for now). Anytype is free.
• It will be free forever if you decide to selfhost. They will almost certainly add paid plan to use their synving infrastructure (which they implemented brand new for the work they're going to do on collaboration soon)
• Privacy: Logseq, Anytype.
• Both can avoid the company's servers completely if you set it up that way. Anytype will required self hosting which for now is not very good because to use the mobile ios app selfhosted, you need to compile through xcode and sideload it onto your device...yeah that's a blocker. Logseq is possible to avoid completely their servers, but it's a worse experience. it's hard to set up. And I believe that their syncing is locked to allow them to eventually offer a premium plan. Anytype's syncing mechanism is up on their github right now.
Anytype has open sourced all their repos! Self hosting now possible!
cross-posted from: https://sh.itjust.works/post/1386745
Anytype has finally followed through on their promise and open sourced their repositories. Self hosting is now possible though there is no docker container available. This is a major step forward for all PKMS and I wholeheartedly congratulate them. btw Anytype is free, even their included sync service, which is the best of any offline-first style PKMS I have experienced. Anytype is top 3 PKMS for me, followed by Logseq and SiYuan. They're in good company and now it's only going to improve! Resources: Self hosting documentation Contributor discussions
github.com
SiYuan - Privacy-first Offline-first personal knowledge management system that supports Markdown, block-level ref, and bidirectional links, and transclusion
I've just tried this out and it's a really fantastic experience. Development is happening at a rapid pace, and it's open source with 11k+ stars on github. For example, one month ago, they didn't have a ios app. Now they have offerings for every platform imagineable. The app is robust as well. Allows transclusions but editing a transclusion pops up a window that's annoying, but the transclusions themselves look absolutely fantastic. In general this is what I wish using logseq felt like. It does tick the 4 most important boxes for me: 1. Transclusion 2. Offline first 3. platform agnostic: ios, macos, windows, android, linux, docker, webview 4. Open Source Additional goodies: Looks like it'll have a plugin ecosystem. Logseq and obsidian benefit greatly from this. I have 30 plugins running on my logseq instance and it pushes the experience just that much higher. I have not explored the siyuan ecosystem, i don't even know if plugins yet exist, but I'm certain they'll have some excellent plugins in the future. I'm not sure about cost but they currently sell lifetime subscriptions for ~$150. Not bad IMO but it's too often that these things shutter or become abandonware so buy with caution. Not sure what the cost of the monthly subscription is, but for reference, I pay$5/mo for logseq sync and it's good but not great and still a work in progress. I love this quote from the creator's github page: (originally chinese) "My wife Vanessa and I have been writing open source software since 2009, of which we have been maintaining the Solo project for 10 years now. Our creative field revolves around blogging and community systems, and we've been working hard on the B3log idea - a distributed community network. At the beginning of 2018, Vanessa and I resigned from the company and officially started our entrepreneurial career as a "full-time open source and freelancer". We built a company whose main product is the Sym community system. Its community edition is completely open source, and individuals can use it for free based on its open source license. In addition, we also operate a community chain drop with more than 50,000 users as the community end node of the B3log distributed community network. Recently we launched a new project, Siyuan Notes, which is a local offline-first personal knowledge management system that supports fine-grained block-level references and Markdown WYSIWYG. Welcome everyone to try and give feedback. For me and Vanessa, open source has become more than just a hobby, it is a way of life, and we are very confident in the future of this "open source living" path. Hopefully along the way we can help others with open source software, and others can help us. Open source connects you and me, open source builds the future, let us enter the open source world together! "
b3log.org
An absolute masterpiece from Mamedyarov: Mamedyarov vs Rapport
youtube.com
It's in this position that things start to get really tense, with Rapport thinking he can sac the knight in exchange for some checks on Shakh's king. that's just not the case. Shakh takes the knight and evades the checks, then Rapport completely loses by attacking Shakh's queen with his bishop. Completely ignoring this like a boss, Shakh play rxh2, sacking the rook, leaving the queen hanging, and forcing checkmate in 10. One of the most brutal and beautiful things I have ever seen on the board.
www.youtube.com
Extremely detailed guide to everything Auto Hot Key
Taken from reddit #Welcome to the AutoHotkey Community! Hopefully, you're here with questions on how to learn this fantastic scripting language. There are plenty of knowledgeable folks here that can help you out. Update 2016-10-01 I took an opportunity to do a bunch of updating. I've expanded the text editor section to include multiple options, as well as another GUI creator and multiple other addons/plugins. I also pre-packed Notepad++ and Sublime to be compatible with AHK. I've also added a section about formatting code when submitting to Reddit. A lot of people skip the instructions right before submission so hopefully they'll see it here instead.
------------------------------------------------ | Make sure that you read through all of this. | ------------------------------------------------
——— #Thanking People [Serious]: ##(I actually felt this needed to be moved to the top as it's constantly ignored) People, please be respectful of each other and thankful for help received. This is a community based on free help that is paid for with sacrificed free time. If someone takes the time to help you out with your problem, take 5 seconds to acknowledge it. Typing thank you and clicking an up vote costs you a few insignificant seconds and it means a lot to someone who spent their free time coming up with a solution to your problem. Respect In the event that you want to thank someone past that (maybe they went above and beyond in helping you, or got you out of a pinch, or helped you look good in front of your boss, etc.), you can always gift them some Reddit gold. ——— #HELP with a Script vs MAKE Me a Script: If you're here to learn and you're providing your own attempt at the code, the people here will be much more inclined to help. Alternately, if you come here with absolutely no intent of learning how to write scripts and you make posts begging for others to write the code for you, don't be surprised when people aren't as accommodating. Remember, you're asking people to sacrifice their free time to make a script for you.
"Give a man a fish and he eats for a day. Teach a man to fish and he eats for life."
The majority of people that help out on this subreddit are here to teach people how to fish, not to fish for them. If you do want to request someone make a script for you, keep in mind that the simpler the script, the more likely someone will do it. ——— #How to ask a question: Be clear about your request. The more detail, the better. • What key(s) do you want to use? • What EXACTLY do you want this script to do? From start to finish. • Are there any timing issues to take into account? • Is there something specific that you don't want to have happen? • Do you only want it to happen in a specific program? It's easier for us to help you if we fully understand what you're talking about. Here is a good example and a bad example of how to describe something: Bad Example: "I'm trying to make a script where I press a button, it sends a code to my game, and then a short while later it sends another thing". No idea what you want. Vagueness is a horrible thing. Good Example: "I'm trying to make a script for a game called Street Fighter. I want to press the A button on my keyboard and have it send Down, Down+Right, Right, And Numpad4. This activates a special move in the game. There needs to be about 50 milliseconds between each key press. Then after it sends that I want it to press and hold down Numpad9 until I let go of 'a'." ——— #Formatting code when submitting: When submitting code, you need to format it so it displays correctly. Formatting makes your text display in monospace font and treats all text as text only. Special characters and special formatting get disabled. To format a block of code, make sure you have an empty line, paste your code, and put 4 spaces (or a tab) at the beginning of each line. Code with 4 spaces before it
Code with 4 spaces before it
Faster ways of doing many lines: • Most text editors will let you highlight your text and press tab. This will put a tab indent in front of everything. • If you have Reddit Enhancement Suite, highlight your code and press the
<>code button. • If you're using New Reddit (not my thing but no judgments) there's a similar code button that looks like a box with a T. If you don't see it, check under the...option. To do inline code formatting (small, single line snippets of code), especially inside text, put the code between grave accents`. This: One `two` three Becomes: Onetwothree Do not try to do multiple lines of code with grave accents. Do not use single quotes'. Neither work. ——— #Useful Editors, GUI Creators, Plugins, etc... What's the best editor to write AHK in? There is no correct answer to this. Many people who try SciTE4AutoHotkey think it's one of the best AHK editors out there. Others try it and dislike it. I've updated this list to have a robust selection of editors that will work with AHK. ——— ##SciTE4AutoHotkey [Download] Preview Features: • Syntax highlighting • Code folding • Calltips (also known as IntelliSense) • AutoComplete • AutoIndent • AutoHotkey help integration • Abbreviations • Debugging support • Tools for AutoHotkey scripting • A toolbar that enables easy access to the tools • Includes a GUI Creator and Message Box Creator This is the editor I use for all my AHK coding. SciTE4AutoHotkey Main Page SciTE4AutoHotkey GitHub Repository SciTE4AutoHotkey Mirror - v3.0.06.01 - Use this if Chrome is giving you problems getting to the Main Page. ##Bonus: Link to my personal "Style Settings" Preview It's a dark theme with colorful syntax. Predominantly green and white on a black background. It's based on the "HatOfGod" theme created by budRich. Included is a syntax preview file so you can see how the coloring looks (same one in the preview above). It should be noted I've also commented out a lot of the style settings so you can go in and modify it to your own likings. ——— ##AHK Studio (Suggested by gymcap) [Download] Preview Features • Run scripts from the File/Run or File/Run x64 (for those who use the 32 bit install). • Easy customization of themes Edit/Theme with a few that have been created by users. I will gladly add any themes that are submitted to me. • Automatic help text for most commands (eg MsgBox, Control, SplashText...etc). • Code Vault for adding code snippets to the program. • Version Tracker with Github upload. • Gist post your scripts. • Split up projects into Segments to keep things neat under File/New Segment. (makes an include file) • Special functions (Move Selected Lines Down, Create Comment Block, Character Count...etc) • Msgbox Creator for easily creating more complex msgboxs. • Personal Variable List: You can add anything to this list and it will come up with the list of other commands as you type them. • Custom Highlight List: You can add anything to this list as well and it will change the color that it appears in the program. • Customize every action with a hotkey, many of them are already assigned but they can be changed under Edit/Settings. • FTP integration. • Auto Close: by default when typing, it will add the closing symbol to the following: < ' [ { ( making them into <> ' ' [] {} () GitHub Link AHK Forum Post ##Bonus: GUI Creator I'm a huge fan of SciTE4AutoHotkey and SmartGUI (the GUI creator that comes with it), but after using this for a bit, I have to say this creator is on par with, if not superior, to SmartGUI. If you're doing anything with GUI creation, I STRONGLY urge you to try both GUI building tools and find out which one you like more. Hopefully, Maestrith (the awesome creator of this) will merge some of SmartGUI's very useful features into his program, making an inarguable "best AHK GUI creator". ——— ##Notepad++ [Download] Preview with AHK Syntax Highlighting Features: • Syntax Highlighting and Syntax Folding • User Defined Syntax Highlighting and Folding: screenshot 1, screenshot 2, screenshot 3 and screenshot 4 • PCRE (Perl Compatible Regular Expression) Search/Replace • GUI entirely customizable: minimalist, tab with close button, multi-line tab, vertical tab and vertical document list • Document Map • Auto-completion: Word completion, Function completion and Function parameters hint • Multi-Document (Tab interface) • Multi-View • WYSIWYG (Printing) • Zoom in and zoom out • Multi-Language environment supported • Bookmark • Macro recording and playback • Launch with different arguments How to customize Notepad++ I took the liberty of getting the portable version of Notepad++ (v7), and then added AHK syntax highlighting, auto-completion, and many of the other addons mentioned in the "How to customize Notepad++" link above. I've combined it all into: Notepad++ v7 32bit with AHK Support.zip Download, unzip, and run Notepad++. Enjoy. ——— ##Sublime Text [Download] Preview with AHK Support Sublime text is an incredibly powerful text editor. I mean VERY powerful. The only drawback (for myself) is that it doesn't natively support AHK and I haven't found user made support for it that makes me want it more than SciTE. That aside, it IS fantastic and should be on your list of text editors to try (even if it's not for AHK). Features: I'm not trying to be lazy, but I'd STRONGLY recommend opening this page and reading the features posted there as well as watching the multiple gifs they have at the top of the page. They're pretty impressive. If you're not a power user or you're really new to scripting, you may get the full benefit of this editor. https://github.com/ahkscript/SublimeAutoHotkey Again, I've gotten the portable version (v3 build 3126), installed AHK syntax highlighting/autocomplete/etc from the GitHub repository above, and packaged it into an "Unzip and run" file. Sublime Text 3 with AHK support ——— ##Atom [Download] Preview (Cescue's AHK Plug-In) Atom is a free and open-source test/source code editor for Windows (as well as Mac and Linux). Features: • Cross-platform: Works on OS X, Windows, and Linux. • Package manager (Atom Packages): Thousands of plugins that can be searched and installed from inside the program. • Autocompletion: An extensive autocomplete system for (almost) every language out there. • File system browser: The filetree and fuzzy finder make opening projects and files easy. • Multiple panes: Split your workspace into multiple panes to compare and edit code across files. Normally, I'd pre-package this with the AutoHotkey packages. However, Atom has a built-in search and install function that makes doing this easy. Its shown on the welcome screen, or you can do it manually by clicking Settings (Ctrl+Comma) > Install. From there you can search/install the AutoHotkey packages. Note: At the time of me posting this, there were 2 different AHK packages available. When trying to install the first one (written by nshakin), it errored out. The second one (written by cescue) installed without any issue. ——— ##EditPad Pro [Download] This and Sublime are my personal favorite text editors of all time and this is a shameless plug. That being said, when it comes to writing .AHK files, this is probably the weakest choice of all the options provided. Just because it's not strong in AHK doesn't mean it's not strong for other things, especially its search and replace function. Get it and use it for other languages/basic text manipulation, or use it for doing fantastic search and replaces. While custom AHK syntax highlighting has been made for EditPad, it hasn't been maintained or updated in over 4 years. ——— #New Script Template This is a copy of the template I use to make almost all of my scripts. It includes a lot of the same commands you'll see yourself typing into most scripts. Just a time saver. Also, it includes auto-script reloading when saving using Ctrl+S and a quick suspend/quick kill hotkey combo (Ctrl+Esc). Template ——— #Connecting to IRC If you have no IRC client installed and don't want to install one, there's Kiwi IRC. Just fill in a nickname and hit Start. Connection details:Server: chat.freenode.net Port: 6667 (6697 for SSL) Channel: #ahkscript
Check out the official forum thread for more information about IRC clients and discussions. ——— #Common problems/requests: This is a list of very common requests we see. Please make sure you read through here before posting. #If the solution to your question is on this page, your post will be removed. Contents: 1) Creating a Toggle 2) Holding Down a Key / Autofire 3) One Key Activates Two Others 4) Saving Data -To Text File -To .ini File -To .ini Section Inside a Script 5) Starting/Stopping Things (Loops vs SetTimers) 6) Finding Out What Button You're Pressing (JoyPad, Random Keyboard Keys, Surface Pro Stylus, etc...) -Keyboard Hook Method -Script for Detecting Scan Codes -Joypad Button and Axis Detection Script 7) Making Certain Things Only Work in Specified Programs (WindowSpy!) 8) Sending a Keystroke or Mouse Event to an Inactive Window ——— #1) Creating a Toggle If you're looking for a way to toggle things on and off, here's how you make a toggle using a variable.
; While you don't have to declare the toggle, by doing so you know what the initial start value is toggle := 0 return F1:: ; This is where the toggling occurs. You're setting the toggle to the opposite of itself. ; 1 becomes 0. True becomes False. You can use either. toggle := !toggle if (toggle = 0){ ; If the toggle is off (0 or false), do the stuff in here MsgBox, The toggle is turned off. } else{ ; If the toggle is on (1 or true), do the stuff in here MsgBox, The toggle is turned on. } returnVariables If (expression) Boolean Operators ——— #2) Holding Down a Key / Autofire How to make a key "autofire" when a key is held down. Edit: Don't use loops/while-loops for auto-fire. The original method posted here was how I first learned. While it does work, I later learned it can cause problems in a script. Especially when 2 loops try to run at the same time. The more appropriate way of doing this is to use SetTimer. This example shows how to make the 'a' key fire the 'b' key repeatedly.
; The hook $ hotkey modifier prevents a hotkey from firing itself. ; If 'a' is the hotkey, and it sends 'a', it would keep looping $a:: ; Run the label AutoFireA GoSub, AutoFireA return ; Label auto firing AutoFireA: ; Send a key. We're using 'b' Send, b ; Check to see if 'a' is still being held down if GetKeyState("a", "P") ; If yes, set a timer to run this label again. Time is in ms ; Using a negative number fires the timer once instead of repeatedly. SetTimer, AutoFireA, -100 returnHotkey Symbols Gosub Label SetTimer GetKeyState Send ——— #3) One Key Activates Two Others If you want to send multiple keystrokes from 1 key, this is how you do it: Please make sure you read example #2 (above) for explanations of when to use
~and$at the beginning of a hotkey.; When you press "a", the keys "b" and "c" are pushed a:: Send, bc return
Hotkey Send ——— #4) Saving Data ##Option 1 - To a Text File:
; Numpad+ to add 1 to the counter NumpadAdd:: counter++ ; There's no delete line for file append so you have to delete the whole file ; Then re-create it again to update the counter. ; %A_Temp% is a built in variable that points to your profile's temp folder FileDelete, %A_Temp%\counter.txt FileAppend, %counter%, %A_Temp%\counter.txt return ; Numpad- to subtract 1 from the counter NumpadSub:: counter-- FileDelete, %A_Temp%\counter.txt FileAppend, %counter%, %A_Temp%\counter.txt return
FileDelete FileAppend Built-In Variables ——— ##Option 2 - To a .ini File:
; Numpad+ adds 1 to the counter stored in the .ini file. NumpadAdd:: counter++ ; There's no delete line for file append so you have to delete the whole file ; Then recrecreate it again to update the counter. IniWrite, %counter%, %A_Temp%\counter.ini, Counter Section, Counter return ; Numpad- to subtract 1 from the counter stored in the ini file. NumpadSub:: counter-- IniWrite, %counter%, %A_Temp%\counter.ini, Counter Section, Counter return
IniRead IniWrite IniDelete Built-In Variables ——— ##Option 3 - To a .ini section inside the script: Note: This will not work for scripts compiled into executables.
;============================== Start Auto-Execution Section ============================== ; When the script starts, it reads the counter key of the SavedVariables section ; stored in this script. This helps "remember" the value of counter. IniRead, counter, %A_ScriptFullPath%, SavedVariables, counter return ;============================== Main Script ============================== ; Numpad+ adds 1 to the counter stored in the ini section at the end of this script. NumpadAdd:: counter++ ; This will write the current counter to the counter key in the SavedVariables section ; of this script. IniWrite, %counter%, %A_ScriptFullPath%, SavedVariables, counter return ; You can put your ini section inside of a multi-line comment. ; Start with a /* and end with a */ /* This is an ini saved variable section. You can write whatever you want here because AHK sees it as a comment. Anything [insideBrackets] starts a new section. This is what the script looks for when dealing with ini files. [SavedVariables] counter=0 */ ;============================== End Script ==============================
IniRead IniWrite IniDelete Built-In Variables ——— #5) Starting/Stopping Things (Loops vs SetTimers) Loops are great when you know you want something to run infinitely or want it to run a set number of times. But for starting and stopping a script, SetTimer is a much better choice over Loops with breaks. With SetTimer, you can make very easy On/Off hotkeys, and you have control over how often the loop happens. This script makes a message box that says "Hello!" pop up every 20 seconds. F1 starts it. F2 stops it.
; Start timer. It'll run the helloPopUp label every 20 seconds. F1:: SetTimer, helloPopUp, 20000 return ; Stop the popup timer. F2:: SetTimer, helloPopUp, Off return helloPopUp: MsgBox Hello! return
SetTimer Label Here's an example of the same script using a loop with an if-break statement. It works the same, but it's bulky and sometimes the breaks don't quite work like you want them to. That's why I advise people to use SetTimers unless the loop needs to run forever or run a certain amount of times.
F1:: breaker := false Loop { if (breaker = true){ break } Sleep, 20000 MsgBox Hello! } return F2:: breaker := true returnLoop Break ——— #6) Finding Out What Button You're Pressing (JoyPad, Random Keyboard Keys, Surface Pro Stylus, etc...) A lot of times, people need to find out how to use a specific button. It might be on a controller, or it might be some extra mouse button or an extra key on your keyboard. We also see a lot of Surface Pro Stylus questions. So here a couple ways to help you identify what button you're pressing. It should be noted that NOT ALL BUTTONS/KEYS CAN BE DETECTED!!! Remember that. ##Option 1 - Keyboard Hook Method Make this into a script:
#Persistent #InstallKeybdHook #InstallMouseHook
Now double-click on the script icon in your system tray (Or right-click then click "Open"). Click "View" then "Key History and Script Info". You can now press whatever buttons you're trying to identify. Press them a few times, then press F5 to refresh the Key History. I chose to click my left mouse button and then type "autohotkey" You should see something like this:
Window: D:\Scripts\AHK\Del.ahk - AutoHotkey v1.1.23.01 Keybd hook: yes Mouse hook: yes Enabled Timers: 0 of 0 () Interrupted threads: 0 Paused threads: 0 of 0 (0 layers) Modifiers (GetKeyState() now) = Modifiers (Hook's Logical) = Modifiers (Hook's Physical) = Prefix key is down: no NOTE: To disable the key history shown below, add the line "#KeyHistory 0" anywhere in the script. The same method can be used to change the size of the history buffer. For example: #KeyHistory 100 (Default is 40, Max is 500) The oldest are listed first. VK=Virtual Key, SC=Scan Code, Elapsed=Seconds since the previous event. Types: h=Hook Hotkey, s=Suppressed (blocked), i=Ignored because it was generated by an AHK script, a=Artificial, #=Disabled via #IfWinActive/Exist, U=Unicode character (SendInput). VK SC Type Up/Dn Elapsed Key Window ------------------------------------------------------------------------------------------------------------- 01 000 d 1.19 LButton 01 000 u 0.05 LButton 41 01E d 1.50 a 41 01E u 0.11 a 55 016 d 0.16 u 55 016 u 0.08 u 54 014 d 0.11 t 54 014 u 0.13 t 4F 018 d 0.05 o 4F 018 u 0.11 o 48 023 d 0.14 h 48 023 u 0.08 h 4F 018 d 0.09 o 4F 018 u 0.11 o 54 014 d 0.03 t 54 014 u 0.09 t 4B 025 d 0.05 k 4B 025 u 0.08 k 45 012 d 0.06 e 45 012 u 0.02 e 59 015 d 0.09 y 59 015 u 0.09 y 74 03F d 6.22 F5
You can use those VKs (virtual keys) and SCs (scan codes) in a script now. If I wanted my "a" key to make a message box pop up, I can do it with the VK or the SC like this:
vk41:: MsgBox VK Hello! return
sc01E:: MsgBox SC Hello! return
#InstallKeybdHook #InstallMouseHook #Persistent ——— ##Option 2 - Script for Detecting Scan Codes Run this script and a box will pop up on your screen. Press a button and a scan code should show up. This script was written by SKAN from the AutoHotkey Forums. Thanks SKAN!
#Persistent gosub GetScanCode return GetScanCode: SetFormat, Integer, Hex Gui +ToolWindow -SysMenu +AlwaysOnTop Gui, Font, s14 Bold, Arial Gui, Add, Text, w100 h33 vSC 0x201 +Border, {SC000} Gui, Show,, % "// ScanCode //////////" Loop 9 OnMessage( 255+A_Index, "ScanCode" ) ; 0x100 to 0x108 Return ScanCode( wParam, lParam ){ Clipboard := "SC" SubStr((((lParam>>16) & 0xFF)+0xF000),-2) GuiControl,, SC, %Clipboard% } return——— ##Option 3 - Joypad Button and Axis Detection Script
; July 6, 2005: Added auto-detection of joystick number. ; May 8, 2005 : Fixed: JoyAxes is no longer queried as a means of ; detecting whether the joystick is connected. Some joysticks are ; gamepads and don't have even a single axis. ; If you want to unconditionally use a specific joystick number, change ; the following value from 0 to the number of the joystick (1-16). ; A value of 0 causes the joystick number to be auto-detected: JoystickNumber = 0 ; END OF CONFIG SECTION. Do not make changes below this point unless ; you wish to alter the basic functionality of the script. #SingleInstance, Force ; Auto-detect the joystick number if called for: if JoystickNumber <= 0 { Loop 16 ; Query each joystick number to find out which ones exist. { GetKeyState, JoyName, %A_Index%JoyName if JoyName <> { JoystickNumber = %A_Index% break } } if JoystickNumber <= 0 { MsgBox The system does not appear to have any joysticks. ExitApp } } #SingleInstance SetFormat, float, 03 ; Omit decimal point from axis position percentages. GetKeyState, joy_buttons, %JoystickNumber%JoyButtons GetKeyState, joy_name, %JoystickNumber%JoyName GetKeyState, joy_info, %JoystickNumber%JoyInfo Loop { buttons_down = Loop, %joy_buttons% { GetKeyState, joy%a_index%, %JoystickNumber%joy%a_index% if joy%a_index% = D buttons_down = %buttons_down%%a_space%%a_index% } GetKeyState, joyx, %JoystickNumber%JoyX axis_info = X%joyx% GetKeyState, joyy, %JoystickNumber%JoyY axis_info = %axis_info%%a_space%%a_space%Y%joyy% IfInString, joy_info, Z { GetKeyState, joyz, %JoystickNumber%JoyZ axis_info = %axis_info%%a_space%%a_space%Z%joyz% } IfInString, joy_info, R { GetKeyState, joyr, %JoystickNumber%JoyR axis_info = %axis_info%%a_space%%a_space%R%joyr% } IfInString, joy_info, U { GetKeyState, joyu, %JoystickNumber%JoyU axis_info = %axis_info%%a_space%%a_space%U%joyu% } IfInString, joy_info, V { GetKeyState, joyv, %JoystickNumber%JoyV axis_info = %axis_info%%a_space%%a_space%V%joyv% } IfInString, joy_info, P { GetKeyState, joyp, %JoystickNumber%JoyPOV axis_info = %axis_info%%a_space%%a_space%POV%joyp% } ToolTip, %joy_name% (#%JoystickNumber%):`n%axis_info%`nButtons Down: %buttons_down%`n`n(right-click the tray icon`n or press Escape to exit) Sleep, 100 } return Escape::ExitApp——— #7) Making Certain Things Only Work in Specified Programs (WindowSpy!) If you want your hotkeys/hotstrings/any other part to only work in a specific program, you'll need the
#IfWinActivecommand. To make a hotkey that only works in Chrome, we can use the following:; Everything following #IfWinActive will only work for the program specified. #IfWinActive, ahk_exe chrome.exe ; Opens a new tab and searches for "autohotkey tutorial" F1:: Send, ^t Sleep, 100 Send, autohotkey tutorial{enter} return ; The second #IfWinActive is to indicate anything past this ; point will work in any program. #IfWinActiveIf you're confused about the ahk_exe part, don't be. It's just one of many ways to identify a window. You can use the title, but this can cause problems as titles can change. If you feel you NEED to use the title of the program, you can set HOW it searches for titles by using
SetTitleMatchMode. Most of the time you should use either theahk_exeor theahk_class. To find a program's class or exe, you can use a powerful tool called "WindowSpy" that was installed along with AutoHotkey. To open window spy, run a script, right-click on the script icon in your system tray and click "Window Spy". There's also a button for it in SciTE4AutoHotkey. Look on the bottom toolbar, right side. SetTitleMatchMode #IfWinActive WinTitle (Covers ahk_exe, ahk_class, ahk_id , ahk_pid, ahk_exe, ahk_group) ——— #8) Sending a Keystroke or Mouse Event to an Inactive Window Sometimes you need to send a keystroke or mouse click to a program that's not active. Like playing/pausing your music player when you're in the middle of a game. Or maybe you need to pause the movie that's playing on your second monitor. To do that, you'll need to useControlSendorControlClick. Here's my own personal script I use to control WinAmp (a music player) regardless of what program is active.;============================== Winamp ============================== #IfWinExist, ahk_exe winamp.exe ; Previous Song #z:: ControlSend, ahk_parent, z, ahk_class Winamp v1.x return ; Play #x:: ControlSend, ahk_parent, x, ahk_class Winamp v1.x return ; Pause #v:: ControlSend, ahk_parent, c, ahk_class Winamp v1.x return ; Next Song #b:: ControlSend, ahk_parent, b, ahk_class Winamp v1.x return #IfWinExist
It should be noted that the
ahk_parentpart (called the control parameter) is not usually needed. Winamp is one of the rare cases where it's required. Normally you'll leave it blank like this:ControlSend, , a, ahk_exe notepad.exe
ControlSend ControlClick ——— This post is a constant work in progress. More will be added as needed. If you feel a topic should be added, please leave a message. If you have any questions about how a script works, please don't hesitate to ask.
An absolute masterclass. Reading through this has increased my understanding of AHK immensely. Spatial Audio Switcher GUI by Tremontaine
I was lucky enough to stumble upon this when looking for a way to switch my spatial audio settings, as any time you switch your audio output, windows likes to totally reset things. This is beautifully written, formatted and commented. I've made some modifications to suit my own needs (removed windows sonic bc gross, added 32 192000 options and made that the default, and added the default format menu to the gui that pops up when you hit the hotkey) My modifications here
github.com
Tiago Forte - The Secret Power of Read-it-Later Apps. I've stayed away from these solutions since Firefox introduced Pocket, but this makes a very compelling case.
Some choice quotes: (saved from highlights from Omnivore a free (for now) open source read it later app that's quite popular. There's also Readwise Reader which I personally use though it's a subscription based model, but it has feature that Omnivore needs to catch up on (which it may). Anyway, the quotes:
We’ve made a habit of filling those hundred random spaces in our day with glances at Twitter, Instagram, and Facebook. But those glances have slowly become stares, and those stares have grown to encompass a major portion of our waking hours.
The end result is the same person who spends 127 hours per year on Instagram (the global average) complains that she has “no time” for reading.
**Much of the time when we pull out our phone, we’re looking for something to match our mood (or energy, or time available, or other context). We use our constellation of shiny apps as mood regulators and self-soothers, as time-fillers and boredom-suppressors, for better or worse. ... So you need a little entertainment, and you open…an ebook? Yeah right. ... **
It’s practical to have organized reading material at hand when you’re on your way to a meeting that may be starting late, a seminar that may have a window of time when nothing is going on, a dentist appointment that may keep you waiting, or, of course, if you’re going to have some time on a train or plane. Those are all great opportunities to browse and work through that kind of reading. People who don’t have their Read/Review material organized can waste a lot of time, since life is full of weird little windows when it could be used.
fortelabs.com
Compare PKMS by selecting your most important features and seeing which products offer them. It's how I found logseq to by my PKMS of choice.
Worth noting that this is put together by AmpleNote. As of now it's very robust and trustworthy. But they day may come that they decide to cash in on this to boost their own offering. As of now I 100% believe in the content. It hasn't failed me yet. ALSO, if you see something that isn't right, or that it's missing a product you'd like to see listed, you can make suggestions here: https://nextnoteapps.featureupvote.com/ https://noteappsfeatures.featureupvote.com/ Quick peek at the UI image
noteapps.info