It is currently Thu Feb 21, 2019 6:37 pm



Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3, 4  Next
 AutoHotkey Guide 
Author Message
Online
CnR Admin
User avatar

Joined: Mon Apr 22, 2013 9:39 am
Posts: 2206
Location: The Netherlands
Gender: Male
Personal Text: I'm secretly a robot.
Post Re: AutoHotkey Guide
Might anyone be interested.

Code:
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.

_________________
With Regards,
MessedUpSmiley


Last edited by MessedUpSmiley on Sun Sep 24, 2017 4:36 am, edited 1 time in total.



Sun Sep 17, 2017 6:05 pm
Profile
Officer

Joined: Thu Sep 15, 2011 1:28 pm
Posts: 108
Location: England
Gender: Male
Personal Text: o Hi, didn't see ya there
Post Re: AutoHotkey Guide
MessedUpSmiley wrote:
Might anyone be interested.

Code:
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??


Sat Sep 23, 2017 5:36 pm
Profile
Online
CnR Admin
User avatar

Joined: Mon Apr 22, 2013 9:39 am
Posts: 2206
Location: The Netherlands
Gender: Male
Personal Text: I'm secretly a robot.
Post Re: AutoHotkey Guide
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:
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


Sun Sep 24, 2017 4:36 am
Profile
Officer

Joined: Thu Sep 15, 2011 1:28 pm
Posts: 108
Location: England
Gender: Male
Personal Text: o Hi, didn't see ya there
Post Re: AutoHotkey Guide
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:
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?


Wed Sep 27, 2017 7:12 am
Profile
Online
CnR Admin
User avatar

Joined: Mon Apr 22, 2013 9:39 am
Posts: 2206
Location: The Netherlands
Gender: Male
Personal Text: I'm secretly a robot.
Post Re: AutoHotkey Guide
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


Wed Sep 27, 2017 10:09 am
Profile
Officer

Joined: Thu Sep 15, 2011 1:28 pm
Posts: 108
Location: England
Gender: Male
Personal Text: o Hi, didn't see ya there
Post Re: AutoHotkey Guide
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?


Fri Sep 29, 2017 3:51 am
Profile
Online
CnR Admin
User avatar

Joined: Mon Apr 22, 2013 9:39 am
Posts: 2206
Location: The Netherlands
Gender: Male
Personal Text: I'm secretly a robot.
Post Re: AutoHotkey Guide
Don't think that should matter.
Try adding
Code:
DetectHiddenWindows, On

Before the wingettitle line

And

Code:
DetectHiddenWindows, Off

Before the return

_________________
With Regards,
MessedUpSmiley


Fri Sep 29, 2017 4:45 am
Profile
Officer

Joined: Thu Sep 15, 2011 1:28 pm
Posts: 108
Location: England
Gender: Male
Personal Text: o Hi, didn't see ya there
Post Re: AutoHotkey Guide
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


Fri Sep 29, 2017 5:46 am
Profile
CnR Admin
User avatar

Joined: Sun Aug 01, 2010 12:49 am
Posts: 1076
Location: woust
Gender: Male
Post Re: AutoHotkey Guide
I updated the first post with a very basic example script, so you can get better understanding how a "complete" script looks.

_________________
From street to block, from block to street, from street to hood, you good, so I drop the heat


Sat Dec 02, 2017 9:09 am
Profile WWW
Foot Patrol
User avatar

Joined: Fri Dec 01, 2017 1:04 pm
Posts: 30
Gender: Male
Personal Text: Pull the trigga.
Post Re: AutoHotkey Guide
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)


Mon Jan 01, 2018 9:55 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 32 posts ]  Go to page Previous  1, 2, 3, 4  Next

Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
Localized by Maël Soucaze © 2010 phpBB.fr