Search found 86 matches

by ahketype
12 May 2020, 07:04
Forum: Ask For Help
Topic: Trying to create a gradual script (I think)
Replies: 16
Views: 562

Re: Trying to create a gradual script (I think)

Oh I think I see now - it is a normal variable, and it's assigned inside the conditional. I didn't realise you could do that.

At first I was reading it as IF (No = (Max=A_Index)), like that was testing the end of the array. :lolno:
by ahketype
12 May 2020, 07:01
Forum: Ask For Help
Topic: Trying to create a gradual script (I think)
Replies: 16
Views: 562

Re: Trying to create a gradual script (I think)

@Rohwedder Waaaaaa? :o

I just realised I had no idea what Max:=A_Index was doing in there. I've found the maths function, Max(), but it doesn't mention that syntax. It looks like an ordinary variable, but can't be or it wouldn't loop, presumably, via the Mod() parameter No := Mod(No,Max).
by ahketype
12 May 2020, 05:59
Forum: Ask For Help
Topic: Trying to create a gradual script (I think)
Replies: 16
Views: 562

Re: Trying to create a gradual script (I think)

another idea: 1:: No++ Loop, Parse,% " ( cvcv bitis t/animdur t/l cc{space}{!}{space}vvv )",`n IF (No = Max:=A_Index) SendInput,%A_LoopField%{Enter} No := Mod(No,Max) Return :bravo: I suppose this might be better than your first because it's not sitting inside the hotkey block waiting for key-ups a...
by ahketype
12 May 2020, 05:54
Forum: Ask For Help
Topic: Trying to create a gradual script (I think)
Replies: 16
Views: 562

Re: Trying to create a gradual script (I think)

@boiler Nup, afraid not. Just doesn't seem to do anything. I'm not sure why.
by ahketype
12 May 2020, 05:47
Forum: Ask For Help
Topic: Purpose of curly brackets for multiline hotkeys?
Replies: 6
Views: 361

Re: Purpose of curly brackets for multiline hotkeys?

Yes, I am sure that they don’t behave the same, as the two scripts I showed indicate. In the case of the Return, it returned back to where the script continued and the “goodbye” message was shown. In the case of the Exit, it instead exits the thread, and since there are no hotkeys or anything else ...
by ahketype
12 May 2020, 05:36
Forum: Ask For Help
Topic: Trying to create a gradual script (I think)
Replies: 16
Views: 562

Re: Trying to create a gradual script (I think)

Welcome dombiskerem. Your English is good enough, I think! Rohwedder has given a good answer. You can also make it just run once if you put ExitApp instead of Return (or there are other ways to control when and how a script runs - you might only want it happening on one window type, etc.). Sorry, BN...
by ahketype
12 May 2020, 04:43
Forum: Ask For Help
Topic: Purpose of curly brackets for multiline hotkeys?
Replies: 6
Views: 361

Re: Purpose of curly brackets for multiline hotkeys?

I'm pretty confused what all that means in practice. I just always use ExitApp if I want to quit the script and Return to end subroutines. I'm not sure what the other use of Exit would like that doesn't kill the script.
by ahketype
12 May 2020, 04:27
Forum: Ask For Help
Topic: Purpose of curly brackets for multiline hotkeys?
Replies: 6
Views: 361

Re: Purpose of curly brackets for multiline hotkeys?

boiler Are you sure? https://www.autohotkey.com/docs/commands/Exit.htm Well, yes you're right it's not about functions, as far as I can tell, but it says "If the script has no hotkeys, isn't persistent, and hasn't requested NumLock/ScrollLock/CapsLock to be kept AlwaysOn or AlwaysOff, it will termi...
by ahketype
11 May 2020, 20:02
Forum: Ask For Help
Topic: GuiControl, Focus - why isn't this working?
Replies: 2
Views: 215

Re: GuiControl, Focus - why isn't this working?

HotKeyIt wrote:
11 May 2020, 19:54

Code: Select all

GuiControl, 2:Focus, TagChoice
Thank you, HotKeyIt. I've been struggling with that all day, and I'm starting to worry about my brain. :bravo: :dance: :yawn:
by ahketype
11 May 2020, 19:42
Forum: Ask For Help
Topic: GuiControl, Focus - why isn't this working?
Replies: 2
Views: 215

GuiControl, Focus - why isn't this working?

If you run this first script, it's mostly self-explanatory. I've taken it out of a longer script with two windows. The problem is in the second window. This has an Edit control, where I want to be able to type, then hit the Down key, whereupon I'm trying to get it to switch focus to the ListBox belo...
by ahketype
11 May 2020, 17:12
Forum: Ask For Help
Topic: Simple question on integers and math with AHK
Replies: 17
Views: 859

Re: Simple question on integers and math with AHK

;- integer=True if Var is non-empty and contains a purely numeric string (decimal or hexadecimal) without a decimal point. ;- Leading and trailing spaces and tabs are allowed. The string may start with a plus or minus sign. If division , I see result >> 2.000000 ( I want see = 2 ) , so it's never i...
by ahketype
11 May 2020, 16:54
Forum: Ask For Help
Topic: Simple question on integers and math with AHK
Replies: 17
Views: 859

Re: Simple question on integers and math with AHK

Oh, drat, my bad. I've messed up this whole thread! Should I just delete my posts here, do you think? No, please don't delete/empty them in the future! That's against the forum rules . Others might have reacted to your posts and now the context is broken. People are here to learn - you are allowed ...
by ahketype
11 May 2020, 10:51
Forum: Ask For Help
Topic: Simple question on integers and math with AHK
Replies: 17
Views: 859

Re: Simple question on integers and math with AHK

@ahketype, (value is integer) is concatenation of three variables. As was mentioned, is is not supported in expressions. Cheers. Oh, drat, my bad. I've messed up this whole thread! Should I just delete my posts here, do you think? Edited to add: I've deleted my earlier attempts - AHK keeps surprisi...
by ahketype
11 May 2020, 10:47
Forum: Ask For Help
Topic: Simple question on integers and math with AHK
Replies: 17
Views: 859

Re: Simple question on integers and math with AHK

[Deleted, as incorrect advice.]
by ahketype
11 May 2020, 09:23
Forum: Ask For Help
Topic: Simple question on integers and math with AHK
Replies: 17
Views: 859

Re: Simple question on integers and math with AHK

[Deleted, as incorrect advice.]
by ahketype
11 May 2020, 09:06
Forum: Ask For Help
Topic: Simple question on integers and math with AHK
Replies: 17
Views: 859

Re: Simple question on integers and math with AHK

[Deleted, as incorrect advice.]
by ahketype
11 May 2020, 04:08
Forum: Ask For Help
Topic: Simple question on integers and math with AHK
Replies: 17
Views: 859

Re: Simple question on integers and math with AHK

[Deleted, as incorrect advice.]
by ahketype
10 May 2020, 16:08
Forum: Ask For Help
Topic: How to read in lines of text and separate by blank lines?
Replies: 3
Views: 308

Re: How to read in lines of text and separate by blank lines?

To check the data for those extra linebreaks or spaces, you could replace the output bit with: Loop % Bits.MaxIndex() { out := Bits[A_Index] out := StrReplace(out, "`n", "|`n") out := StrReplace(out, " ", "^") MsgBox % out } The pipe "|" will show the extra linebreaks (but leaving in `n helps make i...
by ahketype
10 May 2020, 15:39
Forum: Ask For Help
Topic: How to read in lines of text and separate by blank lines?
Replies: 3
Views: 308

Re: How to read in lines of text and separate by blank lines?

Hi oman, Tricky problem. I'm not sure I understand what you're saying about the array and the lines, but I've had a go and this might be a bit of help. I've added a line with a decimal number on its own, which shows one of the problems with my solution, but you could probably fix it. s := " ( ABC de...
by ahketype
10 May 2020, 14:28
Forum: Ask For Help
Topic: Can't seem to get the focused control Topic is solved
Replies: 4
Views: 349

Re: Can't seem to get the focused control Topic is solved

Thanks garry! It's my window handling. You actually misunderstood the question, but your second example gave me the answer - I didn't realise I had to specify the GUI window in FocusV (etc., presumably). I.e. my line should read GuiControlGet, where, Tags:FocusV not GuiControlGet, where, FocusV beca...

Go to advanced search