Search found 548 matches

by toralf
14 Apr 2019, 02:27
Forum: Ask For Help
Topic: Which is the best way to enumerate array elements? Topic is solved
Replies: 35
Views: 743

Re: Which is the best way to enumerate array elements? Topic is solved

I disagree with Klarions statement that coding in AHK is painful. And that the for loop is in real world slower then the plain loop loop.
I will give no reason since I do not believe that this will help in this thread. But state personal opinion.
by toralf
14 Apr 2019, 02:09
Forum: Ask For Help
Topic: Changing script to calculate new date based on days
Replies: 16
Views: 293

Re: Changing script to calculate new date based on days

That sounds like you need a full GUI to do it. - calendar control for the start day - 2 Radio Button or a drop down list for the workday/calendar days - edit field for the days - checkbox to turn on holiday consideration If you do not want that then you may need to define several Hotkeys (e.g. to to...
by toralf
12 Apr 2019, 05:23
Forum: Ask For Help
Topic: parsing AutoHotkey scripts
Replies: 13
Views: 736

Re: parsing AutoHotkey scripts

What do you mean with the word “anything”?
My parser already detects a lot.
What do you want to achieve? And why?
Or is this just an accidentally trial to see what is needed to detect everything?
by toralf
11 Apr 2019, 16:45
Forum: Ask For Help
Topic: parsing AutoHotkey scripts
Replies: 13
Views: 736

Re: parsing AutoHotkey scripts

Flow control with curly braces is recognized by my parser. It is easy to identify since they have to be first in a line or for a few commands the opening brace could be on the last character (OTB).
Why do you want to parse obj.key and {} or [] assignments?
by toralf
11 Apr 2019, 14:18
Forum: Ask For Help
Topic: Object Centered In Gui Topic is solved
Replies: 8
Views: 207

Re: Object Centered In Gui Topic is solved

I believe you an add the control just normally to a hidden GUI, get its size and location relative to the screen. Do the Math, move the control and then show the gui
by toralf
11 Apr 2019, 14:04
Forum: Ask For Help
Topic: parsing AutoHotkey scripts
Replies: 13
Views: 736

Re: parsing AutoHotkey scripts

continuation sections and hotkeys/hotstrings Are not really a problem I believe. But currently commands and variables are not identified. Commands might be easy since they are either followed by a space or comma and something that is not an operator. To identify variables seems to me more difficult ...
by toralf
11 Apr 2019, 00:28
Forum: Ask For Help
Topic: parsing AutoHotkey scripts
Replies: 13
Views: 736

Re: parsing AutoHotkey scripts

In which respect do you want to receive comments?
I believe the code is well commented.
The only thing that the code doesn’t do it to identify user variables
by toralf
03 Apr 2019, 15:35
Forum: Ask For Help
Topic: Aligning text in gui
Replies: 4
Views: 171

Re: Aligning text in gui

You could use a relative offset with y+30 or yp+30 I assume
by toralf
01 Apr 2019, 12:05
Forum: Ask For Help
Topic: Lightroom AHK commission - coders needed
Replies: 2
Views: 241

Re: Lightroom AHK commission - coders needed

What software is needed for testing the script(s)?
I assume Lightroom. Any other required?
Do you consider the code proprietary? Or is it open source?
by toralf
31 Mar 2019, 16:00
Forum: Ask For Help
Topic: GUI: input to text file?
Replies: 8
Views: 293

Re: GUI: input to text file?

Iirc there is something like a z order. You might search for this on this forum.
by toralf
30 Mar 2019, 14:41
Forum: Ask For Help
Topic: No IfIn for a simple array?
Replies: 21
Views: 393

Re: No IfIn for a simple array?

You will have to use the xml values as keys in the AHK associated Array
by toralf
30 Mar 2019, 08:04
Forum: Ask For Help
Topic: No IfIn for a simple array?
Replies: 21
Views: 393

Re: No IfIn for a simple array?

If the check (IfIn) is required more often. You can have the normal Array as you have right now and create a Value Array where the values are the keys. Then you can check in the values Array. Of course, you’ Have to keep the two arrays in sync.

Ps: the value Array could have the xml path as values
by toralf
30 Mar 2019, 07:33
Forum: Ask For Help
Topic: No IfIn for a simple array?
Replies: 21
Views: 393

Re: No IfIn for a simple array?

If you could put the values as keys (they must be unique) then you could use .HasKey()
by toralf
11 Mar 2019, 01:55
Forum: Ask For Help
Topic: SCI_REPLACESEL for Notepad++
Replies: 6
Views: 200

Re: SCI_REPLACESEL for Notepad++

Thanks for the tip. It worked.

Code: Select all

BufferSize := StrPut(Text, "UTF-8")
	vOutput := ""
	VarSetCapacity(vOutput, BufferSize+1, 0)
	StrPut(Text, &vOutput, "UTF-8")
by toralf
11 Mar 2019, 01:46
Forum: Ask For Help
Topic: SCI_REPLACESEL for Notepad++
Replies: 6
Views: 200

Re: SCI_REPLACESEL for Notepad++

how could i do this?
by toralf
11 Mar 2019, 01:39
Forum: Ask For Help
Topic: SCI_REPLACESEL for Notepad++
Replies: 6
Views: 200

Re: SCI_REPLACESEL for Notepad++

I tried to write to memory, but i didn't succeed. A selection gets replaced, but with nothing. SCI_REPLACESEL(text){ hNpp := DllCall("FindWindow" , "Str", "Notepad++" , "Int", 0 , "Ptr") ControlGet hSci, Hwnd,, Scintilla1, % "ahk_id" hNpp NppPID := NPPM_PID() hProcess := DllCall("OpenProcess" , "UIn...
by toralf
10 Mar 2019, 14:19
Forum: Ask For Help
Topic: SCI_REPLACESEL for Notepad++
Replies: 6
Views: 200

Re: SCI_REPLACESEL for Notepad++

It does work when i send numbers

Code: Select all

SCI_GotoLine(Line){
  DllCall("SendMessage", "Ptr", SCI_HWND(), "UInt", 2024 , "Int", Line - 1, "Int", 0)
}
SCI_GOTOPOS(Pos){
  DllCall("SendMessage", "Ptr", SCI_HWND(), "UInt", 2025 , "Int", Pos, "Int", 0)
}
by toralf
10 Mar 2019, 14:07
Forum: Ask For Help
Topic: SCI_REPLACESEL for Notepad++
Replies: 6
Views: 200

SCI_REPLACESEL for Notepad++

I would like to replace the selction in notepad++ with a text. SCI_REPLACESEL(text){ ;2170 ; SCI_REPLACESEL(<unused>, const char *text) ; The currently selected text between the anchor and the current position is replaced by the 0 terminated text string. If the anchor and current position are the sa...

Go to advanced search