Search found 23 matches

by Andrew1802
24 Feb 2023, 04:59
Forum: Forum Issues
Topic: AutoHotkey front page still features v1 syntax. Topic is solved
Replies: 14
Views: 2417

AutoHotkey front page still features v1 syntax. Topic is solved

Seeing as V2 is officially released and the default download link for AHK points to that version, shouldn't its syntax be featured on the front page instead of V1 syntax?
image.png
image.png (458.63 KiB) Viewed 2417 times
by Andrew1802
02 Jan 2023, 18:23
Forum: Ask for Help (v2)
Topic: V2 hotkey with and without modifiers
Replies: 3
Views: 354

Re: V2 hotkey with and without modifiers

Code: Select all

*8::{
    if GetKeyState("RShift","P")
        send("8")
    else
        send("^c")
    return
}
Hotkey fires regardless of pressed modifiers. Produces "8" when RShift is held down and "^c" otherwise.

Edit: @mikeyww's suggestion is more reliable.
by Andrew1802
02 Jan 2023, 17:59
Forum: Ask for Help (v2)
Topic: BoundFunc object properties
Replies: 4
Views: 673

Re: BoundFunc object properties

the best way to do what you're doing would probably be to override Func.Prototype.Bind Not sure how to do that, but it sounds promising. or just use a different binding function totally, and have the error checking logic take place at the time the arguments are first bound, when the original functi...
by Andrew1802
02 Jan 2023, 16:53
Forum: Ask for Help (v2)
Topic: BoundFunc object properties
Replies: 4
Views: 673

BoundFunc object properties

Hello! I am attempting to figure out how to determine the number of parameters contained within a BoundFunc object. The reason being that I want to conditionally call the BoundFunc object only when it contains at least FuncObj.MinParams parameters and at most FuncObj.MaxParams parameters. Is this po...
by Andrew1802
24 Sep 2022, 04:19
Forum: Scripts and Functions (v1)
Topic: OSD Console / Log
Replies: 17
Views: 8257

Re: UPDATE: OSD Console / Log

