I need help Topic is solved

Ask gaming related questions
Posts: 2
Joined: 08 Aug 2020, 22:13

I need help  Topic is solved

08 Aug 2020, 22:34

Hi, I've only just started learning ahk a couple weeks ago and I've been struggling with this for a little while now and I don't understand why it is not working.
I pulled bits and pieces from different threads and videos to end up with this "script".
What I want to do is save the map name from a game while I'm playing on it and paste the name in a notepad.
Now to get to the map name I have to open the in-game console, in this case with pressing Numpad7, and type "status" in the console.
Since I have no clue how to extract anything from anything. I just make the mouse select everything by holding
down LButton and moving the mouse then copying it by right clicking and pressing "o" (ctrl+a doesn't work in the console).
Every map name will start with "bhop_", hence why the regexmatch (which I don't really understand btw)
So it finds the map name in the clipboard and puts it in the "var" variable.
All I want after that is to paste it in a notepad. I stumbled upon this command "FileAppend" I think it could work with it
I just don't understand it very well. Also I can't get my brain to understand "SetWorkingDir" AT ALL. Like really.

Code: Select all

#SingleInstance, Force
SendMode Input
SetWorkingDir, %A_ScriptDir%
SetWorkingDir, D:\Files
  Clipboard := ""
  CoordMode, Mouse, Window
  Send {Numpad7}
  Send clear
  Send {Enter}
  Send Status
  Send {Enter}
  MouseMove, 1800, 100, 0
  Click Down
  MouseMove, 810, 800, 0
  Click Up
  MouseMove, 810, 115, 0
  Click, Down, Right
  Sleep 20
  Click, Up, Right
  Send o
  RegExMatch(Clipboard, "bhop_\w+", var)
  FileAppend, %var%`n, ‪Bhop Maps Suggestions.txt
Posts: 3391
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: I need help

09 Aug 2020, 03:06


Code: Select all

SetWorkingDir, %A_ScriptDir%
and add at the end of your script:

Code: Select all

F1::Run, %A_WorkingDir%\‪Bhop Maps Suggestions.txt
so key F1 should open your Bhop Maps Suggestions.txt
Posts: 2
Joined: 08 Aug 2020, 22:13

Re: I need help

09 Aug 2020, 09:17

Thanks a lot

Return to “Gaming”

Who is online

Users browsing this forum: boiler and 11 guests