Search found 52 matches

by Peabianjay
11 Jan 2024, 01:08
Forum: Ask for Help (v1)
Topic: Explicitely doing "nothing" fixes this.
Replies: 7
Views: 859

Re: Explicitely doing "nothing" fixes this.

Seems to be working consistently-ish now.

Solution: Close Windows Explorer.

It works consistently with explorer closed.
It fails consistently with explorer open.
by Peabianjay
10 Jan 2024, 15:43
Forum: Ask for Help (v1)
Topic: Explicitely doing "nothing" fixes this.
Replies: 7
Views: 859

Re: Explicitely doing "nothing" fixes this.

They work/don't work without any changes seemingly randomly. That is, without changing my script, or changing it in irrelevant (?) ways, such as adding a "do_nothing" subroutine, alters the behavior. Clearly *something* is changing, I just can't figure out what it is. The [var] is co-ordinates for t...
by Peabianjay
15 Dec 2023, 18:43
Forum: Wish List
Topic: ImageGet
Replies: 0
Views: 521

ImageGet

The "flip side" of Image Search.

Something like PixelGetColour....but for an image/area.
by Peabianjay
15 Dec 2023, 18:05
Forum: Ask for Help (v1)
Topic: Explicitely doing "nothing" fixes this.
Replies: 7
Views: 859

Re: Explicitely doing "nothing" fixes this.

I just use notepad. Generally, I can sort out my own problems: I only dig holes I can fill. It's significantly more challenging when using other people's code. Still, it seems odd to have an intermittent problem which comes & goes without changing anything. The "do_nothing()" solution isn't working ...
by Peabianjay
09 Dec 2023, 21:02
Forum: Ask for Help (v1)
Topic: Explicitely doing "nothing" fixes this.
Replies: 7
Views: 859

Explicitely doing "nothing" fixes this.

This code works as expected: function1( var, file ) { msgbox, % var file CaptureScreen( var, , file ) } This code doesn't: function1( var, file ) { ; msgbox, % var file <- commenting out the msgbox broke the NEXT function?! CaptureScreen( var, , file ) } This also worked. Wth? function1( var, file )...
by Peabianjay
20 May 2016, 09:07
Forum: Ask for Help (v1)
Topic: Object Key Sort Disable
Replies: 3
Views: 1313

Re: Object Key Sort Disable

Very nice. Thank you.
by Peabianjay
17 May 2016, 19:47
Forum: Ask for Help (v1)
Topic: Object Key Sort Disable
Replies: 3
Views: 1313

Object Key Sort Disable

The keys in an object are automatically sorted, which (no doubt) is helpful in many situations. I'm sure it speeds up referencing, but sometimes I'd like them to stay in the defined order. It's not hard to write a work-around, as shown here, but I don't care for the added code & maintenance necessar...
by Peabianjay
07 Feb 2016, 22:41
Forum: Wish List
Topic: Array Variables in GUI's
Replies: 13
Views: 6929

Re: Array Variables in GUI's

If I understand correctly: I can use an object. I can even change objects (by use of Gui, -Object). Or choose to not use objects (i.e. "the old way") But, I can't do both (according the documentation, -Object needs to be followed by +Object) That is, if I want to use you +Object with ONE control, th...
by Peabianjay
07 Feb 2016, 22:04
Forum: Ask for Help (v1)
Topic: Need guidance how to pattern match within a large amount of text.
Replies: 10
Views: 2632

Re: Need guidance how to pattern match within a large amount of text.

