Search found 112 matches

by Sam_
24 Jan 2020, 18:02
Forum: Tutorials
Topic: How to optimize the speed of a script as much as possible.
Replies: 102
Views: 80423

Re: How to optimize the speed of a script as much as possible.

What is the specific mechanism I need to initiate through AHK to push CPU rate up to at least x2 or ~50% or even more than this ? AHK is single threaded. Each instance of a running script will only ever use a single CPU core. You can SetBatchLines to -1 and change the process priority to above norm...
by Sam_
09 Jan 2020, 15:26
Forum: Scripts and Functions
Topic: MemoryFileIO
Replies: 15
Views: 1957

Re: MemoryFileIO

It's not released under any particular license. Feel free to assume WTFPL, so you're welcome to do what you want with it, including rename it. I believe that legally, if the author doesn't specify a license, than the most restrictive rules on copyright apply. If the author wants to allow for libera...
by Sam_
08 Jan 2020, 12:58
Forum: Ask For Help
Topic: Simplifying an A_Args parse?
Replies: 6
Views: 390

Re: Simplifying an A_Args parse?

Instead of defining the individual vars as global, I would suggest to set an Settings object as super global and fill it with the command line parameters. Agreed. Global Settings:={} A_Args:=["asdf","jkl","abcd"] ; Just for this example For Index, Value in A_Args Settings[Value]:=1 MsgBox % Setting...
by Sam_
07 Jan 2020, 17:47
Forum: Ask For Help
Topic: Simplifying an A_Args parse?
Replies: 6
Views: 390

Re: Simplifying an A_Args parse?

