Search found 327 matches

by KuroiLight
16 Jul 2018, 22:13
Forum: Ask for Help (v1)
Topic: call AHK script from .BAT or .PS1 and capture errorcode?
Replies: 8
Views: 3113

Re: call AHK script from .BAT or .PS1 and capture errorcode?

just an after thought, for powershell you can do (Start-Process -FilePath './cmdtest.ahk' -PassThru -Wait).ExitCode and call cmd /c "cmdtest.ahk" for cmdprompt
by KuroiLight
16 Jul 2018, 21:52
Forum: Scripts and Functions (v1)
Topic: [Class] LogClass - Logging and log file management class
Replies: 12
Views: 7942

Re: [Class] LogClass - Logging and log file management class

More extensive than mine, I may take some ideas from it :P, I like that its really customizable. heres mine for reference: ;create LogFile obj -> 'myLogFile := new LogFile()' ;delete LogFile obj -> 'myLogFile := myLogFile.Dispose()' ;add log entry -> 'myLogFile.AddEntry("The big brown dog bit the la...
by KuroiLight
23 May 2018, 23:12
Forum: Scripts and Functions (v1)
Topic: simplified WinEvents
Replies: 5
Views: 3033

Re: simplified WinEvents

AHKStudent wrote:
Is there a way to use this script to detect anytime WM_GETTEXT is called and to report back the process that called it?

Thank you
been a while since I touched this, but as far as I know not unless the WM_GETTEXT message is being sent to the process that is running this code.
by KuroiLight
09 Feb 2018, 17:32
Forum: Ask for Help (v1)
Topic: alternative ways to showwindow?
Replies: 6
Views: 2352

Re: alternative ways to showwindow?

imagesearch/pixelgetcolor are needed because the entire spotify window just shows up as a Chrome_RenderWidgetHostHWND1 , with no discernible controls. Yea, you are likely right about WinWait commands, I had assumed they would automatically yield to other running timers between internal checks but I ...
by KuroiLight
08 Feb 2018, 20:14
Forum: Ask for Help (v1)
Topic: alternative ways to showwindow?
Replies: 6
Views: 2352

Re: alternative ways to showwindow?

trying to see if it will work and... running into the multi-timer lockup bug again.... Don't understand why in some cases running 2 timers kills one of them. ;Spotify Media Shorcuts ;Version: 1.0 ;Author: KuroiLight/klomb ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; global script_conditional_param := "ahk_clas...
by KuroiLight
08 Feb 2018, 19:44
Forum: Ask for Help (v1)
Topic: alternative ways to showwindow?
Replies: 6
Views: 2352

Re: alternative ways to showwindow?

ControlClick works and doesn't activate the window and I want to keep it that way; but the window has to be visibly on top There is no WinSetPos so I tried [code] ShowNoActivateViaMove(hwnd) { WinGetPos, x, y, w, h, ahk_id %hwnd% WinSet, Region, %x%-%y%, ahk_id %hwnd% } [/code] But it doesn't bring...
by KuroiLight
08 Feb 2018, 19:16
Forum: Ask for Help (v1)
Topic: alternative ways to showwindow?
Replies: 6
Views: 2352

alternative ways to showwindow?

