Search found 1051 matches

by geek
14 Mar 2024, 16:22
Forum: Ask for Help (v2)
Topic: Reformatting my script from v1 to v2
Replies: 26
Views: 416

Re: Dynamic Variable Creation

Instead of Global Mon1Col1 := Map() Mon%MonNum%Col%ColNumber%["X"] := WhateverVal Would I just use MonCol := [[Map()]] MonCol[MonNum][ColNumber]["X"] := WhateverVal Depending on your intended use case, lots of nesting is not always the best answer. Having to create intermediate maps or arrays for e...
by geek
14 Mar 2024, 11:05
Forum: Scripts and Functions (v2)
Topic: Store passwords in scripts securely through Windows Credential Manager API
Replies: 7
Views: 1256

Re: Store passwords in scripts securely through Windows Credential Manager API

Hi @geek, Good one there! This could turn out to be a password manager with a nice GUI? :) I wouldn't recommend it. The Windows credential manager is a great way to keep credentials out of scripts and secure at rest, but it does not have all the attributes you need for a password manager. Security ...
by geek
13 Mar 2024, 19:46
Forum: Scripts and Functions (v2)
Topic: Store passwords in scripts securely through Windows Credential Manager API
Replies: 7
Views: 1256

Re: Store passwords in scripts securely through Windows Credential Manager API

Can you point me to any examples where snippets of your script will hand off the password read from the generic user to a variable/input of another script? The code and example for how to use it in AHKv2 is at the top of this thread. To recap, copy the CredRead function into your script and then yo...
by geek
08 Mar 2024, 08:22
Forum: Ask for Help (v1)
Topic: Problem running a compiled script
Replies: 7
Views: 167

Re: Problem running a compiled script

It would also be helpful to know for sure if the response from the HTTP request is correct in the compiled version. What does a MsgBox % response.Text right above obj := JSON.Load(response.Text) say?
by geek
07 Mar 2024, 17:01
Forum: Ask for Help (v1)
Topic: Problem running a compiled script
Replies: 7
Views: 167

Re: Problem running a compiled script

This exception occurs when you have run the JSON library in an unsupported ANSI mode. Please compile using Unicode 32 or 64 bit.
by geek
06 Mar 2024, 21:18
Forum: Scripts and Functions (v2)
Topic: GUI for Testing Multiple Scripts Over 1ks Of Iterations for Speed Optimization
Replies: 8
Views: 1523

Re: AHKv2 Test Multiple Scripts for Speed Optimization

updated to include richcode, and some surprising findings. When you go to modify and re-share code developed by other people, please pay attention to how their code is licensed and make sure to follow the license terms. RichCode is licensed under the MIT license, which does allow redistribution wit...
by geek
05 Mar 2024, 18:28
Forum: Scripts and Functions (v2)
Topic: Edit Control With Syntax Highlighting based on RichEdit control
Replies: 4
Views: 331

Re: Edit Control With Syntax Highlighting based on RichEdit control

When you go to modify and re-share code developed by other people, please pay attention to how their code is licensed and make sure to follow the license terms. RichCode is licensed under the MIT license, which does allow redistribution with modification, but requires that The above copyright notice...
by geek
03 Mar 2024, 13:06
Forum: Bug Reports
Topic: Certain COM calls cannot be made from a HotIf condition
Replies: 3
Views: 247

Re: Certain COM calls cannot be made from a HotIf condition

