I think a timer that performs 1 check every second would not be too taxing.
Probably the most efficient is to use windows scheduler to launch your script at the exact time you want, depending on how sensitive the time window is because it will take a few moments to launch a script from scratch.
Search found 747 matches
- 19 Sep 2020, 15:28
- Forum: Ask For Help
- Topic: Press enter at specific time
- Replies: 2
- Views: 59
- 19 Sep 2020, 03:16
- Forum: Ask For Help
- Topic: Press key at exactly 20:00
- Replies: 8
- Views: 252
Re: Press key at exactly 20:00
I think a timer would be more efficient and if you put it every 1 min it can't miss the time.
- 19 Sep 2020, 02:52
- Forum: Ask For Help
- Topic: Which AHK files to transfer?
- Replies: 3
- Views: 67
Re: Which AHK files to transfer?
yes the files
- 19 Sep 2020, 02:39
- Forum: Ask For Help
- Topic: Change string letters Topic is solved
- Replies: 6
- Views: 117
Re: Change string letters Topic is solved
To see if I know how switches work I did it again with a switch but since ahk isn't case sensitive it requires StringCaseSense, On to differentiate between "a" and "A" StringCaseSense, On msgbox, % myChangerFunction("2A4") ; => "4Z9" msgbox, % myChangerFunction("Aa24") ; => "Zk49" myChangerFunction(...
- 18 Sep 2020, 06:25
- Forum: Ask For Help
- Topic: Change string letters Topic is solved
- Replies: 6
- Views: 117
Re: Change string letters Topic is solved
for example: msgbox, % myChangerFunction("2A4") ; => "4Z9" msgbox, % myChangerFunction("Aa24") ; => "Zk49" myChangerFunction(param_input) { charArray := strSplit(param_input) outString := "" for _, char in charArray { if (char == 2) { outString .= 4 continue } if (char == "A") { outString .= "Z" con...
- 18 Sep 2020, 06:15
- Forum: Ask For Help
- Topic: Change string letters Topic is solved
- Replies: 6
- Views: 117
Re: Change string letters Topic is solved
I would make a function that performs the changes on a per character level, then perform on each character (position in the string) exactly once.
- 15 Sep 2020, 09:44
- Forum: Ask For Help
- Topic: Array for mouse coordinates.
- Replies: 8
- Views: 233
Re: Array for mouse coordinates.
Incase needed; here is how to create objects and push them onto an array; in this case when an imagesearch successfully finds an x and y to add
Code: Select all
allCoords := []
ImageSearch, x, y, 100, 100, 900, 900, % A_ScriptDir "\imgage.png"
if (x) {
obj := {}
obj.x := x
obj.y := y
allCoords.push(obj)
}
- 15 Sep 2020, 05:48
- Forum: Ask For Help
- Topic: Array for mouse coordinates.
- Replies: 8
- Views: 233
Re: Array for mouse coordinates.
how about saving each element as an object with x and y properties? I do this often:
Code: Select all
allCoords := [{x:200, y:100}, {x:1000, y:800}]
for _, obj in allCoords {
msgbox, % obj.x " and " obj.y
}
- 07 Sep 2020, 23:52
- Forum: Ask For Help
- Topic: Is there an equivalent of InStr() in array
- Replies: 4
- Views: 161
Re: Is there an equivalent of InStr() in array
https://biga-ahk.github.io/biga.ahk/#/?id=includes works on arrays, objects, and strings A.includes([1, 2, 3], 1) ; => true A.includes({ "a": 1, "b": 2 }, 1) ; => true A.includes("InStr", "Str") ; => true https://biga-ahk.github.io/biga.ahk/#/?id=indexof retrns the location in the array the needle i...
- 07 Sep 2020, 11:57
- Forum: Ask For Help
- Topic: Returning Bools as literal expressions. Could you show a good use-case for it? Topic is solved
- Replies: 10
- Views: 141
Re: Returning Bools as literal expressions. Could you show a good use-case for it? Topic is solved
this thread is not about personal preferences. I'm just looking for an example that will correctly illustrate what JimPerry talked about. So you just want a function that is more complex than isBigger() ? How about a function that checks 3 or 4 conditions? return (device.countryOfOrigin == "USA" &&...
- 07 Sep 2020, 10:52
- Forum: Ask For Help
- Topic: Returning Bools as literal expressions. Could you show a good use-case for it? Topic is solved
- Replies: 10
- Views: 141
Re: Returning Bools as literal expressions. Could you show a good use-case for it? Topic is solved
I think the there is an argument that yourself in the future should also be considered another person.
https://twitter.com/_ericelliott/status/668459407987052544
https://twitter.com/_ericelliott/status/668459407987052544
Program readability is much more important than program writability. Be kind to your future self, and your team.
- 07 Sep 2020, 10:50
- Forum: Ask For Help
- Topic: Returning Bools as literal expressions. Could you show a good use-case for it? Topic is solved
- Replies: 10
- Views: 141
Re: Returning Bools as literal expressions. Could you show a good use-case for it? Topic is solved
Return True and Return False seems way easier to read so I'll say it's almost always justified if the code needs to be maintained by more than one person.
- 07 Sep 2020, 05:07
- Forum: Ask For Help
- Topic: Problem referencing a class variable including another variable.
- Replies: 13
- Views: 795
Re: Problem referencing a class variable including another variable.
Why can't I click the object without this line? ob[A1] := {} ;Why it is necessary ob := {} A1 := "A_S" ob[A1] := {} ;Why it is necessary ob[A1].A1 := "try" ;It should have worked without the above line. MsgBox % ob[A1].A1 return The reason is you can't start assigning property values to something t...
- 06 Sep 2020, 10:34
- Forum: Ask For Help
- Topic: Is it possible to send a string of numbers between 0000 and 9999 but not have the random string repeated?
- Replies: 5
- Views: 108
Re: Is it possible to send a string of numbers between 0000 and 9999 but not have the random string repeated?
You can also generate 0000 through 9999 (or text) into an array; then pull them out at random, the number will not be repeated as each is unique and only in the array. Of course this is assuming you want to send them all, otherwise there is a point at which generating at random would be more efficie...
- 04 Sep 2020, 01:48
- Forum: Ask For Help
- Topic: AutoHotkey Tutoring Request? $40/hour session
- Replies: 6
- Views: 194
Re: AutoHotkey Tutoring Request? $40/hour session
I cannot cover everything you need in one hour.
- 03 Sep 2020, 10:15
- Forum: Scripts and Functions
- Topic: [Class] permutations.ahk
- Replies: 6
- Views: 520
Re: [Class] permutations.ahk
Not sure how to better explain this in the readme but it needs to happen. "%A_ScriptDir%\node_modules" is just a directory packages are sent to when using the package manager. If you are manually downloading the library, you can put export.ahk anywhere AHK uses naturally ( https://www.autohotkey.com...
- 02 Sep 2020, 15:07
- Forum: Scripts and Functions
- Topic: [Class] permutations.ahk
- Replies: 6
- Views: 520
Re: [Class] permutations.ahk
I'm afraid I don't understand the question.
The source is open; so modification is absolutely possible, and encouraged.
The source is open; so modification is absolutely possible, and encouraged.
- 01 Sep 2020, 09:48
- Forum: Ask For Help
- Topic: Duplicate Variable Errors
- Replies: 4
- Views: 159
Re: Duplicate Variable Errors
I hacked the exe and I'm getting the same error. You need to fix this asap
- 31 Aug 2020, 22:39
- Forum: Scripts and Functions
- Topic: [Class] string-similarity.ahk
- Replies: 22
- Views: 4918
Re: [Class] string-similarity.ahk
v1.0.4 has been published.
Functionally there is no change.
In the unlikely event someone isn't using SetBatchLines, -1; most methods will set that, perform what it needs to, then resume the previous SetBatchLines speed before returning the output.
Also cleaned up some of the tests.
Functionally there is no change.
In the unlikely event someone isn't using SetBatchLines, -1; most methods will set that, perform what it needs to, then resume the previous SetBatchLines speed before returning the output.
Also cleaned up some of the tests.
- 31 Aug 2020, 22:26
- Forum: Scripts and Functions
- Topic: [Library] Neutron.ahk - AutoHotkey Web GUIs on Steroids
- Replies: 64
- Views: 13821
Re: [Library] Neutron.ahk - AutoHotkey Web GUIs on Steroids
No body mentions about how to create an additional gui using neutron. This seems to work: neutron := new NeutronWindow() ; neutron.load("html\index.html") neutron.Show("w2080 h1000") neutron.Maximize() neutron2 := new NeutronWindow() ; neutron2.load("html\index.html") neutron2.Show("w2080 h1000") n...