Search found 30 matches
- 08 Jun 2022, 19:26
- Forum: Ask for Help (v1)
- Topic: random pick 3 squares in grid Topic is solved
- Replies: 10
- Views: 1154
Re: random pick 3 squares in grid Topic is solved
use https://biga-ahk.github.io/biga.ahk/#/?id=samplesize to select three random elements from the array(no duplicates); then click each one. You can also shuffle the array of coordinates and the first or last three will be both random, and non-repeating. Vanilla ahk is a little more difficult; but ...
- 08 Jun 2022, 13:30
- Forum: Ask for Help (v1)
- Topic: random pick 3 squares in grid Topic is solved
- Replies: 10
- Views: 1154
Re: random pick 3 squares in grid Topic is solved
I got that work fine thanks..
How do I pic 3 sets of coordinates without picking the same one twice ?
How do I pic 3 sets of coordinates without picking the same one twice ?
- 08 Jun 2022, 07:08
- Forum: Ask for Help (v1)
- Topic: random pick 3 squares in grid Topic is solved
- Replies: 10
- Views: 1154
Re: random pick 3 squares in grid Topic is solved
I apologize this is probably the most advanced way to handle it; but you will learn objects on the way :) and I also think it is the most scalable to click more locations. If we save one set of coordinates and click on them like so: setOfCoords := {x: 100, y: 333} click, % setOfCoords.x " " setOfCo...
- 07 Jun 2022, 15:14
- Forum: Ask for Help (v1)
- Topic: random pick 3 squares in grid Topic is solved
- Replies: 10
- Views: 1154
random pick 3 squares in grid Topic is solved
So I have a 3 x 3 grid of squares - buttons - pictures etc. I want to click 3 of the squares randomly I know how to do picture search and move and click, I just cant seem to work out how or where to start with the logic. Also how to turn say, a random number into executing a particular action, i.e m...
- 08 Nov 2020, 07:06
- Forum: Scripts and Functions (v1)
- Topic: Using AutoHotkey from Python
- Replies: 24
- Views: 30894
Re: Using AutoHotkey from Python
I'm shifting to a combination of AHK and python atm so I'll watch this thread
- 08 Feb 2020, 08:44
- Forum: Ask for Help (v1)
- Topic: Split text block into random amount of words Topic is solved
- Replies: 7
- Views: 827
Re: Split text block into random amount of words Topic is solved
@Odlanir
That is insane lol So simple and yet so perfect for the task I need it for .. many many thanks mate
That is insane lol So simple and yet so perfect for the task I need it for .. many many thanks mate
- 07 Feb 2020, 16:11
- Forum: Ask for Help (v1)
- Topic: Split text block into random amount of words Topic is solved
- Replies: 7
- Views: 827
Re: Split text block into random amount of words Topic is solved
Thanks Odlanir ! I'll give that a try when I get home and let you know how it goes.. again many thanks for the help
- 07 Feb 2020, 12:23
- Forum: Ask for Help (v1)
- Topic: Split text block into random amount of words Topic is solved
- Replies: 7
- Views: 827
Re: Split text block into random amount of words Topic is solved
Opening files and reading into a array I can do i thought there might be a simple regex formula for counting spaces and then stopping, I might try a .slpit function and pass it back to the txt file. I'll post what i have when I've got my head around regex.
- 06 Feb 2020, 11:16
- Forum: Ask for Help (v1)
- Topic: Split text block into random amount of words Topic is solved
- Replies: 7
- Views: 827
Split text block into random amount of words Topic is solved
I have some large text blocks and I want to split then into lines with a set or random amount of words SO my sudo is Open textX file Loop until words remaining is less than 15 (length of string) Count 15 - 20 spaces (in between word space) String = Words(count) Add full stop Carriage return Loop Sav...
- 04 Apr 2018, 13:08
- Forum: Ask for Help (v1)
- Topic: Delete value in array after use question
- Replies: 7
- Views: 1377
Re: Delete value in array after use question
Hi Xtra , is it a method or function or is it a variable ?Xtra wrote:counter++ increments the counting of the number of non-empty values we are going to write to the file.
If there are no values it does not count them.
If there is nothing counted it skips writing to file which would be a blank line.
HTH
- 04 Apr 2018, 10:59
- Forum: Ask for Help (v1)
- Topic: Delete value in array after use question
- Replies: 7
- Views: 1377
Re: Delete value in array after use question
I'm having a problem working out what this part of the code is
counter++
I dont understand what it is ?
counter++
I dont understand what it is ?
- 26 Mar 2018, 14:37
- Forum: Ask for Help (v1)
- Topic: Random and functions ?
- Replies: 2
- Views: 755
Re: Random and functions ?
Thanks I'll try this outBoBo wrote:Not tested.Code: Select all
Sleep % Rand(30,60) SoundBeep Sleep % Rand(15,30) SoundBeep Sleep % Rand(0.5,2) SoundBeep MsgBox % Rand(200,300) F12::MouseMove, Rand(0,A_ScreenWidth), Rand(0,A_ScreenHeight) Rand(min,max) { Random, res, min, max Return res * 1000 }
- 26 Mar 2018, 10:39
- Forum: Ask for Help (v1)
- Topic: Random and functions ?
- Replies: 2
- Views: 755
Random and functions ?
I didn't know what to put in the title sorry.. What I have is a random number ( used for a random time of pause) generated using Random.. which works great . Random, RandPause30to60, 30000, 60000 Sleep, %RandPause30to60% I'm trying to pair down the code as I find myself having to Run the Random gene...
- 18 Mar 2018, 16:47
- Forum: Ask for Help (v1)
- Topic: Delete value in array after use question
- Replies: 7
- Views: 1377
Re: Delete value in array after use question
Not tested: #NoEnv OnExit, saveDataAndExit ; auto save fileName := "C:\Users\Administrator\Documents\text_text.txt" ; Original file tempName := "C:\Users\Administrator\Documents\text_text.tmp" ; Temp file Read_file: emails := EmailsArray := "" ; Clear if FileExist(tempName) { FileRead, emails, % te...
- 18 Mar 2018, 15:04
- Forum: Ask for Help (v1)
- Topic: Delete value in array after use question
- Replies: 7
- Views: 1377
Delete value in array after use question
Hi folks, I have a very simple piece of code that opens a text file writes the contents line by line into an array. Read_file: emails := "" Loop, Read, C:\Users\Administrator\Documents\text_text.txt { emails .= A_loopReadLineA_Space } EmailsArray := [] Loop, Parse, emails, %A_Space% { EmailsArray.Pu...
- 15 Mar 2018, 10:45
- Forum: Ask for Help (v1)
- Topic: Random array sometimes parses nothing ? Topic is solved
- Replies: 4
- Views: 1084
Re: Random array sometimes parses nothing ? Topic is solved
That's crazy :wtf: I just copied your code to test it and it works with the typo: AtArray4 := ["1","2","3","4","5"] Loop, 6 { Loop, 5 { Random, v%A_Index%, % AtArray4.MiniIndex(), % AtArray4.MaxIndex() } x%A_Index% = %v1%%v2%%v3%%v4%%v5% } msgbox %x1%`n%x2%`n%x3%`n%x4%`n%x5%`n%x6% ExitApp Returns: ...
- 15 Mar 2018, 10:32
- Forum: Ask for Help (v1)
- Topic: Random array sometimes parses nothing ? Topic is solved
- Replies: 4
- Views: 1084
Re: Random array sometimes parses nothing ? Topic is solved
That did it .. so many thanks OdlanirOdlanir wrote:You have a typo in your code, should be:Code: Select all
AtArray4.MinIndex()
- 15 Mar 2018, 10:15
- Forum: Ask for Help (v1)
- Topic: Random array sometimes parses nothing ? Topic is solved
- Replies: 4
- Views: 1084
Random array sometimes parses nothing ? Topic is solved
I have made and used some random output to text arrays with help from the forum. What I have found is that sometimes the array out puts nothing randomly the carries on and outputs the next array value fine. I'm using this : AtArray4 := ["1 ","2 ","3 ","4 "] Random, Rand, % AtArray4.MiniIndex(), % At...
- 27 Jul 2017, 15:19
- Forum: Ask for Help (v1)
- Topic: image detection and click above
- Replies: 1
- Views: 741
image detection and click above
Hi, I've had a lot of success with AHK, but I'm having a bit of trouble trying to work out how , after I find an image the mouse moves exactly.. so many pixels / mm etc above it and then clicks. I don't want it to find a second image as the same image appears everytime, but the image I'm searching f...
- 31 May 2017, 19:38
- Forum: Ask for Help (v1)
- Topic: I made a video about my question
- Replies: 8
- Views: 2298
Re: I made a video about my question
What I have been doing to get to grips with ahk is using Pulover's macro maker, I'm not a programmer never will be, but my approach is simple, I record what I want to do and then go through the code of the script it creates and attempt to simplify it. Now after only 5 days I'm using com's and expres...