Search found 1549 matches

by Xtra
10 Dec 2019, 01:23
Forum: Gaming
Topic: .txt parse as a trigger
Replies: 21
Views: 852

Re: .txt parse as a trigger

With the current script you would add more function calls into the loop. Example: #NoEnv SetBatchLines, -1 Loop { eqLog("Tex tells the group, 'Assist me", "1", 500, 1500) eqLog("Tex tells the group, 'Follow me", "2", 500, 1000) } eqLog(str, key, min, max) { FileRead, eqlog, C:\P2k\Logs\eqlog_Rex.txt...
by Xtra
09 Dec 2019, 16:15
Forum: Gaming
Topic: .txt parse as a trigger
Replies: 21
Views: 852

Re: .txt parse as a trigger

Give this a try i think your logs last line is blank. #NoEnv SetBatchLines, -1 Loop eqLog("Tex tells the group, 'Assist me", "1") eqLog(str, key) { FileRead, eqlog, C:\P2k\Logs\eqlog_Rex.txt MsgBox, 4096, log lastline, % SubStr(eqlog, InStr(eqlog, "`n",, 0, 2) + 1), 3 ; for testing only if InStr(Sub...
by Xtra
09 Dec 2019, 13:48
Forum: Gaming
Topic: .txt parse as a trigger
Replies: 21
Views: 852

Re: .txt parse as a trigger

Open your log file and post some of the lines that also include the text you are looking for.
by Xtra
09 Dec 2019, 12:51
Forum: Gaming
Topic: .txt parse as a trigger
Replies: 21
Views: 852

Re: .txt parse as a trigger

Run this:

Code: Select all

MsgBox,, FileExist(), % FileExist("C:\P2k\Logs\eqlog_Rex.txt") ? "true" : "false"
by Xtra
09 Dec 2019, 12:12
Forum: Gaming
Topic: .txt parse as a trigger
Replies: 21
Views: 852

Re: .txt parse as a trigger

Make sure the text you are comparing to log matches. Also check what the log reads with a message box: #NoEnv SetBatchLines, -1 Loop eqLog("Tex tells the group, 'Assist me", "1") eqLog(str, key) { FileRead, eqlog, C:\P2k\Logs\eqlog_Rex.txt MsgBox, 4096, log lastline, % SubStr(eqlog, InStr(eqlog, "`n...
by Xtra
08 Dec 2019, 23:54
Forum: Gaming
Topic: .txt parse as a trigger
Replies: 21
Views: 852

Re: .txt parse as a trigger

Code: Select all

#NoEnv
SetBatchLines, -1
Loop
    eqLog("Tex tells the group, 'Assist me", "1")

eqLog(str, key) {
    FileRead, eqlog, C:\P2k\Logs\eqlog_Rex.txt
    if InStr(SubStr(eqlog, InStr(eqlog, "`n",, 0) + 1), str)
        Send % key
    Sleep 750    ; Note: change to adjust speed of script
}
by Xtra
08 Dec 2019, 06:13
Forum: Ask For Help
Topic: FileCopy matching beyond extension pattern given Topic is solved
Replies: 3
Views: 606

Re: FileCopy matching beyond extension pattern given Topic is solved

You could check the end of the filenames with SubStr()

Code: Select all

Loop, Files, C:\Blah\*.ctb
{
    file := A_LoopFileLongPath
    if (SubStr(file, StrLen(file) - 3) = ".ctb")
        FileCopy, % file, C:\NewPath\*.*, 1
}
HTH
by Xtra
08 Dec 2019, 05:57
Forum: Ask For Help
Topic: Avoiding accidental infinite loops
Replies: 4
Views: 314

Re: Avoiding accidental infinite loops

