Search found 575 matches

by Delta Pythagorean
05 May 2020, 15:57
Forum: Ask For Help
Topic: Menu BoundFunc not Allowed as Direct Parameter
Replies: 6
Views: 555

Re: Menu BoundFunc not Allowed as Direct Parameter

I have a feeling it's unintended or was overlooked to some capacity. Not saying this should be the norm and I should just accept my fate, far from it, I'm saying that this seems like some bad practice to get into. One thing I should note, I haven't checked if passing a bound func to a function would...
by Delta Pythagorean
05 May 2020, 14:44
Forum: Ask For Help
Topic: Menu BoundFunc not Allowed as Direct Parameter
Replies: 6
Views: 555

Menu BoundFunc not Allowed as Direct Parameter

I was able to reproduce these results and it's kind of surprising to me. The problem is this: When creating a new menu item by Menu, MENUNAME, Add, ItemName, Label the Label parameter must be either a label ( "FunctionName" ), bound function ( Func("FunctionName") ), or method of a class ( ObjBindMe...
by Delta Pythagorean
05 May 2020, 10:51
Forum: General Discussion
Topic: Is there anything in batch/powershell which cant be done in AHK? Topic is solved
Replies: 3
Views: 1441

Re: Is there anything in batch/powershell which cant be done in AHK? Topic is solved

Even if Batch/Powershell can do something AHK can't, AHK can simply execute that code and do something with it by using something like this: ExecBatch(Commands, ByRef StdeRR := "") { Static Shell := ComObjCreate("WScript.Shell") ; Open cmd.exe with echoing of commands disabled. ; This line could be ...
by Delta Pythagorean
05 May 2020, 10:22
Forum: Scripts and Functions
Topic: PotPlayer x64 Function Library
Replies: 20
Views: 5656

Re: PotPlayer x64 Function Library

