Search found 75 matches

by SALZKARTOFFEEEL
12 Nov 2019, 16:54
Forum: AutoHotkey v2 Scripts and Functions
Topic: wait – Wait for any variable to become true or any function to evaluate to true
Replies: 2
Views: 159

Re: wait – Wait for any variable to become true or any function to evaluate to true

I think this is a wonderful and it's great that you shared. Thank you! Please don't take this the wrong way, but I think putting just a function under GPL is unnecessary and even odd. It's arguably much better to put such under the MIT license (where it has your name as the copyright holder) or pub...
by SALZKARTOFFEEEL
12 Nov 2019, 14:19
Forum: AutoHotkey v2 Scripts and Functions
Topic: wait – Wait for any variable to become true or any function to evaluate to true
Replies: 2
Views: 159

wait – Wait for any variable to become true or any function to evaluate to true

Hi everyone! First time sharing code on the forums, so forgive me for any mistakes I may make. This function waits for the variable you pass in to become truthy, or for the function you pass in to return a truthy value. You can customize the interval at which it will run the check, as well as the ma...
by SALZKARTOFFEEEL
29 Oct 2019, 09:23
Forum: Ask For Help
Topic: Very simple question that I can't figure out (new user) Topic is solved
Replies: 1
Views: 112

Re: Very simple question that I can't figure out (new user) Topic is solved

Code: Select all

Timeout := DllCall("GetDoubleClickTime")
$Space::
If (A_PriorHotkey == A_ThisHotkey && A_TimeSincePriorHotkey <= Timeout)
    WinMinimize, A
Else
    Send {Space}
by SALZKARTOFFEEEL
06 Oct 2019, 11:21
Forum: Ask For Help
Topic: Loop Stopping
Replies: 2
Views: 121

Re: Loop Stopping

There is no loop in the code you are showing. You might be referring to the auto-repeat functionality of Windows that automatically repeats a key if you hold it down. But that stops sending the key when you press another key. This might be the effect you are observing, in which case there is not muc...
by SALZKARTOFFEEEL
09 Sep 2019, 14:07
Forum: Ask For Help
Topic: operators: unary/binary/ternary
Replies: 3
Views: 206

Re: operators: unary/binary/ternary

Not sure if you want to include in and contains , since those are not actually operators in v1 and not yet operators in v2. is is fine, since it is an operator in v2 (not in v1 though). If you really want to list those pseudo-operators, then you should also include between as well as all the negated...
by SALZKARTOFFEEEL
01 Sep 2019, 02:57
Forum: Ask For Help
Topic: terminology: object class terms in other programming languages
Replies: 1
Views: 187

Re: terminology: object class terms in other programming languages

I suggest adding the class name stored in __Class , the parent class (base class in AHK) you get by using extends , the this built-in, and mentioning that this.base is equivalent to most other languages' super built-in. Also, you can surely call __Init the “initializer”. That's all from my part. Tak...
by SALZKARTOFFEEEL
16 Aug 2019, 12:42
Forum: Ask For Help
Topic: We can paste a variable without using "Send" or "Sendinput" ?
Replies: 3
Views: 410

Re: We can paste a variable without using "Send" or "Sendinput" ?