My confusion has mostly stemmed from why a COM proxy call would be forbidden in this specific circumstance. In any case, I was able to work around the issue by providing an stdcall style callback (using Python's equivalent of CallbackCreate) rather than an IDispatch callback, creating a BoundFunc as...
by geek
28 Feb 2024, 11:39
Forum: Bug Reports
Topic: Certain COM calls cannot be made from a HotIf condition
Replies: 3
Views: 247

Certain COM calls cannot be made from a HotIf condition

Doing certain COM calls in HotIf presents an error Error: 0x8001010D - An outgoing call cannot be made since the application is dispatching an input-synchronous call. This code reproduces the issue: #Requires AutoHotkey v2.0 Persistent excel := ComObject("Excel.Application") excel.Visible := true Ho...
by geek
17 Feb 2024, 12:47
Forum: Ask for Help (v2)
Topic: map() is so slow? Topic is solved
Replies: 10
Views: 303

Re: map() is so slow? Topic is solved

This is what my HashMap library is for https://www.autohotkey.com/boards/viewtopic.php?f=83&t=124727 By replacing map with hashmap, it completes on my system in 200ms instead of 2000ms, against the same file (downloaded from https://github.com/KyleBing/rime-wubi86-jidian). Even faster if I avoid usi...
by geek
17 Feb 2024, 08:31
Forum: Other Programming Languages
Topic: AHK or something close on Linux?
Replies: 5
Views: 467

Re: AHK or something close on Linux?

I maintain a list of tools like AutoHotkey across the major platforms here
by geek
15 Feb 2024, 08:18
Forum: General Discussion
Topic: Opinion: For AHKv2, We should move away from writing Examples into inline comment docs, adopt if __main__
Replies: 7
Views: 461

Re: Opinion: For AHKv2, We should move away from writing Examples into inline comment docs, adopt if __main__

In AutoHotkey v2, all class definitions create multiple objects that explicitly are not instances . Primarily, a class definition creates a class object and a prototype object . The class object is the one stored in the global read-only variable by the same name of the class. The class object is cal...
by geek
14 Feb 2024, 12:29
Forum: Bug Reports
Topic: Rounding Bug
Replies: 45
Views: 5436

Re: Rounding Bug

Nothing wrong here, 4.515 in decimal cannot be perfectly represented by the IEEE754 format used to encode floats in binary for computers to process. It's like how 1/3 in decimal can't be perfectly encoded, but instead with limited resources you might write it as as 3.333332 The closest value in bina...
by geek
13 Feb 2024, 12:20
Forum: General Discussion
Topic: Opinion: For AHKv2, We should move away from writing Examples into inline comment docs, adopt if __main__
Replies: 7
Views: 461

Re: Opinion: For AHKv2, We should move away from writing Examples into inline comment docs, adopt if __main__

I may be misunderstanding, but I don't agree with this suggestion. I don't intend to be harsh here, just thorough, so if I come off as aggressive at all I do apologize. Python's if __name__ == '__main__': construct, in my opinion at least, has more to do with making runnable files also includable ra...
by geek
08 Feb 2024, 10:08
Forum: Tutorials (v2)
Topic: MCode Tutorial (Compiled Code in AHK)
Replies: 16
Views: 2463

Re: MCode Tutorial (Compiled Code in AHK)

Some UI for MCL has been built out now, allowing you to invoke the compiler directly from the browser by a three step process: 1. Paste C code into wiki page 2. Press compile 3. Copy mcode out of wiki page I put the component on this page https://autohotkey.wiki/cloudahk#compiler though I may put an...
by geek
05 Feb 2024, 07:34
Forum: Scripts and Functions (v1)
Topic: v1 -> v2 Script Converter
Replies: 123
Views: 69324

Re: v1 -> v2 Script Converter

I'd chalk it up to a caching problem. The wiki platform (dokuwiki) does not have good cache busting controls, so if you visited the wiki before and after my changes to add the converter feature, you may not receive the updated JavaScript until you force refresh the page (e.g. shift+F5)
by geek
03 Feb 2024, 17:02
Forum: Scripts and Functions (v1)
Topic: v1 -> v2 Script Converter
Replies: 123
Views: 69324

Re: v1 -> v2 Script Converter

Sounds good to me. I think it would also get more exposure and updates would be seamless to the users, right? I don't actually collect visitor statistics from the wiki, but given that I get almost no contributions from other users I hesitate to claim putting anything on the wiki will lead to more e...
by geek
03 Feb 2024, 11:26
Forum: Scripts and Functions (v1)
Topic: v1 -> v2 Script Converter
Replies: 123
Views: 69324

Re: v1 -> v2 Script Converter

Would there be interest in a hosted version of this conversion tool? I should be able to pull all the code into the wiki sandbox (https://autohotkey.wiki/cloudahk) and write some front-end code to provide a diffing interface like shown in the original post. This should allow people to use the tool w...
by geek
30 Jan 2024, 10:50
Forum: Ask for Help (v2)
Topic: VarSetCapacity() and NumPut() to V2? Topic is solved
Replies: 2
Views: 190

Re: VarSetCapacity() and NumPut() to V2? Topic is solved

monitorInfo := Buffer(40) NumPut("UPtr", 40, monitorInfo) Though technically speaking, the original code should have specified "Int" or "UInt" type instead of letting it default to "UPtr". The MONITORINFO struct's first field is DWORD type, which is equivalent to AHK's "UInt" type. monitorInfo := B...
by geek
20 Jan 2024, 09:31
Forum: Wish List
Topic: Make global keyword at top level throw
Replies: 2
Views: 389

Make global keyword at top level throw

Especially with the transition from v1, we have a lot of users come into the Discord to ask why code such as this is not working: global counter := 1 x::{ MsgBox counter++ } but instead throwing "Error: Expected a Number but got an unset variable." Instead, I think this code should throw a load-time...

Go to advanced search