I quickly made a class to handle the player pretty easily. Just read the USAGE section and have your fun. /* ; PotPlayer Function Library ; Original by Specter333 ; Modified by Delta ; USAGE: ; Press play on the player and after 1 second get the current time. Player := New PotPlayer() Player.Message...
by Delta Pythagorean
05 May 2020, 09:26
Forum: Wish List
Topic: Command line switch to execute different script than compiled one
Replies: 14
Views: 1952

Re: Command line switch to execute different script than compiled one

... extending the capabilities of compiled scripts ... If you're wanting to extend the capabilities of a compiled script by executing AHK code using AHK itself, why not creating your own programming language yourself? I've been trying and working on doing it for the past few months since I have not...
by Delta Pythagorean
05 May 2020, 02:18
Forum: Wish List
Topic: Command line switch to execute different script than compiled one
Replies: 14
Views: 1952

Re: Command line switch to execute different script than compiled one

Is there a problem with using the ExecScript function that's in the documentation for AHK_L? Besides requiring the AutoHotkey executable somewhere on the PC to execute it, it works just fine. It just can't communicate with the main script it was run from as easily as you would probably want it to be...
by Delta Pythagorean
04 May 2020, 13:59
Forum: Wish List
Topic: Ternary shorthand ?: like PHP
Replies: 7
Views: 921

Re: Ternary shorthand ?: like PHP

This is already implemented into AHK. As for the || operation, this is seen as OR in a comparison operation. This is generally how a ternary shorthand operation can be done: A := "Yes" B := "Yes" MsgBox, % (A = "Yes" ? 10) ; 10 MsgBox, % (B = "No" ? : 5) ; 5 MsgBox, % (A || B) ; 1 (True) // AHK says...
by Delta Pythagorean
01 May 2020, 19:51
Forum: Bug Reports
Topic: Confirmed bug with #if and Hotkey, If Topic is solved
Replies: 10
Views: 1882

Re: Confirmed bug with #if and Hotkey, If Topic is solved

I have a few questions: Why are you forcing Global inside of a function that doesn't need global? Is there a particular reason why are you using SendEvent versus something else? Why do you have a function dedicated to returning whether notepad++ is active? Why not just put the WinActive call on the ...
by Delta Pythagorean
30 Apr 2020, 03:03
Forum: Ask For Help
Topic: FileAppend to stdout isnt working.
Replies: 3
Views: 271

Re: FileAppend to stdout isnt working.

Depending on what you're trying to accomplish... For appending to a console: ; Attach to the open console this script was run from ; or open a new console to hook onto. DllCall("AttachConsole", "Int", -1) DllCall("AllocConsole") ; Append to the open console: "Hello world\n" FileAppend, Hello world!`...
by Delta Pythagorean
24 Apr 2020, 22:28
Forum: Wish List
Topic: Include Error Work Around
Replies: 2
Views: 836

Re: Include Error Work Around

If by "error" you mean failure to locate the file, in your example you should just use #Include <Gdip> , which looks in %A_ScriptDir%\Lib before anywhere else. That is a valid point, using that method does find the file for you... If you think a user may have a different (but valid) script with the...
by Delta Pythagorean
24 Apr 2020, 04:34
Forum: AutoHotkey v2 Development
Topic: Do we need to return multiple variables?
Replies: 14
Views: 3258

Re: Do we need to return multiple variables?

As far as I know, no. You can span the returned object like you would spread an array, although I think it sorts it so it would be unreliable in various cases. As for assigning a value to multiple variables, you can do it: MouseStart := ExampleObject := MouseGetPos() This would set both variables to...
by Delta Pythagorean
23 Apr 2020, 16:57
Forum: Wish List
Topic: Include Error Work Around
Replies: 2
Views: 836

Include Error Work Around

This has probably already been asked before, but I think this could provide some simple solutions to a tedious task. What I'm asking is some sort of way of working around include errors to include a different file. My thought is something like this: #Include, %A_ScriptDir%\Lib\Gdip.ahk #IfIncludeErr...
by Delta Pythagorean
22 Apr 2020, 00:57
Forum: Scripts and Functions
Topic: NotStr() : Switch between multiple states
Replies: 43
Views: 3996

Re: NotStr() : Switch between multiple states

My apologies, I had a library that was included that replaced the Max function.
I'll have to look deeper into where that specific function is placed but the function does work for me.

TL;DR:
My fault, had a function somewhere that replaced a function.
by Delta Pythagorean
21 Apr 2020, 20:54
Forum: Scripts and Functions
Topic: NotStr() : Switch between multiple states
Replies: 43
Views: 3996

Re: NotStr() : Swtich betwen multiple states

I used the full function and tested it in full and I could not get it to work. I did not edit the function itself.
Also, the error that I provided was copied from the debugger I'm using that displays the errors to a console.
by Delta Pythagorean
21 Apr 2020, 18:16
Forum: Scripts and Functions
Topic: NotStr() : Switch between multiple states
Replies: 43
Views: 3996

Re: NotStr() : Swtich betwen multiple states

I didn't think this was possible, but this error occured: ==> Too many parameters passed to function. Specifically: Max(InStr(Z,(S)(D),0,0-LZ+LS+LD)?LS+LD+LD:0,InStr(Z,(D)(S),,LZ-LS) ?1:0,(Q:=InStr(Z,(D)(S)(D)))?Q+LD+LS+LD:0),1),((Q:=InStr(Z,D,,P1))?Q:LZ+1)-P1) I don't know if you're running a diffe...
by Delta Pythagorean
16 Apr 2020, 22:13
Forum: Wish List
Topic: Enhanced SetBatchLines
Replies: 2
Views: 997

Re: Enhanced SetBatchLines

Specifying a value of nearly any range would work. There's no need for a new command for the same functionality that's already available for the command. I suggest you read into the documentation for the command a little more carefully.
by Delta Pythagorean
11 Apr 2020, 13:30
Forum: Scripts and Functions
Topic: new Notify class leveraging Window's Animations from Maestrith
Replies: 13
Views: 2630

Re: new Notify class leveraging Window's Animations from Maestrith

Offtopic: I always scream when I see maestrith not put any spaces anywhere in his code lol I've never really liked spaces. You can use AHK-Studio, select everything, Alt+M Add Space After Comma{Enter} to "fix" it but I have found that having an editor with a good color scheme is enough to break up ...
by Delta Pythagorean
09 Apr 2020, 14:22
Forum: Other Utilities & Resources
Topic: AHK Compiler By DLG
Replies: 72
Views: 17099

Re: AHK Compiler By DLG

Bloody hell, calm down with the design.
I appreciate the extra details in making it look more futuristic, but from a designer's point of view, it's quite excessive from the task it's trying to accomplish.
by Delta Pythagorean
09 Apr 2020, 14:19
Forum: Scripts and Functions
Topic: new Notify class leveraging Window's Animations from Maestrith
Replies: 13
Views: 2630

Re: new Notify class leveraging Window's Animations from Maestrith

Offtopic: I always scream when I see maestrith not put any spaces anywhere in his code lol
by Delta Pythagorean
07 Apr 2020, 18:51
Forum: Bug Reports
Topic: Modifier up not noticed during handling
Replies: 5
Views: 1424

Re: Modifier up not noticed during handling

It is not a bug but more of a quirk with Windows(?) Using the {Blind} modifier before the text you want to send. Doing so will ignore any keys you're currently holding down and send the keys without question. Read here EDIT: I am incorrect! It does NOT ignore your keypresses but instead passes your ...

Go to advanced search