salzkartoffeeel / tostr.ahk Goto Github PK
View Code? Open in Web Editor NEWAn AutoHotkey function for displaying any type of value as a string, so that it can be worked with easily.
License: GNU General Public License v3.0
An AutoHotkey function for displaying any type of value as a string, so that it can be worked with easily.
License: GNU General Public License v3.0
This is a painfully difficult thing to implement, but I really want to get it to work :(
Here is the documentation that's most interesting: https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-getmenuiteminfow
Currently, the algorithm used is guiObj.name || guiObj.title
, which generally works. However, when guiObj.name
is a string that is considered false, but not an empty string, this fails and will fall back to guiObj.title
.
For example, when guiObj.title
is "0"
, this algorithm fails and falls back, because the string is considered false.
Regular Func Objects implement a name
property, which holds the name of the function they point to. Bound Func Objects, however, only implement the call()
method.
This will require some low-level digging around in the source code of AHK.
Currently, this is not implemented and it will need some serious work, since this is not an official feature of AHK.
When I reload a script that contains #include , I get the error
Warning: This variable appears to never be assigned a value.
Specifically: local varSetCapacity
---- D:\the good stuff... 3\AutoHotKey\Lib\toStr.ahk
087: }
090: {
▶ 091: hFile := fileObj.handle , varSetCapacity(lpszFilePath, 260 * 2 + 1) , cchFilePath := 260 * 2 , dwFlags := 0x0 , ret := dllCall("GetFinalPathNameByHandleW", "Ptr", hFile, "Str", lpszFilePath, "UInt", cchFilePath, "UInt", dwFlags)
097: If (ret > 260 * 2)
097: {
For more details, read the documentation for #Warn.
and
Warning: This variable appears to never be assigned a value.
Specifically: local lpszFilePath
---- D:\the good stuff... 3\AutoHotKey\Lib\toStr.ahk
087: }
090: {
▶ 091: hFile := fileObj.handle , varSetCapacity(lpszFilePath, 260 * 2 + 1) , cchFilePath := 260 * 2 , dwFlags := 0x0 , ret := dllCall("GetFinalPathNameByHandleW", "Ptr", hFile, "Str", lpszFilePath, "UInt", cchFilePath, "UInt", dwFlags)
097: If (ret > 260 * 2)
097: {
For more details, read the documentation for #Warn.
I am running v2 and forced your script to run it too with #Requires AutoHotkey v2.0. What should I change in your script to fix this?
The utility function _objIsLinear()
could probably be made more efficient by doing some fancy business with obj.count()
and other object methods.
The current function works well for small objects, but takes a bit of time for bigger ones.
It is O(n)
in the worst case (not too bad), but could potentially be made O(1)
.
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.