Search found 327 matches

by KuroiLight
27 Dec 2017, 13:52
Forum: Ask For Help
Topic: Script crashing, assuming access violation, not sure. Topic is solved
Replies: 10
Views: 1699

Re: Script crashing, assuming access violation, not sure. Topic is solved

@teadrinker The MSDN states " Contains data to be passed to another application by the WM_COPYDATA message. , I guess I assumed this wasn't a hard requirement and I can't seem to find any info on whether or not the message codes are significant beyond being an identifier. Do you know of a doc/tutori...
by KuroiLight
26 Dec 2017, 18:15
Forum: Ask For Help
Topic: Script crashing, assuming access violation, not sure. Topic is solved
Replies: 10
Views: 1699

Re: Script crashing, assuming access violation, not sure. Topic is solved

According to OnMessage Docs both this^ and the previous way I did it should work just fine? I don't understand. Is this another quirk/bug in AHK or just me?
by KuroiLight
26 Dec 2017, 18:03
Forum: Ask For Help
Topic: Script crashing, assuming access violation, not sure. Topic is solved
Replies: 10
Views: 1699

Re: Script crashing, assuming access violation, not sure. Topic is solved

Well updated to use a copy structure, but it still crashes on receive: :? updated notify function: Notify(message, timeout := 2500) { static NSW_WinName := "NotificationOperator - 0xF505 @ ZZ9PZA" static script_local := "", SHOWNOTIFICATION := 0xF505 A_DHW := A_DetectHiddenWindows DetectHiddenWindow...
by KuroiLight
26 Dec 2017, 17:30
Forum: Ask For Help
Topic: Script crashing, assuming access violation, not sure. Topic is solved
Replies: 10
Views: 1699

Re: Script crashing, assuming access violation, not sure. Topic is solved

Hi, KuroiLight, I suppose, the problem is here: SendMessage, %SHOWNOTIFICATION%, &message, %timeout%,, ahk_id %NSW_ID% You are trying to send the pointer from one process to another. It doesn't make sence, since a pointer is only valid in its own process. If you want to send a string from one scrip...
by KuroiLight
25 Dec 2017, 23:20
Forum: Ask For Help
Topic: Syntax for the exclamation point Topic is solved
Replies: 2
Views: 523

Re: Syntax for the exclamation point Topic is solved

!P::SendRaw, TestPassword123!
by KuroiLight
25 Dec 2017, 23:15
Forum: Ask For Help
Topic: Pausing a Script When a Certain Window is active - Yes, I know how to, it's just complicated. Topic is solved
Replies: 7
Views: 1183

Re: Pausing a Script When a Certain Window is active - Yes, I know how to, it's just complicated. Topic is solved

it was a spelling error

Code: Select all

PauseOnTarget() {
    for i, v in Array("EVOLUTIO.exe", "program2.exe", "program3.exe") {
        if(WinActive("ahk_exe " . v)) {
            Suspend, On
            return
        }
    }
    Suspend, Off
}
by KuroiLight
25 Dec 2017, 23:06
Forum: Ask For Help
Topic: Script crashing, assuming access violation, not sure. Topic is solved
Replies: 10
Views: 1699

Script crashing, assuming access violation, not sure. Topic is solved

Im trying to move my custom notification code into its own script so I can better manage how/when notifications popup from multiple scripts, heres where Im at: Function included in calling scripts: Notify(message, timeout := 2500) { static NSW_WinName := "NotificationOperator - 0xF505 @ ZZ9PZA" NSW_...
by KuroiLight
23 Dec 2017, 23:22
Forum: Ask For Help
Topic: Pausing a Script When a Certain Window is active - Yes, I know how to, it's just complicated. Topic is solved
Replies: 7
Views: 1183

Re: Pausing a Script When a Certain Window is active - Yes, I know how to, it's just complicated. Topic is solved

this is far from the best or most efficient way to do it, but its likely quickest to implement. PauseOnTarget() { for i, v in Array("EVOLUTIO.exe", "program2.exe", "program3.exe") { if(WinActive("ank_exe " . v)) { Suspend, On return } } Suspend, Off }
by KuroiLight
23 Dec 2017, 14:10
Forum: Ask For Help
Topic: Trying to get this script down. All the googling I did tells me it's impossible but I feel like there MUST be a way.
Replies: 3
Views: 730

Re: Trying to get this script down. All the googling I did tells me it's impossible but I feel like there MUST be a way.

hard to understand what you are looking for, is this what you want?

Code: Select all

#if GetKeyState("RButton", "P")
$LButton::send ^{PgDn}
#if GetKeyState("LButton", "P")
$RButton::send ^{PgUp}
#if
by KuroiLight
23 Dec 2017, 14:03
Forum: Ask For Help
Topic: Pausing a Script When a Certain Window is active - Yes, I know how to, it's just complicated. Topic is solved
Replies: 7
Views: 1183

Re: Pausing a Script When a Certain Window is active - Yes, I know how to, it's just complicated. Topic is solved

Here is the script you posted modified to do what you want, copy and paste over original: /* DragToScroll.ahk new discussion: https://autohotkey.com/boards/viewtopic.php?f=6&t=38457 old discussion: http://www.autohotkey.com/forum/viewtopic.php?t=59726 https://autohotkey.com/board/topic/55289-dragtos...
by KuroiLight
23 Dec 2017, 00:06
Forum: Ask For Help
Topic: Pausing a Script When a Certain Window is active - Yes, I know how to, it's just complicated. Topic is solved
Replies: 7
Views: 1183

Re: Pausing a Script When a Certain Window is active - Yes, I know how to, it's just complicated. Topic is solved

A better solution might be to pause the script from within itself instead of from another script, but heres one possible solution: Settimer, Disable_DragToScroll_on_EVOLUTIO, -1 Disable_DragToScroll_on_EVOLUTIO() { DetectHiddenWindows On SetTitleMatchMode 2 Loop { WinWaitActive, ahk_exe EVOLUTIO.exe...
by KuroiLight
22 Dec 2017, 23:56
Forum: Ask For Help
Topic: Trigger a subroutine with a single-line HotSTRING
Replies: 3
Views: 662

Re: Trigger a subroutine with a single-line HotSTRING

Don't think this is possible according to Hotstrings: "Note that the commands must appear beneath the hotstring".
This is likely due to the way hotstrings are evaluated by the parser. (?)
by KuroiLight
22 Dec 2017, 13:17
Forum: Ask For Help
Topic: Capturing multiple lines containing specific string
Replies: 9
Views: 1398

Re: Capturing multiple lines containing specific string

You could make a list of the translations you want to capture and do something like this: iS)(*UCP).*(\<Translations\>.*\""(?:Current year|Other words|match3)\"".*\<\/GroupBox\>).* make sure to include (*UCP) for those unicode characters.
by KuroiLight
22 Dec 2017, 03:27
Forum: Ask For Help
Topic: how to use space for what i will provide below
Replies: 1
Views: 362

Re: how to use space for what i will provide below

think you want this:

Code: Select all

SetCapsLockState, AlwaysOff
Capslock::
    While(GetKeyState("CapsLock", "P")) {
        Send, {Space}
    }
return
by KuroiLight
22 Dec 2017, 03:14
Forum: Ask For Help
Topic: Get the closest number to a certain number
Replies: 8
Views: 1861

Re: Get the closest number to a certain number

Code: Select all

var1 := 2.332519
var2 := ""

Loop 5 {
    var2 .= A_Index . "`n"
}

for i, v in StrSplit(RTrim(var2,  "`n"), "`n", "`n") {
    if(!smallest_diff or (Abs(var1 - v) < smallest_diff)) {
        smallest_diff := Abs(var1 - v)
        best_candidate := v
    }
}

MsgBox, % best_candidate
by KuroiLight
22 Dec 2017, 02:50
Forum: Ask For Help
Topic: Capturing multiple lines containing specific string
Replies: 9
Views: 1398

Re: Capturing multiple lines containing specific string

Try Debuggex. Also make sure PCRE is selected on your whatever site you use.
if you just trying to capture what you first posted, why wouldn't iS).*(\<Translations\>.*\<\/GroupBox\>).* work?
by KuroiLight
20 Dec 2017, 15:07
Forum: Ask For Help
Topic: Design advice
Replies: 5
Views: 867

Re: Design advice

Probably not much help, but if you need to re-autosize a control and its parent window [for changing label or button text] you can do the following: ;example using a label ControlGet, oldControl, Hwnd,, Static1, ahk_id %MyGui% DllCall("User32\DestroyWindow", "UInt", oldControl) ;destroy the old cont...
by KuroiLight
20 Dec 2017, 13:55
Forum: Ask For Help
Topic: Capturing multiple lines containing specific string
Replies: 9
Views: 1398

Re: Capturing multiple lines containing specific string

I think, this is what your looking for: Pos := 1 lang_string := "" While(Pos := RegExMatch(Data, "iSU)(*UCP)String Language=\""(?P<LangCode>\w\w)\""\s*Value=\""(?P<Val>.+)\""", Language_, Pos+1)) { lang_string .= Language_LangCode . " -> " . Language_Val . "`n" } MsgBox, % lang_string this will capt...
by KuroiLight
20 Dec 2017, 13:38
Forum: Ask For Help
Topic: Enabling/Disabling Wireless Adapter when running a specific program Topic is solved
Replies: 13
Views: 3216

Re: Enabling/Disabling Wireless Adapter when running a specific program Topic is solved

^ SetTimer

though I'd do it like this:

Code: Select all

TargetProcess := "explorer.exe"
Loop {
    Process, Wait, %TargetProcess%
    RunWait, % comspec  " /c netsh wlan disconnect",, hide
    Process, WaitClose, %TargetProcess%
    RunWait, % comspec  " /c netsh wlan connect name=""WifiName""",, hide
}
return
by KuroiLight
20 Dec 2017, 02:34
Forum: Ask For Help
Topic: Script size limit? Topic is solved
Replies: 2
Views: 618

Re: Script size limit? Topic is solved

Thanks, Thats good to know, doubt I'll reach 3K lines anytime soon.

Go to advanced search