loop, 100 would work fine it just comes down to preference and readability. Using if (A_Index = 100) you can have the script do something else if it timed out (not found in 100 loops). You can do it quite a few different ways. example: Until Loop { ; do stuff if... found break loop etc } until (A_I...
by Xtra
08 Dec 2019, 03:55
Forum: Ask For Help
Topic: Avoiding accidental infinite loops
Replies: 4
Views: 314

Re: Avoiding accidental infinite loops

See comments ^+p:: Run, "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" " --new-window " "https www.notion.so /flori[...]e1a8f3e14b" Broken Link for safety Sleep 300 loop { ImageSearch, FoundX, FoundY, 0, 0, 3000, 3000, C:\Users\Fl[...]\Images\Notion\Planung Icon.png if (ErrorLevel = 0...
by Xtra
06 Dec 2019, 18:41
Forum: Ask For Help
Topic: Variable as variable name Topic is solved
Replies: 16
Views: 946

Re: Variable as variable name Topic is solved

Code: Select all

MsgBox, % MyFunc()

MyFunc()
{
    a := 999
    b := "a"

    MsgBox, % %b%
    return (%b%)
}
by Xtra
06 Dec 2019, 13:53
Forum: Ask For Help
Topic: Scrolling two windows
Replies: 4
Views: 319

Re: Scrolling two windows

Try testing if the window will even accept the controlsend.

Code: Select all

WheelDown::ControlSend, , {WheelDown}, A
by Xtra
06 Dec 2019, 13:17
Forum: Ask For Help
Topic: Scrolling two windows
Replies: 4
Views: 319

Re: Scrolling two windows

Code: Select all

ControlSend, , {WheelDown}, ahk_id %CurrentWindow%
ControlSend, , {WheelDown}, ahk_id %PreviousWindow%
by Xtra
06 Dec 2019, 13:09
Forum: Ask For Help
Topic: How to make WASD use the UP Arrow key only
Replies: 6
Views: 623

Re: How to make WASD use the UP Arrow key only

You can remap the keys.
Example:

Code: Select all

w::Up
a::Up
s::Up
d::Up
or:

Code: Select all

Up::w
Left::a
Right::s
Down::d
See: remap keys or mouse buttons
by Xtra
06 Dec 2019, 12:53
Forum: Ask For Help
Topic: Modifying variables from inside a loop (turning a Toggle OFF) Topic is solved
Replies: 1
Views: 109

Re: Modifying variables from inside a loop (turning a Toggle OFF) Topic is solved

Use:

Code: Select all

				ToolTipVariable := !ToolTipVariable ;these 2 lines
				ToggleSpotSpam := !ToggleSpotSpam
See: expression operators
by Xtra
05 Dec 2019, 15:09
Forum: Gaming
Topic: Helping Simple Script Topic is solved
Replies: 4
Views: 360

Re: Helping Simple Script Topic is solved

I would think using PixelSearch for the circles color would be easier.
by Xtra
05 Dec 2019, 00:42
Forum: Gaming
Topic: Helping Simple Script Topic is solved
Replies: 4
Views: 360

Re: Helping Simple Script Topic is solved

Your syntax was a little off try this: CoordMode Pixel Loop { MouseMove, 780, 111 Sleep, 1000 Send, {Ins} Click, Left ImageSearch, FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, Burbles.png if (ErrorLevel = 0) { Send, {Ins} Sleep, 2000 break ; <---- stop looping the image was found } } Return ...
by Xtra
04 Dec 2019, 20:21
Forum: Ask For Help
Topic: Help for a newbie
Replies: 3
Views: 225

Re: Help for a newbie

Put the winwait in the hotkey block:

Code: Select all

#IfWinActive, Page.htm - Vivaldi

LButton::
    WinWait, ahk_class Chrome_WidgetWin_2
    Send ^m
return

#IfWinActive
by Xtra
04 Dec 2019, 20:16
Forum: Ask For Help
Topic: Key don't recognized in-game Topic is solved
Replies: 2
Views: 196

Re: Key don't recognized in-game Topic is solved

Pause key is probably an in game key.
Create "pass-through" hotkeys

For example, the left mouse button can trigger a hotkey action even while the click itself is being sent into the game normally (syntax: ~LButton::).
Try:
~Pause::
by Xtra
04 Dec 2019, 03:08
Forum: Ask For Help
Topic: First Script
Replies: 2
Views: 200

Re: First Script

Send, {End} will select the last.
by Xtra
03 Dec 2019, 12:15
Forum: Ask For Help
Topic: Deactivating several loops
Replies: 5
Views: 290

Re: Deactivating several loops

You didnt try the previous example that was posted. XButton1:: If BreakLoop := Not BreakLoop { SetTimer TheLoop, 100 Gosub, TheLoop SetTimer TheLoop2, 3900 Gosub, TheLoop2 SetTimer TheLoop3, 119900 Gosub, TheLoop3 } Else { ; <------------------------you need this! it creates a code block SetTimer Th...

Go to advanced search