Search found 119 matches
- 14 Apr 2024, 21:51
- Forum: Bug Reports
- Topic: inputOpj.EndKey
- Replies: 3
- Views: 280
Re: inputOpj.EndKey
If I'm understanding you correctly, you are getting Farsi letters from EndKey but you are not expecting Farsi letters. So what are you expecting? Keys which correspond to individual characters are "named" by the character that they produce, which depends on keyboard layout. If I'm understanding you...
- 10 Apr 2024, 11:53
- Forum: Bug Reports
- Topic: inputOpj.EndKey
- Replies: 3
- Views: 280
inputOpj.EndKey
In the function that i made is sometimes pressed instead of the name of the key The letter of that word is returned in the language of that keyboard GetKey(Timeout?) { inputOpj := InputHook("S") inputOpj.VisibleNonText := false inputOpj.VisibleText := false inputOpj.KeyOpt("{All}", "E") inputOpj.Sta...
- 14 Oct 2023, 09:27
- Forum: Ask for Help (v2)
- Topic: turn on bluetooth windows 11 Topic is solved
- Replies: 1
- Views: 332
turn on bluetooth windows 11 Topic is solved
Is there a way to turn on bluetooth in windows11 without using Setting (manually like opne setting and ...)?
- 27 Aug 2023, 11:07
- Forum: Wish List
- Topic: can ArrayObj.Push("a") return somthing?
- Replies: 1
- Views: 521
can ArrayObj.Push("a") return somthing?
i wish return the own array like
Code: Select all
ArrayObj.push(args*)
Code: Select all
mapObj.Set(args*)
- 04 Jul 2023, 10:25
- Forum: Scripts and Functions (v2)
- Topic: Easiest way to send highlighted text on clipboard to ANY function!
- Replies: 8
- Views: 2041
Re: Easiest way to send highlighted text on clipboard to ANY function!
Yes, you are right, of course, my Hints will be useful when Develop your script
- 04 Jul 2023, 07:12
- Forum: Scripts and Functions (v2)
- Topic: Easiest way to send highlighted text on clipboard to ANY function!
- Replies: 8
- Views: 2041
Re: Easiest way to send highlighted text on clipboard to ANY function!
a point is that the second input in the __Call method is an array by itself. and __Call(function, args*) It creates an array and puts all the arguments sent from the method side into the first element of this array. [[args*]] and that's wrong! And about the highlight class: a quote from Descolada al...
- 01 Jul 2023, 19:46
- Forum: Ask for Help (v2)
- Topic: difference between calling an external and an ahk function?
- Replies: 3
- Views: 435
difference between calling an external and an ahk function?
Hello, I checked some scripts that used an external function that we had in Autohat
For example, to find the position and size of a window, what is the difference between the two?
using
or
using
For example, to find the position and size of a window, what is the difference between the two?
using
Code: Select all
DllCall("GetWindowRect", "Ptr",hwnd, "Ptr", Rect)
using
Code: Select all
WinGetPos()
- 01 Jul 2023, 06:24
- Forum: Bug Reports
- Topic: switch default case doesn't allow spaces before ":" Topic is solved
- Replies: 2
- Views: 564
Re: switch default case doesn't allow spaces before ":" Topic is solved
In Autohotkey v2.0.3, I get Error: Unexpected ":" if I put spaces between default and : . #Requires AutoHotkey v2.0 var := 0 switch var { case 1 : MsgBox("1") default : MsgBox("default") } Why is this possible in v1.1 but not v2.0? #Requires AutoHotkey v1.1 var := 0 switch var { case 1 : MsgBox % "...
- 01 Jul 2023, 06:03
- Forum: General Discussion
- Topic: Is AHK GUi worth it?
- Replies: 1
- Views: 906
Re: Is AHK GUi worth it?
Hi I'm confused with AHK GUI because It's hard to work with it, I mean in "visual studio C# + Core net " you can move anything and just double-click (or use event) to write your code there, unlike in AHK when you need to write everything in text format :crazy: there is a tool "AutoGUI" where you ca...
- 01 Jul 2023, 05:33
- Forum: Scripts and Functions (v2)
- Topic: [V2] [Function] Select screen region with mouse
- Replies: 12
- Views: 3284
Re: [V2] [Function] Select screen region with mouse
@Spitzi
It would be good if we could lock the the Lbutton, so that it does not actually click on the place we want to select.
It would be good if we could lock the the Lbutton, so that it does not actually click on the place we want to select.
- 21 May 2023, 13:53
- Forum: Scripts and Functions (v1)
- Topic: ScrCmp() : Detects changes in screen by comparing two screenshots
- Replies: 23
- Views: 12531
Re: ScrCmp() : Detects changes in screen by comparing two screenshots
I converted this code to version two, but I don't know why I get an error ScreenCompare(X, Y, W, H, Hwnd := 0, Delay1 := 100, Delay2 := 100) { Global A_Args BITMAPINFO := Buffer(40, 0) NumPut("Int", W, "Int", 0 - H * 2, "Short", 1, "Short", 32, BITMAPINFO ) hBM := DllCall("Gdi32.dll\CreateDIBSection...
- 05 Apr 2023, 20:18
- Forum: Tips and Tricks
- Topic: [V2] trick to read Map values as properties
- Replies: 7
- Views: 4740
Re: [V2] trick to read Map values as properties
oMap := Map() oMap.CaseSense := "Off" oMap.Set("Red", "ff0000", "Green", "00ff00", "Deep Blue", "0000ff") oMap.DefineProp("__get", { Call: Get }) oMap.Default := "Def" Get(this, Key, Params) { ; in this way Return the value of MapObj.Default, if defined: try { if !Params.Length return this[key] ;Or...
- 31 Mar 2023, 11:11
- Forum: Ask for Help (v2)
- Topic: Multiple values to a key in a map? Topic is solved
- Replies: 1
- Views: 286
Re: Multiple values to a key in a map? Topic is solved
I don't know if I understood correctly or not, but you can use multi-dimensional representations
https://www.autohotkey.com/docs/v2/Objects.htm#Usage_Arrays_of_Arrays
https://www.autohotkey.com/docs/v2/Objects.htm#Usage_Arrays_of_Arrays
- 30 Mar 2023, 20:59
- Forum: Tips and Tricks
- Topic: Add function or property to all Classes
- Replies: 0
- Views: 1522
Add function or property to all Classes
I wanted to use an object function and I wanted to use the class's own method instead of using an external function, Example: class SomeClass { static Call(arg) => MsgBox("Calling Call " arg) static Method(arg) => MsgBox("Calling Method " arg) } SomeClass.Bind("method", "ali").Call() ; instead of Ob...
- 25 Mar 2023, 10:11
- Forum: Scripts and Functions (v2)
- Topic: String.ahk, Array.ahk, Misc.ahk
- Replies: 34
- Views: 6115
Re: String.ahk, Array.ahk, Misc.ahk
@Descolada
Array.ahk lib can be include Rand method which returns a random value from the array
fat arrow syntax
Array.ahk lib can be include Rand method which returns a random value from the array
Code: Select all
static Rand() {
Arr := this
randIndex := Random(1, Arr.Length)
return Arr[randIndex]
}
Spoiler
- 25 Mar 2023, 07:29
- Forum: Scripts and Functions (v2)
- Topic: [V2] Tooltip2 to follow mouse with timeout
- Replies: 12
- Views: 2558
Re: [V2] Tooltip2 to follow mouse with timeout
I have created a function to display the tooltip that follows the mouse and stops after a time. Strange that I could not find it on the forum for V2, or I missed some forums. Maybe a nice example for in the Tooltip documentation? UPDATED: - Switched to use A_TickCount to determine the TargetTime #R...
- 22 Mar 2023, 20:41
- Forum: Scripts and Functions (v2)
- Topic: String.ahk, Array.ahk, Misc.ahk
- Replies: 34
- Views: 6115
Re: String.ahk, Array.ahk, Misc.ahk
@Descolada
String.ahk could include Format
String.ahk could include Format
Code: Select all
static Format(args*) => Format(this, args*)
Code: Select all
job := "Programmer"
age := 20
"ali is {1} and his age is {2}".Format(job, age)
- 22 Mar 2023, 20:37
- Forum: Scripts and Functions (v2)
- Topic: String.ahk, Array.ahk, Misc.ahk
- Replies: 34
- Views: 6115
Re: String.ahk, Array.ahk, Misc.ahk
thnksDescolada wrote: ↑22 Mar 2023, 00:00@aliztori, if you are referring to the double periods, then you can read about those from Microsofts' path naming rules.
- 21 Mar 2023, 10:38
- Forum: Scripts and Functions (v2)
- Topic: String.ahk, Array.ahk, Misc.ahk
- Replies: 34
- Views: 6115
Re: String.ahk, Array.ahk, Misc.ahk
@aliztori, test it with these inputs: "d".Concat("ddd", "ddd") "<br>".Concat("break", "br") Yeah your right, good point another question How did you set this type of path for a library and what rules does it follow? I didn't read this anywhere #include ..\Lib\Misc.ahk #include ..\Lib\Array.ahk
- 18 Mar 2023, 13:03
- Forum: Scripts and Functions (v2)
- Topic: String.ahk, Array.ahk, Misc.ahk
- Replies: 34
- Views: 6115
Re: String.ahk, Array.ahk, Misc.ahk
@aliztori, I'm not sure where you got the line RTrim(s, this) since I can't find it in any of the libs, but I will assume you are talking about InsertLine. This is because I pretty much 1-on-1 converted it from String Things library by tidbits, and didn't look too deep into it. SubStr(new, 1, -StrL...