AutoHotkey Guide

CrazyBob's Cops And Robbers game information, help, faqs and guides. If you need help with something in game, this is the place!
User avatar
MessedUpSmiley
CnR Admin
Posts: 2770
Joined: Mon Apr 22, 2013 9:39 am
Gender: Male
Personal Saying: I'm secretly a robot.
Location: The Netherlands

Re: AutoHotkey Guide

Post by MessedUpSmiley » Sun Sep 17, 2017 6:05 pm

Might anyone be interested.

Code: Select all

F10::
{
WinGetTitle, now_playing, ahk_class SpotifyMainWindow
sendInput tNow Playing: %now_playing%{enter}
return
}
Get's the name of the currently PLAYING track from spotify and prints it out in chat.
You can change the sendInput syntax to your likings. The %now_playing% will return the variable; which will be the track name.
Last edited by MessedUpSmiley on Sun Sep 24, 2017 4:36 am, edited 1 time in total.
With Regards,
MessedUpSmiley

Dom_KP
Officer
Posts: 108
Joined: Thu Sep 15, 2011 1:28 pm
Gender: Male
Personal Saying: o Hi, didn't see ya there
Location: England

Re: AutoHotkey Guide

Post by Dom_KP » Sat Sep 23, 2017 5:36 pm

MessedUpSmiley wrote:Might anyone be interested.

Code: Select all

F10::
{
WinGetTitle, now_playing, ahk_class SpotifyMainWindow
sendInput tNow Playing: %now_playing%{enter}
}
Get's the name of the currently PLAYING track from spotify and prints it out in chat.
You can change the sendInput syntax to your likings. The %now_playing% will return the variable; which will be the track name.
For some reason i cant seem to get this script to work in gta sa andreas, but if i press f10 in google search for example it works??

User avatar
MessedUpSmiley
CnR Admin
Posts: 2770
Joined: Mon Apr 22, 2013 9:39 am
Gender: Male
Personal Saying: I'm secretly a robot.
Location: The Netherlands

Re: AutoHotkey Guide

Post by MessedUpSmiley » Sun Sep 24, 2017 4:36 am

Dom_KP wrote:For some reason i cant seem to get this script to work in gta sa andreas, but if i press f10 in google search for example it works??
Try doing just this from in-game and see if it detects any window at all:

Code: Select all

F10:: 
{
WinGetTitle, now_playing, ahk_class SpotifyMainWindow
MsgBox, %now_playing%
return
}
Also forgot to add a return in at first, changed now.
With Regards,
MessedUpSmiley

Dom_KP
Officer
Posts: 108
Joined: Thu Sep 15, 2011 1:28 pm
Gender: Male
Personal Saying: o Hi, didn't see ya there
Location: England

Re: AutoHotkey Guide

Post by Dom_KP » Wed Sep 27, 2017 7:12 am

MessedUpSmiley wrote:
Dom_KP wrote:For some reason i cant seem to get this script to work in gta sa andreas, but if i press f10 in google search for example it works??
Try doing just this from in-game and see if it detects any window at all:

Code: Select all

F10:: 
{
WinGetTitle, now_playing, ahk_class SpotifyMainWindow
MsgBox, %now_playing%
return
}
Also forgot to add a return in at first, changed now.

i tried both of the scripts and still not working, i play in full screen if that makes a difference?

User avatar
MessedUpSmiley
CnR Admin
Posts: 2770
Joined: Mon Apr 22, 2013 9:39 am
Gender: Male
Personal Saying: I'm secretly a robot.
Location: The Netherlands

Re: AutoHotkey Guide

Post by MessedUpSmiley » Wed Sep 27, 2017 10:09 am

Don't think the full screen should matter, might have something to do with your OS blocking access to information of other instances from GTA or something. I really have no clue.
With Regards,
MessedUpSmiley

Dom_KP
Officer
Posts: 108
Joined: Thu Sep 15, 2011 1:28 pm
Gender: Male
Personal Saying: o Hi, didn't see ya there
Location: England

Re: AutoHotkey Guide

Post by Dom_KP » Fri Sep 29, 2017 3:51 am

MessedUpSmiley wrote:Don't think the full screen should matter, might have something to do with your OS blocking access to information of other instances from GTA or something. I really have no clue.
im also using fishlog, if that makes a difference, but even when im not running fishlog it dosent work?

User avatar
MessedUpSmiley
CnR Admin
Posts: 2770
Joined: Mon Apr 22, 2013 9:39 am
Gender: Male
Personal Saying: I'm secretly a robot.
Location: The Netherlands

Re: AutoHotkey Guide

Post by MessedUpSmiley » Fri Sep 29, 2017 4:45 am

Don't think that should matter.
Try adding

Code: Select all

DetectHiddenWindows, On
Before the wingettitle line

And

Code: Select all

DetectHiddenWindows, Off
Before the return
With Regards,
MessedUpSmiley

Dom_KP
Officer
Posts: 108
Joined: Thu Sep 15, 2011 1:28 pm
Gender: Male
Personal Saying: o Hi, didn't see ya there
Location: England

Re: AutoHotkey Guide

Post by Dom_KP » Fri Sep 29, 2017 5:46 am

Dom_KP wrote:
MessedUpSmiley wrote:Don't think the full screen should matter, might have something to do with your OS blocking access to information of other instances from GTA or something. I really have no clue.
im also using fishlog, if that makes a difference, but even when im not running fishlog it dosent work?
i figuered it out, i had to run the script as an administrator

User avatar
SEA
CnR Admin
Posts: 1084
Joined: Sun Aug 01, 2010 12:49 am
Gender: Male
Location: Piccadilly Market
Contact:

Re: AutoHotkey Guide

Post by SEA » Sat Dec 02, 2017 9:09 am

I updated the first post with a very basic example script, so you can get better understanding how a "complete" script looks.
Blow my brain to fragments on an empty canvas - that's my last work of art for this fucked up planet

User avatar
tr1gga
Foot Patrol
Posts: 30
Joined: Fri Dec 01, 2017 1:04 pm
Gender: Male
Personal Saying: Pull the trigga.

Re: AutoHotkey Guide

Post by tr1gga » Mon Jan 01, 2018 9:55 am

How to vote innocent/guilty on jury without typing 1 or 2?
How do you stop one cmd with another? (using the "return" something, just explane me)

Post Reply