Fix for the slide method, on displays with scaling enabled: Old: slide() { this.sliding := true if(this.consslid := ! this.consslid) { if(this.animate) { this.slideWin(this.consid, this.posX,this.posY,200) } else { WinMove, % "ahk_id " this.consid,,% this.posX,% this.posY } } else { if(this.animate)...
by Andrew1802
26 Nov 2021, 15:35
Forum: Ask for Help (v1)
Topic: easy script
Replies: 2
Views: 584

Re: easy script

I assume that what you mean by "stop the operation of the window" is actually suspending the process. Take a look at https://github.com/Kalamity/classMemory. The suspend() method should do the trick.
by Andrew1802
26 Nov 2021, 13:52
Forum: Ask for Help (v1)
Topic: Help with the Object() function
Replies: 2
Views: 650

Re: Help with the Object() function

Solved it. Low level hacks FTW! :D edit: the rabbit hole continues... isNumberArrPtr(num){ return (NumGet(NumGet(NumGet(num+0)), "Int")=0x245c8948)?1:0 } isNumberArrPtr(12341232) ; this will throw the same critical error as Object(12341232). Looks like I'm gonna have to read the memory manually usin...
by Andrew1802
26 Nov 2021, 11:04
Forum: Ask for Help (v1)
Topic: Help with the Object() function
Replies: 2
Views: 650

Help with the Object() function

Hi! Hello! So, I'm working on a msgbox function with fancy formatting options and support for array printing, long story. Anyway, I'm trying to make it parse each passed parameter into 2 things: (1) a formatting string (e.g. "0x{:016x}") and (2) a value to be formatted. example: printf("<f hex: 0x{:...
by Andrew1802
17 Nov 2021, 21:15
Forum: Scripts and Functions (v1)
Topic: Improved MsgBox function for debugging.
Replies: 0
Views: 732

Improved MsgBox function for debugging.

Hello! I find myself automating stuff by hooking into program memory lately and, inspired by maestrith's m() function, I decided to make my own version which would allow me to chain several variable and/or array prints within the same function, as well as change the formatting for each of them. It l...
by Andrew1802
03 Oct 2021, 13:37
Forum: Ask for Help (v1)
Topic: Both codes triggered despite different hotkey Combinations
Replies: 2
Views: 378

Re: Both codes triggered despite different hotkey Combinations

Unless you use conditionals that always return false when you want to fire the second script (no clue about the context you're using them in), the moment you press CapsLock the first script will fire even if you don't want it to. You can work around this by making it fire only when CapsLock is doubl...
by Andrew1802
03 Oct 2021, 12:04
Forum: Ask for Help (v1)
Topic: Impossible to move a file to a directory represented by a variable?
Replies: 12
Views: 766

Re: Impossible to move a file to a directory represented by a variable?

You either use a relative path or you don't.

Change:

Code: Select all

FileSession := "\HTMLTemp" SessionTotal1 "\" ; Creates a path variable
To:

Code: Select all

FileSession := "HTMLTemp" SessionTotal1 ; Creates a path variable
And then try:
FileMove, Session.txt, %FileSession% ; Test 1
again.
by Andrew1802
03 Oct 2021, 08:48
Forum: Ask for Help (v1)
Topic: Web address to folder path
Replies: 4
Views: 490

Re: Web address to folder path

Alright... #SingleInstance, force ; AutoHotkey Version: AutoHotkey 1.1 ; Language: English ; Platform: Win7 SP1 / Win8.1 / Win10 ; Author: Antonio Bueno <user atnbueno of Google's popular e-mail service> ; Short description: Gets the URL of the current (active) browser tab for most modern browsers ;...
by Andrew1802
03 Oct 2021, 07:08
Forum: Ask for Help (v1)
Topic: How to Track numbers on a moving element on a webpage and get notification when the required number is displayed?
Replies: 5
Views: 469

Re: How to Track numbers on a moving element on a webpage and get notification when the required number is displayed?

Proof of concept using FindText . You will need to download FindText , put it in the same folder as your script and use it to get your own samples as explained in the code comments: #Include, FindText.ahk ;THIS IS AN EXAMPLE! YOU WILL NEED TO GET YOUR OWN SAMPLES!! global initSearchX1:=0 ;the X coor...
by Andrew1802
03 Oct 2021, 03:05
Forum: Ask for Help (v1)
Topic: Web address to folder path
Replies: 4
Views: 490

Re: Web address to folder path

Update: Included .CSV functionality: #SingleInstance, force ; AutoHotkey Version: AutoHotkey 1.1 ; Language: English ; Platform: Win7 SP1 / Win8.1 / Win10 ; Author: Antonio Bueno <user atnbueno of Google's popular e-mail service> ; Short description: Gets the URL of the current (active) browser tab ...
by Andrew1802
03 Oct 2021, 01:06
Forum: Ask for Help (v1)
Topic: How to Track numbers on a moving element on a webpage and get notification when the required number is displayed?
Replies: 5
Views: 469

Re: How to Track numbers on a moving element on a webpage and get notification when the required number is displayed?

1st approach: What swagfag said. You can use PixelGetColor for this. It's easy, but you have to do it yourself because it'll be relative to your frame of reference and it won't keep working if you change scaling, browser or even the display. 2nd approach: Use FindText . It'll be slightly harder at f...
by Andrew1802
03 Oct 2021, 00:33
Forum: Ask for Help (v1)
Topic: Unable to Send : Key
Replies: 2
Views: 285

Re: Unable to Send : Key

Try:

Code: Select all

+;::
Send,{tab}`;{tab} 
return
Explanation: because ";" is a special character in AHK, used to signal the start a comment (section of code that won't be interpreted/compiled), it needs to be escaped. The default escape character in AHK is "`" (backtick).
by Andrew1802
02 Oct 2021, 13:20
Forum: Ask for Help (v1)
Topic: Retrieving static (class(?)) variables from class objects Topic is solved
Replies: 4
Views: 686

Re: Retrieving static (class(?)) variables from class objects Topic is solved

; 2. defines an INSTANCE variable called `TheClassVar`(as the docs said it would) ; 3. and assigns it whatever 1. evaluated to ; at no point is TheClass.TheClassVar ever interacted with, so it remains unset Ok, wow. This sheds a lot of light on why it's behaving this way, it's exactly the explanati...
by Andrew1802
02 Oct 2021, 06:00
Forum: Ask for Help (v1)
Topic: Basic script help
Replies: 2
Views: 351

Re: Basic script help

Here is my over-engineered solution: #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. seed:=SubStr(A_T...
by Andrew1802
01 Oct 2021, 12:05
Forum: Ask for Help (v1)
Topic: Retrieving static (class(?)) variables from class objects Topic is solved
Replies: 4
Views: 686

Re: Retrieving static (class(?)) variables from class objects Topic is solved

Yup, but that would also create a new instance of the class object, just one with the same name as the class itself. I was hoping to understand why stuff like directly accessing a static object inside a class is different from directly accessing a static variable inside a class. I'm guessing it's be...
by Andrew1802
01 Oct 2021, 08:45
Forum: Ask for Help (v1)
Topic: Retrieving static (class(?)) variables from class objects Topic is solved
Replies: 4
Views: 686

Retrieving static (class(?)) variables from class objects Topic is solved

Hello! I've been having a little trouble wrapping my head around working with class variables. I can't quite figure out why I can't retrieve a value from a simple static variable contained inside a class directly, like you can with class variables which contain an object reference. Let me exemplify:...

Go to advanced search