Search found 14 matches
- 11 Aug 2014, 02:23
- Forum: Scripts and Functions (v1)
- Topic: A collection of small ahk functions
- Replies: 78
- Views: 58536
Re: A collection of small ahk functions
;Function similar to InSrt(), just the array is searched for a string. ;Specifying depth 0 or less will force to search the entire array. InArr(Arr,query,depth:=5) { for k,v in Arr { if (IsObject(v)&&(depth-1)) { if (t:=InArr(v,query,depth-1)) return k "." t } else if (query=v) return k } return ""...
- 06 Aug 2014, 02:41
- Forum: Scripts and Functions (v1)
- Topic: [LIB] TC_EX - Some functions for AHK GUI Tab2 controls
- Replies: 9
- Views: 4693
Re: [LIB] TC_EX - Some functions for AHK GUI Tab2 controls
For some reason, if I use TC_EX_SetSel(HTC,N) in my script, all following TC_EX_GetSel(HTC) returns "".
Do you know why?
Do you know why?
- 05 Aug 2014, 12:30
- Forum: Scripts and Functions (v1)
- Topic: A collection of small ahk functions
- Replies: 78
- Views: 58536
Re: A collection of small ahk functions
Updated my msgbox to work with non-english locales. /* Usual MsgBox, Text or MsgBox [, Options, Title, Text, Timeout] with 3 extra parameters - custom button texts If you pass text for a button, options that determine the buttons are ignored Returns the text of the button pressed by the user or the ...
- 01 Aug 2014, 07:10
- Forum: Scripts and Functions (v1)
- Topic: A collection of small ahk functions
- Replies: 78
- Views: 58536
Re: A collection of small ahk functions
msgbox with custom buttons. /* Usual MsgBox, Text or MsgBox [, Options, Title, Text, Timeout] with 3 extra parameters - custom button texts If you pass text for a button, options that determine the buttons are ignored Returns the text of the button pressed by the user or the word Timeout followed by...
- 11 Jun 2014, 08:46
- Forum: Ask for Help (v1)
- Topic: Gdip_SetPixel()
- Replies: 1
- Views: 1532
Gdip_SetPixel()
This is a script that colours pixels according to their position. It works. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed...
- 22 May 2014, 22:12
- Forum: Ask for Help (v1)
- Topic: Next key-value pair in assosiative array
- Replies: 3
- Views: 2448
Re: Next key-value pair in assosiative array
Linked works, ty. How I didn't thought of it myself
- 22 May 2014, 21:26
- Forum: Ask for Help (v1)
- Topic: Next key-value pair in assosiative array
- Replies: 3
- Views: 2448
Next key-value pair in assosiative array
Let's assume we have
and we have key=3. How can I go from key=3 to key=1000?
Using for-loop is not an option since this line will be called millions of times.
I could get all keys before calling this line, if needed.
Perhaps Enumerator Object could do the trick?
Code: Select all
array:=[1:"a",3:"b",1000:"c"]
Using for-loop is not an option since this line will be called millions of times.
I could get all keys before calling this line, if needed.
Perhaps Enumerator Object could do the trick?
- 10 Apr 2014, 12:06
- Forum: Ask for Help (v1)
- Topic: Why "" is treated as negative number?
- Replies: 6
- Views: 2535
Why "" is treated as negative number?
On chat we came upon interesting feature. Running SetTimer, Poll, 100 return poll: if ( Timer("Test", "L") < 0 ) { tooltip foo! } return Timer(a, b) { return } ESC::ExitApp ; <-- Press escape to exit. Fires off tooltip SetTimer, Poll, 100 return poll: if ( Timer("Test", "L") > 0 ) { tooltip foo! } r...
- 24 Feb 2014, 13:59
- Forum: Ask for Help (v1)
- Topic: Treeview and checkboxes
- Replies: 1
- Views: 1290
Treeview and checkboxes
My problem is that pc forgets which checkboxes are checked: Gui, Usa:New,, Group choosing Gui, Usa:Add, Text,, Choose groups which %NewProduct% belongs to tree:={} Gui, Usa:Add, Treeview, Checked for key, value in groups if (value.top) { tree[key]:=TV_Add(key) UsaAddChildren(key) } Gui, Usa:Add, But...
- 17 Feb 2014, 15:07
- Forum: Suggestions on Documentation Improvements
- Topic: [Archived, Locked] Suggestions on documentation improvements
- Replies: 688
- Views: 290055
Re: Suggestions on documentation improvements
Reference from A_GuiWidth and A_GuiHeight to WinGetPos would be helpful. I remember myself struggling to get gui's width and height, the joy when I thought I found built-in variables and the grieve, when realized they only work if Gui is moved. I know built-in vars would be hard to implement (actual...
- 12 Feb 2014, 05:16
- Forum: Ask for Help (v1)
- Topic: [SOLVED] How do I override base methods in a class ?
- Replies: 7
- Views: 4205
Re: [SOLVED] How do I override base methods in a class ?
trismarc, your code edited the variable being passed to constructor (that's it, A) - it got the properties of purchase. It's due to undocumented fact that variables reffering to objects are only pointers, I think. You gave me idea how to get rid of spaghetti code though: #NoEnv ; Recommended for per...
- 12 Feb 2014, 04:13
- Forum: Ask for Help (v1)
- Topic: [SOLVED] How do I override base methods in a class ?
- Replies: 7
- Views: 4205
Re: How do I override base methods in a class ?
After some chatting on IRC channel with TLM, I understood, where the problem laid. My methods were overriden twice: once in class definition and another time with line this:=r_product that copied not only the values of the vars, but also the methods. Good old spaghetti code prevails: A := new produc...
- 12 Feb 2014, 01:06
- Forum: Ask for Help (v1)
- Topic: [SOLVED] How do I override base methods in a class ?
- Replies: 7
- Views: 4205
Re: How do I override base methods in a class ?
How base.method() is used though? In docs u reffered me to it's only mentioned that it won't work, or can't I read? I want to override base methods like in c# or c++. When I call A.msgbox() from my original post, the program should "print" cheese - only title, however, when B.msgbox() is called, it ...
- 11 Feb 2014, 06:04
- Forum: Ask for Help (v1)
- Topic: [SOLVED] How do I override base methods in a class ?
- Replies: 7
- Views: 4205
[SOLVED] How do I override base methods in a class ?
What I want to achieve, is extending the functionality of base method. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. #Warn ; Enable warnings to assist with detecting common errors. SendMode Input ; Recommended for new scripts due to its superior speed and re...