From docs : Also note that it is not currently possible to declare a dynamic variable such as global Array%i%. Prevents you from doing For Index, Value in A_Args Global %Value%:=1 Which sounds like what you want. Use Switch or make it a bit faster and concise For Index, Value in A_Args { If (Value="...
by Sam_
29 Nov 2019, 15:34
Forum: Tutorials
Topic: How to optimize the speed of a script as much as possible.
Replies: 102
Views: 80423

Re: How to optimize the speed of a script as much as possible.

What is the specific mechanism I need to initiate through AHK to push CPU rate up to at least x2 or ~50% or even more than this ? AHK is single threaded. Each instance of a running script will only ever use a single CPU core. You can SetBatchLines to -1 and change the process priority to above norm...
by Sam_
28 Nov 2019, 20:05
Forum: Tutorials
Topic: How to optimize the speed of a script as much as possible.
Replies: 102
Views: 80423

Re: How to optimize the speed of a script as much as possible.

Anyone have problems with an AHK script that at first sight works (in my case it's a RegExReplace function), but after a few parses the file (or appended file) will reduce to 0kb? I'm running 1 ahk regex script on a file that's a little bit over 1000kb. I can delete data from these files or apply t...
by Sam_
27 Jul 2019, 09:25
Forum: Offtopic
Topic: utilities/websites to test a PC's speed
Replies: 3
Views: 906

Re: utilities/websites to test a PC's speed

MATLAB's bench() function, with a few iterations.
by Sam_
19 Jul 2019, 13:27
Forum: Scripts and Functions
Topic: [CLASS] CtlColors - color your controls (2017-10-30)
Replies: 44
Views: 15813

Re: [CLASS] CtlColors - color your controls (2017-10-30)

I am trying to change the background color of some edit controls. This works great if the control's parent is the window, but it doesn't seem to work if their parent is another control on the window. FWIW, I can't get CColor to work either. I can create the edit controls as children of the window, c...
by Sam_
18 Jul 2019, 15:17
Forum: Ask For Help
Topic: adapting majkinetor's FormsFramework Panel for 64-bit
Replies: 2
Views: 336

Re: adapting majkinetor's FormsFramework Panel for 64-bit

assuming procAdr:=RegisterCallback("Panel_WndProc") gave u back a valid ptr to an existing function, check if ur WNDCLASSEX offsets are correct. id hardcode them procAdr:= RegisterCallback ("Panel_WndProc") returns a number and not an empty string, so so presumably it works. I tried following the f...
by Sam_
18 Jul 2019, 13:27
Forum: Ask For Help
Topic: adapting majkinetor's FormsFramework Panel for 64-bit
Replies: 2
Views: 336

adapting majkinetor's FormsFramework Panel for 64-bit

I'm trying to add 64-bit support to majkinetor's FormsFramework Panel , but I can't quite get it to work correctly. (If this has already been done by someone, please point me to it!) What I have so far is: Panel_registerClass() { static CS_PARENTDC:=0x80, CS_REDRAW:=3, COLOR_WINDOW:=5 clsName:="Pane...
by Sam_
17 Jul 2019, 13:46
Forum: Scripts and Functions
Topic: [Class] Toolbar - Create and modify (Updated 03/17/2016)
Replies: 54
Views: 17575

Re: [Class] Toolbar - Create and modify (Updated 03/17/2016)

BGM wrote:
17 Jul 2019, 11:51
@Sam Did you try my fix just above yours? I had come to the same conclusion about the error in StringToNumber. I would be interested to see if it works out for you.
I did try it, but it didn't help since I was trying to use strings, not numbers.
by Sam_
12 Jul 2019, 09:01
Forum: Scripts and Functions
Topic: [Class] Toolbar - Create and modify (Updated 03/17/2016)
Replies: 54
Views: 17575

Re: [Class] Toolbar - Create and modify (Updated 03/17/2016)

I have been running into some issues while trying to use this class to add a Toolbar to my GUI. I believe I have traced the issues to the StringToNumber() method returning the same number for different strings (the Command IDs are not unique thus the target labels get messed up). It looks like this ...
by Sam_
10 Jul 2019, 10:05
Forum: Ask For Help
Topic: Any MS Paint-like programs written in AHK?
Replies: 1
Views: 317

Any MS Paint-like programs written in AHK?

I am interested in any Microsoft Paint-like programs written in AHK. Has something like this ever been done? I know there are scattered functions and bits of code around the forums that do some relevant things with GDIPlus, but I don't know of anyone who has brought them together in a cohesive GUI i...
by Sam_
02 Jul 2019, 16:58
Forum: Ask For Help
Topic: spam shift
Replies: 1
Views: 390

Re: spam shift

I have learned how to do a couple of scripts but usually, I just copy paste how do I make a script to spam left shift. please and thank you. SpamLShift:=0 Return ^l:: SpamLShift:=1 While, SpamLShift Send, {LShift} Return Esc:: SpamLShift:=0 Return Use Ctrl+l to start spamming the left shift key and...
by Sam_
29 May 2019, 09:21
Forum: Wish List
Topic: A_Index0 Topic is solved
Replies: 15
Views: 2317

Re: A_Index0 Topic is solved

I have several large scripts that work with binary data structures (which are all 0-indexed). I store them as arrays for ease of manipulation, and to simplify things the arrays are also 0-indexed. This means that the first line of every loop in the script (and there are many) is Index:=A_Index-1 . I...
by Sam_
28 May 2019, 16:59
Forum: Tips and Tricks
Topic: Why you shouldn't use FileAppend to continuously write to the disk
Replies: 32
Views: 8323

Re: Why you shouldn't use FileAppend

What method do you use to deliberately crash the script? Ha! Slick -- I just figured it out. I thought CauseCrash() might be in a library or something. This is what came to mind: ;;; !!! Do not run this unless you want to crash the script !!! ;;; #Persistent SetTimer, CauseCrash, -1000 ; Will trigg...
by Sam_
28 May 2019, 09:44
Forum: Ask For Help
Topic: Program Not Running, wrong Syntax? Topic is solved
Replies: 5
Views: 597

Re: Program Not Running, wrong Syntax? Topic is solved

Can you also do a tiny explanation on why the asterisk needed to be changed? Third, depending on the context, I suppose the "*" I used might should be "\*" or "\*.*". I don't know that the change was necessary and the docs don't seem to go into that much detail on FilePattern. This suggestion was m...
by Sam_
24 May 2019, 13:12
Forum: Ask For Help
Topic: Program Not Running, wrong Syntax? Topic is solved
Replies: 5
Views: 597

Re: Program Not Running, wrong Syntax? Topic is solved

What jumps out at me right off the bat is that I doubt the following will do what you want msgbox, filecreatedir, I:\My Drive\Webcam\Webcam - Projects\%no%\%clipboard%\ [...] msgbox, filecopy, I:\My Drive\Webcam\Webcam - Template\New Webcam Project Template.xlsx, I:\My Drive\Webcam\Webcam - Projects...
by Sam_
22 May 2019, 16:09
Forum: Ask For Help
Topic: Remapping CTRL + h as backspace Topic is solved
Replies: 4
Views: 560

Re: Remapping CTRL + h as backspace Topic is solved

I have remapped Capslock as CTRL. I am also trying to use CTRL + h as backspace, i.e., deleting the first token left to the current cursor position: Capslock::Ctrl ^h:: send {BS} return Using the actual CTRL keys in combination with the h key does the job: If I hold the CTRL key and press the key, ...
by Sam_
22 May 2019, 15:02
Forum: Ask For Help
Topic: Making a key input rotate through four outputs
Replies: 4
Views: 414

Re: Making a key input rotate through four outputs

Thanks for this! Could we go one step further and make the first button press into a mouseclick before going to A then 1 then 2 and back to mouseclick? 1-2-3-4 were placeholders, sorry I should have been more specific More like this? WhatToSend:=["A",1,2] Idx:=0 Space:: If (Idx=0) { MouseClick ; ht...

Go to advanced search