SafePaste() { ; A way of pasting that only returns control when the paste is complete ; by jeeswg ; See https://www.autohotkey.com/boards/viewtopic.php?p=271514&sid=f898e28c59efcb6871c1dff403e663dd#p271517 ControlGetFocus, vCtlClassNN, A ControlGet, hCtl, Hwnd,, % vCtlClassNN, A SendMessage, 0x302,...
by SALZKARTOFFEEEL
13 Aug 2019, 11:57
Forum: Ask For Help
Topic: We can paste a variable without using "Send" or "Sendinput" ?
Replies: 3
Views: 410

Re: We can paste a variable without using "Send" or "Sendinput" ?

Although this method is frowned upon, you could use the clipboard.
You can load whatever it is that you want to paste into the clipboard and then send a WM_PASTE message to the active window / control.
by SALZKARTOFFEEEL
13 Aug 2019, 10:11
Forum: AutoHotkey v2 Help
Topic: Compile AHK v2 Topic is solved
Replies: 5
Views: 555

Re: Compile AHK v2 Topic is solved

You need to tell the compiler to use the v2 binary file. In the installation directory for v2 there should be a folder called “Compiler”. Easiest way, perhaps, is to copy “Ahk2Exe.exe” from the v1 installation's “Compiler” folder into that “Compiler” folder. Next double-click the .exe-file, choose e...
by SALZKARTOFFEEEL
06 Aug 2019, 12:50
Forum: Ask For Help
Topic: Fuzzy Search Topic is solved
Replies: 3
Views: 234

Re: Fuzzy Search Topic is solved

This kind of a thing is easy to do if you know how to, so let me explain how I'd do it. I'd create an array that will have the five best matches in order from best to worst. Now I would step through all 50,000 items and for every item check if it is better than the current ‘best’ item. If it is, the...
by SALZKARTOFFEEEL
06 Aug 2019, 09:29
Forum: Ich brauche Hilfe
Topic: Browserinhalt sytematisch auslesen Topic is solved
Replies: 6
Views: 380

Re: Browserinhalt sytematisch auslesen Topic is solved

Das ist mit Sicherheit möglich in AHK, aber nicht gerade leicht – AutoHotkey sehr schlecht für alles, was im Internet passiert.
Ich würde vorschlagen, JavaScript oder Python zu benutzen, beide Sprachen sind wesentlich besser für web scraping geeignet.
by SALZKARTOFFEEEL
27 Jul 2019, 08:46
Forum: Ask For Help
Topic: If-assignment Topic is solved
Replies: 2
Views: 248

Re: If-assignment Topic is solved

It's just an assignment and an if-statement combined, simply to save space (and a negligible amount of CPU time). Instead of doing this: y := 2 * x + 5 if (y) { ... } You can just do this: if (y := 2 * x + 5) { ... } Saves you one line of code, that's essentially it. Nothing special about it.
by SALZKARTOFFEEEL
27 Jul 2019, 06:15
Forum: Ask For Help
Topic: Automatically replace " with ""
Replies: 3
Views: 155

Re: Automatically replace " with ""

Code: Select all

:*B0:"::"{Left}
This is probably the most efficient way to do this in AHK.
by SALZKARTOFFEEEL
25 Jul 2019, 10:29
Forum: Ask For Help
Topic: Is it possible to run a script from memory?
Replies: 21
Views: 1386

Re: Is it possible to run a script from memory?

afe wrote: Thank you. But I just thought about protecting the source code.
Well... why didn't you just ask for that then?
It's okay now, but generally: just ask what you want to know exactly. Give as much detail as you can. Otherwise you'll just waste peoples' time, yourself included.
by SALZKARTOFFEEEL
25 Jul 2019, 06:10
Forum: Ask For Help
Topic: Is it possible to run a script from memory?
Replies: 21
Views: 1386

Re: Is it possible to run a script from memory?

You can run AHK in a way that it reads from StdIn instead of from a file, as described here . The section starts with “[v1.1.17+]: Specify an asterisk (*) for the filename to read the script text from standard input (stdin).” If you now make use of Batch's piping feature, you can run any AHK code fr...
by SALZKARTOFFEEEL
06 Apr 2019, 04:48
Forum: Ask For Help
Topic: Why is the value of "INTERNET_COOKIE_HTTPONLY" 8192? Topic is solved
Replies: 3
Views: 351

Re: Why is the value of "INTERNET_COOKIE_HTTPONLY" 8192? Topic is solved

The MSDN Documentation is written for use with C/C++. When working in those languages,you simply include the header file specified at the bottom of the page ( wininet.h in this case) and then all those Enumerations, as they are called, are set up correctly. INTERNET_COOKIE_HTTPONLY is just a variabl...
by SALZKARTOFFEEEL
01 Apr 2019, 04:02
Forum: AutoHotkey v2 Development
Topic: Can I run AHK v1 and v2 Simultaneously on Same Device?
Replies: 12
Views: 1455

Re: Can I run AHK v1 and v2 Simultaneously on Same Device?

;) Interesting you bring this up because I was just talking with maestrith about going ahead and creating an up to date AHK Studio v2 syntax file. It will be in XML, since that is what AHK Studio is in and it will be very basic structure: Name, ( Parameters [ Optional Parameters ] ) Brief Descripti...
by SALZKARTOFFEEEL
30 Mar 2019, 08:57
Forum: AutoHotkey v2 Development
Topic: Can I run AHK v1 and v2 Simultaneously on Same Device?
Replies: 12
Views: 1455

Re: Can I run AHK v1 and v2 Simultaneously on Same Device?

As an editor I use Sublime Text. It does not support AHK syntax out of the box, so I have created my own syntax highlighter for v2 quite some time ago. It is not perfect and I really need to update it.
by SALZKARTOFFEEEL
28 Mar 2019, 12:51
Forum: Scripts and Functions
Topic: [v2] toStr() – represent anything as a string (for debugging, etc.)
Replies: 5
Views: 569

Re: [v2] toStr() – represent anything as a string (for debugging, etc.)

gregster wrote: Well, it would be a natural next step, if you already have an object as a string. But of course, it is just a suggestion.
I am thinking about it! Though, this will certainly not be an update to toStr(), but rather an entirely new script.
by SALZKARTOFFEEEL
28 Mar 2019, 12:20
Forum: Scripts and Functions
Topic: [v2] toStr() – represent anything as a string (for debugging, etc.)
Replies: 5
Views: 569

Re: [v2] toStr() – represent anything as a string (for debugging, etc.)

The purpose of this function is not to store data, however, I could see this being useful too!
Currently, turning strings into data is actually possible using continuation sections. (I can't find the code again, but I will hopefully edit this post once I get it.)

Go to advanced search