I'm using ControlClick to interact with Spotify (automatically), however the window ofc. needs to be visible for this to work, trying to get it to show it [the window when its behind another or minimized] without activating it is somewhat a struggle though; I've tried changing Z-Order with DllCall("...
by KuroiLight
22 Jan 2018, 20:28
Forum: Wish List
Topic: Features I miss from other languages & syntax ideas
Replies: 18
Views: 5488

Re: Features I miss from other languages & syntax ideas

Pretty creative way of doing it, but it isn't immediately apparent what your doing there, which is why I think dedicated syntax is better. I'm actually not that attached to switches anymore since the same thing could be accomplished using a function lookup table. This could be further improved with ...
by KuroiLight
19 Jan 2018, 23:42
Forum: Scripts and Functions (v1)
Topic: yet another spinner
Replies: 19
Views: 6637

Re: yet another spinner

This is cool, might adapt and use in some of my routine scripts; I tried something similar just spinning a png via gdip Transforms but It would always bounce the image around. Wish I had a better understanding of maths so I could do a gradient spinning circle this way. Do you think its possible with...
by KuroiLight
19 Jan 2018, 13:50
Forum: Ask for Help (v1)
Topic: traditional for loop: for i = a to b (step c) possibilities
Replies: 19
Views: 12869

Re: traditional for loop: for i = a to b (step c) possibilities

you can create a range object and for loop over that: while a range could be re-used and makes the code look cleaner overall, its likely slower than your while method. for _, i in range(5, 25) { FileAppend, %i%`,, * } FileAppend, `n, * for _, i in range(20, -20, 4) { FileAppend, %i%`,, * } return ra...
by KuroiLight
13 Jan 2018, 19:41
Forum: Gaming Help (v1)
Topic: AHK Multiple Timers, but asynchronous Topic is solved
Replies: 14
Views: 5869

Re: AHK Multiple Timers, but asynchronous Topic is solved

Not sure what your intention is, but this working exactly how you describe. settimer, gun1 is executed then sleep for 600ms then settimer, gun2 then 600ms and gun1 will run, then 600ms to gun2, and so on... This can however be prone to timing drift caused by the inaccuracy of sleep, putting both sen...
by KuroiLight
10 Jan 2018, 20:54
Forum: Scripts and Functions (v1)
Topic: simplified WinEvents
Replies: 5
Views: 3033

simplified WinEvents

I tried to simplify SetWinEventHook as much as I could for ease of usage. May expand it later. You can set a WinEvent hook for any of the available events without the min/max range requirement. You can add events to a callbacks hook after initial usage and remove events from the hook without removin...
by KuroiLight
10 Jan 2018, 20:32
Forum: Ask for Help (v1)
Topic: How can I make this faster?
Replies: 3
Views: 1180

Re: How can I make this faster?

put the image filenames in an array and use a for loop. won't be any faster performance-wise but will be shorter code-wise.
by KuroiLight
10 Jan 2018, 20:31
Forum: Ask for Help (v1)
Topic: AHK not working on windows 10
Replies: 14
Views: 17733

Re: AHK not working on windows 10

lexikos wrote:statically linked
Wasn't sure myself since I've never had this issue.
by KuroiLight
09 Jan 2018, 23:19
Forum: Ask for Help (v1)
Topic: Does anyone have any starter code?
Replies: 5
Views: 1649

Re: Does anyone have any starter code?

since it looks like we're posting headers, heres mine: most scripts: ;<scriptname> ;Version: 1.0 ;Author: KuroiLight/klomb ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;global script_conditional_param := "ahk_exe explorer.exe" #Include %A_ScriptDIr%\includes\CommonCode.ahk ;#NoTrayIcon ;;;;;;;;;;;;;;;;;;;;;;;;...
by KuroiLight
09 Jan 2018, 14:14
Forum: Ask for Help (v1)
Topic: New to data parsing of text file using arrays... needing direction
Replies: 9
Views: 2033

Re: New to data parsing of text file using arrays... needing direction

Lol, I post a tad late too... FileRead, filecontents, .\data.txt reaperMarkerData := {} last_pos := 1 Loop { last_pos := RegExMatch(filecontents, "imS)^\s*MARKER\s*(?P<Numb>\d+)\s*(?P<Time>[\d\.]+)\s*\""(?P<Title>.+)\""", line_, last_pos+5) if(line_Numb and line_Time and line_Title) reaperMarkerData...
by KuroiLight
09 Jan 2018, 02:16
Forum: Ask for Help (v1)
Topic: AHK not working on windows 10
Replies: 14
Views: 17733

Re: AHK not working on windows 10

Yea, the eventviewer might reveal something; other than that, it may be a missing vcredist or software interfering with it.
what version did you install? x32/x64? Unicode or ANSI?
another possibility is the editor your using is adding junk to the ahk file, what editor are you using?
by KuroiLight
08 Jan 2018, 15:28
Forum: Ask for Help (v1)
Topic: AHK not working on windows 10
Replies: 14
Views: 17733

Re: AHK not working on windows 10

can you get a messagebox to show at script start?
is there possibly security software killing it?
by KuroiLight
06 Jan 2018, 04:08
Forum: Ask for Help (v1)
Topic: Is control count limit hardcoded into ahk?
Replies: 2
Views: 1085

Re: Is control count limit hardcoded into ahk?

I'm aware of that bit about GuiControl, Delete , its unfortunate that its not implemented, At the very least I'd expect it could decrement the internal counter. I ended up doing this in one of the timer functions: if((HwndCount >= 500 and (A_TimeIdle >= (1000 * 60 * 5))) or HwndCount >= 1000) { Gui,...
by KuroiLight
06 Jan 2018, 02:51
Forum: Ask for Help (v1)
Topic: Is control count limit hardcoded into ahk?
Replies: 2
Views: 1085

Is control count limit hardcoded into ahk?

doing some testing to optimize some code, using the following example: #SingleInstance, force #Persistent DetectHiddenWindows, On Gui, New, +HwndNotify_Window, Gui, %Notify_Window%: Add, Text, +HwndStatic1Hwnd Right, "Hello World" HwndCount := 1 Loop { DllCall("User32\DestroyWindow", "UInt", Static1...

Go to advanced search