Search found 1041 matches

by PuzzledGreatly
Yesterday, 22:34
Forum: Gaming
Topic: Problems quitting a script
Replies: 6
Views: 128

Re: Problems quitting a script

Thanks for the reply. Through trial and error I've traced the issue to a timer function. It's essentially the same function that I use in all my projects using a time limit: TimeFlow(i) { Global tim := i SetTimer, Flow, %tim% InPlay := A_TickCount settimer, rest, 100 return Flow: SetTimer, Flow, off...
by PuzzledGreatly
Yesterday, 20:49
Forum: Gaming
Topic: Problems quitting a script
Replies: 6
Views: 128

Re: Problems quitting a script

I spoke too soon, I still have a script that refuses to close until I actually click on the window or tab in the application bar. Even with the following changes: Byebye(x:=0) { if x exitapp if A_Thishotkey = F9 ExitApp,2 WinActivate, ahk_id %wise% if !Done msgbox, 4132, Byebye!, Really end the Game...
by PuzzledGreatly
28 Feb 2021, 18:22
Forum: Gaming
Topic: Problems quitting a script
Replies: 6
Views: 128

Re: Problems quitting a script

Thanks for the reply, Mikey. Done is a global variable declared at the top of the script outside the function. I thought: if A_thishotkey = F9 was the same as: if (A_thishotkey = "F9") That bit of the code works as expected. I changed the end of the script to force it to activate before closing and ...
by PuzzledGreatly
23 Feb 2021, 21:39
Forum: Gaming
Topic: Problems quitting a script
Replies: 6
Views: 128

Problems quitting a script

I have a script that uses a function to quit: GuiEsape: ByeBye() Return Byebye(x:=0) { if x exitapp if A_Thishotkey = F9 ExitApp,2 if !Done msgbox, 4132, Byebye!, Really end the Game? ifmsgbox no return exitapp } The idea is that if the user presses escape before the global done variable is set the ...
by PuzzledGreatly
21 Feb 2021, 21:11
Forum: Ask For Help
Topic: Using regexmatch for and/or searches.
Replies: 5
Views: 105

Re: Using regexmatch for and/or searches.

for efficiency if var ~= "\A(?=[^\t]*\t)(?=[^[\]\*]*[[\]\*])" this says: check if there's at least one tab. if there is, proceed check if there's at least one of [ , ] or * Thanks, swagfag, your reply came in while I was replying to Mikey. This is more like what I was expecting though I'm still try...
by PuzzledGreatly
21 Feb 2021, 21:04
Forum: Ask For Help
Topic: Using regexmatch for and/or searches.
Replies: 5
Views: 105

Re: Using regexmatch for and/or searches.

Thanks Mikey, I've tested your code and it works but it's not what I was expecting and I can't figure it out.
by PuzzledGreatly
21 Feb 2021, 20:33
Forum: Ask For Help
Topic: Using regexmatch for and/or searches.
Replies: 5
Views: 105

Using regexmatch for and/or searches.

I want to determine if a string contains a tab and a [ or a] or a * in any order.. The following works but is not pure regex: if (Regexmatch(var, "\[|\]|\*") && instr(var,A_tab)) soundbeep How can this be written using just regex? I looked at the quick reference in the help file and think it's somet...
by PuzzledGreatly
16 Feb 2021, 04:26
Forum: Ask For Help
Topic: Prevent empty line in listview
Replies: 10
Views: 159

Re: Prevent empty line in listview

Thanks, just me. Now I need to work out the best way to use the information you've provided.
by PuzzledGreatly
13 Feb 2021, 06:08
Forum: Ask For Help
Topic: W10 Open file in exlore [off topic?] Topic is solved
Replies: 2
Views: 58

Re: W10 Open file in exlore [off topic?] Topic is solved

Thanks very much, boiler, that worked.
by PuzzledGreatly
12 Feb 2021, 19:56
Forum: Ask For Help
Topic: W10 Open file in exlore [off topic?] Topic is solved
Replies: 2
Views: 58

W10 Open file in exlore [off topic?] Topic is solved

I have a shortcut path should open a cdr (coreldraw) file in explorer, eg: file := "D:\test.cdr" ^e:: Run Explorer.exe /n`,/e`, "%file%" This is opening the test file in Coreldraw directly rather than opening explorer and highlighting the file. When Coreldraw is not running it even launches corelldr...
by PuzzledGreatly
12 Feb 2021, 19:45
Forum: Ask For Help
Topic: Prevent empty line in listview
Replies: 10
Views: 159

Re: Prevent empty line in listview

Thanks for your post, just me. What I'm trying to do is allow for a vertical scrollbar in the listview in situations where there are so many files that the listview could become larger than the vertical height of the monitor it is displayed on. Y is shorthand for A_screenheight. ZL is the height of ...
by PuzzledGreatly
12 Feb 2021, 05:01
Forum: Ask For Help
Topic: Prevent empty line in listview
Replies: 10
Views: 159

Re: Prevent empty line in listview

Did you try the R option ? I didn't want to use the r option because I want to create fat rows as per this post . I found a kind of solution which is to hide the scrollbars if the number of items is less than five: if t < 5 Gui, add, listview, count%t% h%ZV% w%ZT% Altsubmit -hdr gPack 0x2000 , Name...
by PuzzledGreatly
12 Feb 2021, 03:50
Forum: Ask For Help
Topic: Prevent empty line in listview
Replies: 10
Views: 159

Re: Prevent empty line in listview

AHKStudent wrote:
12 Feb 2021, 03:22
try to add

Code: Select all

if (A_LoopField = "")
   Continue
before the lv_add line
Thanks for the suggestion. I added the code but still get the extra space. I now think it's something to do with the height calculation rather than the number of items.
by PuzzledGreatly
12 Feb 2021, 02:30
Forum: Ask For Help
Topic: Prevent empty line in listview
Replies: 10
Views: 159

Re: Prevent empty line in listview

I did not try the script, but it sounds like you want to skip LV_Add if some condition is true-- so you can add that condition before the LV_Add. Thanks for the reply, Mikey. I already did. The problem is that when there are less than five text files the script adds an extra line to listview and I ...
by PuzzledGreatly
11 Feb 2021, 20:42
Forum: Ask For Help
Topic: Prevent empty line in listview
Replies: 10
Views: 159

Prevent empty line in listview

I have a function containing a gui with a listview. With one folder containing 1o text files, 1 ahk file, 1 exe file and a folder it works as intended giving me a listview with 10 items (the text files) and no sroll bars. But when I run the same function with a folder containg just 2 text files, 1 a...
by PuzzledGreatly
04 Feb 2021, 23:34
Forum: Ask For Help
Topic: Set windows 10 pointer style using AHK?
Replies: 2
Views: 95

Re: Set windows 10 pointer style using AHK?

Thanks, that's a big help. I think I will use click to automate clicking the buttons to reset the pointer.
by PuzzledGreatly
04 Feb 2021, 21:53
Forum: Ask For Help
Topic: Set windows 10 pointer style using AHK?
Replies: 2
Views: 95

Set windows 10 pointer style using AHK?

Since moving to windows 10 Every so often my pointer changes its size and becomes huge. I then need to navigate to pointer in Ease of Access settings and change it. I've no idea why it changes (I think it's a W10 bug) but a shortcut method to set the pointer size would be useful. Is that possible wi...
by PuzzledGreatly
03 Feb 2021, 20:24
Forum: Ask For Help
Topic: Help with exclusion logic, please
Replies: 3
Views: 556

Re: Help with exclusion logic, please

Thanks Mikey, but I couldn't get your example to work. Either my version didn't exclude the point I wanted or didn't exclude any point.
by PuzzledGreatly
03 Feb 2021, 05:25
Forum: Ask For Help
Topic: Help with exclusion logic, please
Replies: 3
Views: 556

Help with exclusion logic, please

I'm using pixelsearch to create a search condition. However, there is one point that matches the pixel colour I am searching for that I also want to exclude. How to create the if statement? I tried this: guicontrolget, squ, pos Pixelsearch, px,py, squx + (squw/2), squy + (squh * 0.95), squx + (squw/...
by PuzzledGreatly
02 Feb 2021, 22:35
Forum: Ask For Help
Topic: Gui, hide/show problem
Replies: 4
Views: 103

Re: Gui, hide/show problem

If I make ren and red global it works. I don't understand why.

Go to advanced search