Search found 25 matches

by nou
07 Sep 2019, 00:26
Forum: Ask For Help
Topic: combine 2d array value from two array Topic is solved
Replies: 6
Views: 458

Re: combine 2d array value from two array Topic is solved

You could do something like this : a := [{"id":59,"size":36} , {"id":123,"size":37} , {"id":62,"size":38} , {"id":63,"size":39} , {"id":64,"size":40}] b := [{"id":63,"stock":17} , {"id":123,"stock":16} , {"id":59,"stock":10} , {"id":64,"stock":12} , {"id":62,"stock":14}] id := [] for k, v in a { id[...
by nou
06 Sep 2019, 23:55
Forum: Ask For Help
Topic: Is AHK suitable for this purpose?
Replies: 2
Views: 241

Re: Is AHK suitable for this purpose?

Yes. Looks like it. You'll just be storing some text with some variables only, right?
by nou
28 Aug 2019, 19:48
Forum: Ask For Help
Topic: [WIP] utility library
Replies: 15
Views: 975

Re: Help with utility library

Alright. I'm not very experienced in writing methods, so I wont' be putting a git request. But thanks to CloakerSmoker and Cap'n Odin on discord, they wrote a merge function for arrays using recursion: Merge(obj1, obj2) { if(!IsObject(obj1) && !IsObject(obj2)) { ; if only one OR the other exist, dis...
by nou
27 Aug 2019, 04:04
Forum: Scripts and Functions
Topic: Move active window to second monitor and back
Replies: 3
Views: 624

Re: Move active window to second monitor and back

I believe you can do a quick screen-dpi scaling by doing something like this:

Code: Select all

scale := 96 / A_ScreenDPI
or was it...

Code: Select all

scale := A_ScreenDPI / 96
But yeah, point being: You can nab the screen's current DPI, and then do some division with the standard DPI scaling (96).
by nou
20 Jul 2019, 16:18
Forum: Ask For Help
Topic: Click on a screen coordinate
Replies: 6
Views: 308

Re: Click on a screen coordinate

... and the game I'm playing changes tab name every minute or so which didn't help with the window name..
Get the ahk_id or ahk_pid of that window. Then you can use it for the controlclick.
by nou
20 Jul 2019, 15:53
Forum: Ask For Help
Topic: How to copy massive data to clipboard Topic is solved
Replies: 3
Views: 360

Re: How to copy massive data to clipboard Topic is solved

You would do something like this:

Code: Select all

table :=  [1, 2, 56, 32, 54]

meow := "" 
Loop % table.count() {
	meow := table[A_Index] "`n"
}

Clipboard := meow
by nou
08 Jul 2019, 03:32
Forum: Ask For Help
Topic: Triggerin Actions with Hotstrings instead of Hotkeys
Replies: 8
Views: 331

Re: Triggerin Actions with Hotstrings instead of Hotkeys

Did you know? you can do the dt1-dt9 by doing something like this:

Code: Select all

Loop, 9
	Hotstring(":X*:dt" A_Index, "thisLabel")
return 

ThisLabel:
	switchDesktopByNumber(substr(A_ThisHotkey, 0, 1))
return 
by nou
08 Jul 2019, 03:19
Forum: Ask For Help
Topic: Help with script (timing & toggled loop)
Replies: 3
Views: 319

Re: Help with script (timing & toggled loop)

To toggle something on/off, I recommend using SetTimer. In this format: count := 0 x::SetTimer, label, % (toggle := !toggle) ? 50 : "Off" label: ToolTip, % "AutoHotKey: " ++count return Then, find what key your xBox One Controller is for the right trigger, and just use this format: send {key down} w...
by nou
05 Jul 2019, 03:10
Forum: Ask For Help
Topic: Pixelgetcolor not working?
Replies: 3
Views: 197

Re: Pixelgetcolor not working?

When in doubt, check your variables. Use tooltip/msgbox. pause on #singleinstance, force coordmode, mouse, screen coordmode, pixel, screen setdefaultmousespeed, 3 ;;this only works with bluestacks in full sized windowed mode. not fullscreen halfx := A_ScreenWidth // 2 halfy := A_ScreenHeight //2 msg...
by nou
02 Apr 2019, 02:32
Forum: Ask For Help
Topic: I Need to advace web page
Replies: 2
Views: 238

Re: I Need to advace web page

Step 1: Grab the URL. Use any method you want.
Step 2: Use RegExMatch(). Match between the last "/" and "numbers"$.
Step 3: Add 1 to it.
by nou
23 Mar 2019, 12:53
Forum: Scripts and Functions
Topic: Multiple Screen Captures
Replies: 3
Views: 645

Re: Multiple Screen Captures

Neat! However, instead of running the whole script by itself, why not make it into a function? We'll call the first part "CreateFile()" because, well, we're creating a file: createFile() { FormatTime, dt_string,, yyyyMMdd datei = C:\Users\USR\Pictures\Screenshots\%dt_string% ifNotExist, %datei% File...
by nou
22 Mar 2019, 11:58
Forum: Scripts and Functions
Topic: Function: IniRead()
Replies: 18
Views: 2165

Re: Function: IniRead()

XD Don't think of it as "returning it as an array". think of it as a "Section.key" variable, as oppose to a "sectionkey" variable. You know, a variable with an extra period in between. Otherwise, without any separator between the section and key, you might run into issues when you do something like ...
by nou
22 Mar 2019, 11:53
Forum: Scripts and Functions
Topic: Pixel Predator - Pixel Search Script
Replies: 15
Views: 2529

Re: Pixel Predator - Pixel Search Script

I'm not sure about bottom to top, but there is the "slow mode" feature: Slow mode only: By default, the search starts at the upper-left pixel of the region and checks all pixels vertically beneath it for a match. If no match is found there, the search continues to the right, column by column, until ...
by nou
21 Mar 2019, 17:57
Forum: Ask For Help
Topic: Run a script every specified weekday at specified time (use ahk instead of task manager) Topic is solved
Replies: 8
Views: 862

Re: Run a script every specified weekday at specified time (use ahk instead of task manager) Topic is solved

Without taking into consideration all other issues and looking purely at the code, I'd suggest you do something similar to what you already have if (InStr(date, A_Wday)) that way, you can just do sleepTill(1610, 135) SleepTill(Time, date:= 0) { if (InStr(date, A_Wday)) { ; get hour ST_Hour:=SubStr(T...
by nou
21 Mar 2019, 16:56
Forum: Ask For Help
Topic: Can anyone write me this into AHK
Replies: 3
Views: 252

Re: Can anyone write me this into AHK

That looks about right. You did it correct. The script should run fine. Mind you, if it's for a game, try checking to see if it works with a basic key first: a:: send q You can also check here : https://autohotkey.com/board/topic/111737-how-to-make-ahk-work-in-most-games-the-basics/ And you can cons...
by nou
21 Mar 2019, 15:38
Forum: Ask For Help
Topic: Can anyone write me this into AHK
Replies: 3
Views: 252

Re: Can anyone write me this into AHK

Look up the autohotkey documentation.

commands to look for are Send and Sleep.

Check out the autohotkey tutorial too
by nou
20 Mar 2019, 13:22
Forum: Scripts and Functions
Topic: Function: IniRead()
Replies: 18
Views: 2165

Re: Function: IniRead()

What about this code? Run it, and then call the variables by doing: section.key note: For some reason, when I make an associative array in the function using %sectionList%[key] := value I'm able to find the variable outside the function. So if my ini file was like: [Edit1] X=10 ; comments on side? Y...
by nou
19 Mar 2019, 22:53
Forum: Scripts and Functions
Topic: Emulating Mac Glyphs Characters on PC
Replies: 0
Views: 264

Emulating Mac Glyphs Characters on PC

This is an attempt to emulate Mac's way of typing in accents and glyphs onto Windows. I took the basic structure from aaron-gustafson's site (linked below), and replaced the characters with the appropriate ascii+unicode. Prior to me replacing it, it wasn't working properly b/c it was sending multipl...
by nou
14 Mar 2019, 11:06
Forum: Scripts and Functions
Topic: Given 2 coordinates, find a third coordinate along that line.
Replies: 0
Views: 282

Given 2 coordinates, find a third coordinate along that line.

This mini-program attempts at a solution with this set of problem: Given: - 2 coordinates, (A,B) and (x,y) on screen 1. - distance (d) away from last coordinate (in pixels) Find: - A third coordinate in that linear path, approximately (d) pixels away from (x,y). Usage: 1) Select options first! . 2) ...

Go to advanced search