After reviewing RegExMatch myself, I figured this out....but still think "InStr" is better in this case. (The documentation also says it's faster for simple matches.) But, I'll share what I figured out.... <a href[^>]+> ; this grabs (or rather ignores) the whole HTML call from "<" to ">" <a href ; l...
by Peabianjay
07 Feb 2016, 21:37
Forum: Ask for Help (v1)
Topic: Need guidance how to pattern match within a large amount of text.
Replies: 10
Views: 2632

Re: Need guidance how to pattern match within a large amount of text.

Personally, I'd use https://autohotkey.com/docs/commands/InStr.htm . It would require a couple of calls, but easier to follow. Haystack = ( <td align="left" valign="top" class="bdr-rt Arl c777 fs11 pdgTop navigation bdrBtm"> <a href="http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=38000000000">...
by Peabianjay
07 Feb 2016, 13:28
Forum: Wish List
Topic: Array Variables in GUI's
Replies: 13
Views: 6929

Re: Array Variables in GUI's

@HotKeyit Very cool. Well, cool-ish. It is gonna be a pain redoing all my work around code. I've just started looking at it, but anticipate difficulties with global variables that are NOT part of the object. Still, MUCH MUCH better than pages of "global var1, var2, var3...." followed by copy in & co...
by Peabianjay
19 Dec 2015, 14:41
Forum: Ask for Help (v1)
Topic: Memory Use
Replies: 0
Views: 801

Memory Use

I wanted to look at my memory use, so I found a few example functions & such that people seem to think are great.....'cept, they're not working for me. They all report zero memory, for any/all processes. Primarily, I'm interested in the amount of memory in use by the script I'm working on. This one,...
by Peabianjay
13 Dec 2015, 10:29
Forum: Ask for Help (v1)
Topic: if var is [not] type
Replies: 2
Views: 1271

Re: if var is [not] type

Thanks for the explanation. if (var + 1 . is . number) That's exactly where I got confused. Between the unquoted text treated as text, and undeclared variables still being treated as variables, I get befuddled. In general, if there is doubt, the appropriate place to post is Ask for Help. I have move...
by Peabianjay
11 Dec 2015, 20:53
Forum: Ask for Help (v1)
Topic: if var is [not] type
Replies: 2
Views: 1271

if var is [not] type

Not sure if this quite qualifies as a bug, but the behavior is odd... If "var" is NOT a variable, but an expression: if var is number Has unpredictable(ish) results. var := 1 q := [ "Fish", "Dog", "Cow" ] if var is number msgbox, Yup, it's a number if var + 1 is number msgbox, Well, no, it's not act...
by Peabianjay
07 Dec 2015, 10:35
Forum: Ask for Help (v1)
Topic: Using a listvars hotkey to view local variables
Replies: 2
Views: 1208

Re: Using a listvars hotkey to view local variables

Meh. Ya, that works, 'cept then I'd have to know where the problems are before I know where the problems are. I suppose a hotkey to set a global flag, then if (DEBUG) { listvars } in every questionable place. Even doing that in every function is a lot, let alone everywhere. If only I didn't make mis...
by Peabianjay
06 Dec 2015, 13:17
Forum: Ask for Help (v1)
Topic: Using a listvars hotkey to view local variables
Replies: 2
Views: 1208

Using a listvars hotkey to view local variables

Listvars seems somewhat unpredictable. In this sample script, it's rare for listvars to report the local variables, despite the program being in the function "permanently". With multiple attempts & refreshes, once in a while, it'll show the local variables, but mostly not. Is there any way to make i...
by Peabianjay
06 Dec 2015, 13:05
Forum: Ask for Help (v1)
Topic: Random value from array (time related)
Replies: 4
Views: 3909

Re: Random value from array (time related)

Well, you said you were looking for a "random position from the array". The AHK command is https://autohotkey.com/docs/commands/Random.htm I wrote a small function called " random( x, y) " that uses that command to generate a random number. This: array1.maxindex() tells me how many values in the arr...
by Peabianjay
06 Dec 2015, 12:45
Forum: Ask for Help (v1)
Topic: cycling between keys Topic is solved
Replies: 12
Views: 2404

Re: cycling between keys Topic is solved

Alternatively:

Code: Select all

$1::
    send, % mod(counter++, 10 )
return
by Peabianjay
06 Dec 2015, 12:18
Forum: Ask for Help (v1)
Topic: Random value from array (time related)
Replies: 4
Views: 3909

Re: Random value from array (time related)

Not entirely sure I know what you're asking, but maybe something like this?

Code: Select all

Array1 := Array("Alpha", "Beta", "Gamma", "Delta", "Omega")

loop, 5
{
    msgbox, % Array1[random(1, array1.maxindex() )]
}
exitapp

random( x, y )
{
   Random, var, %x%, %y%
   return var
}
by Peabianjay
06 Dec 2015, 12:08
Forum: Ask for Help (v1)
Topic: Output command question
Replies: 2
Views: 1156

Re: Output command question

You can also use, Send, % x Note the space after "%" which makes everything following it "evaluated" instead of "as is". Particularly helpful for arrays. These two msgbox's have the same result: x := "Blue" y := "Yellow" Msgbox, %x% is my colour. %y% is another colour. Msgbox, % x " is my colour. " ...

Go to advanced search