Jump to content

250,000 AFK Script


Septomor

Recommended Posts

I don't usually reply to any post or participate in any discussion in this forum. However, since Septomor has made such an outstanding post so I feel I should write something to express my gratitude.

 

Before you start, make sure your operation system is Windows 8.1 or Window 10 (32-bit/64-bit don't matter). My OS was Windows 7 so when I tried to install PS4 Remote Play I got a prompt "You cannot install blah blah blah". I immediately unplugged my original SSD and plugged in my backup SSD with Windows 10 installed. Set everything up and you are good to go.

 

However, nothing happened when I set everything up and tried to run the script. Let my explain what happened.

 

NOTE  

If your operation system's language is not English, you may (or may not) have to modify the script before it can actually work. In my case, my copy of Window 10 is in Chinese.

 

After I installed PS4 Remote Play and run it, the name of the program in the taskbar was "PS4遥控操作" instead of "PS4 Remote Play". I am not a programmer but I have some basic knowledge of programming. I substituted all "PS4 Remote Play" with "PS4遥控操作" and then the script worked perfectly. Magic!

 

Here is what I have done. In line 11,13,15, 22 & 24 of the script there are 5 "PS4 Remote Play", substitute them all.

 

Original 

WinGet, remotePlay_id, ID, PS4 Remote Play
WinMove, PS4 Remote Play,, 0, 0,
WinActivate, PS4 Remote Play
ControlClick, x648 y530, PS4 Remote Play,,,, D
ControlClick, x648 y530, PS4 Remote Play,,,, U

 

Modified

WinGet, remotePlay_id, ID, PS4遥控操作
WinMove, PS4遥控操作,, 0, 0,
WinActivate, PS4遥控操作
ControlClick, x648 y530, PS4遥控操作,,,, D
ControlClick, x648 y530, PS4遥控操作,,,, U

 

As I said before, you may (or may not) have to modify the script before it can actually work. It depends on the name of the program which is shown on your taskbar (in my case it is "PS4遥控操作").

 

Thank you, Septomor, for showing me such a power tool. The only method of grinding I knew was the "rubber band method".

 

That is it. Happy trophy hunting for everyone.

  • Like 1
Link to comment
Share on other sites

4 hours ago, OrangeBokeh said:

 

NOTE  

If your operation system's language is not English, you may (or may not) have to modify the script before it can actually work. In my case, my copy of Window 10 is in Chinese.

 

After I installed PS4 Remote Play and run it, the name of the program in the taskbar was "PS4遥控操作" instead of "PS4 Remote Play". I am not a programmer but I have some basic knowledge of programming. I substituted all "PS4 Remote Play" with "PS4遥控操作" and then the script worked perfectly. Magic!

 

Here is what I have done. In line 11,13,15, 22 & 24 of the script there are 5 "PS4 Remote Play", substitute them all.

 

Original 


WinGet, remotePlay_id, ID, PS4 Remote Play

WinMove, PS4 Remote Play,, 0, 0,

WinActivate, PS4 Remote Play

ControlClick, x648 y530, PS4 Remote Play,,,, D

ControlClick, x648 y530, PS4 Remote Play,,,, U

 

Modified


WinGet, remotePlay_id, ID, PS4遥控操作

WinMove, PS4遥控操作,, 0, 0,

WinActivate, PS4遥控操作

ControlClick, x648 y530, PS4遥控操作,,,, D

ControlClick, x648 y530, PS4遥控操作,,,, U

 

As I said before, you may (or may not) have to modify the script before it can actually work. It depends on the name of the program which is shown on your taskbar (in my case it is "PS4遥控操作").

 

 

Ah yes, I knew this could have been a problem, I'm glad you realized it. it's exactly as you say, I wanted to implement a language thing into the GUI so that others would be able to use it easily outside their country, but I didn't know what each window was called in other languages. With this I might be able to get an idea, thank you!

Link to comment
Share on other sites

Thanks for pointing out how to do it offline. It seems like you can save like 10-15 seconds that way. Besides, the servers are fucked, just like this game is. Not a totally awful game to play, but it's a technical mess.

Link to comment
Share on other sites

  • 2 weeks later...

Cheers, this will come in really handy.  I think I'm doing something wrong as every 10 minutes or so it seems to miss a bit somewhere but closing AHK & starting it again gets it back to normal.  I'll give it a shot again later as it's saving a lot of time.

 

I've never bothered looking into remote play before but would I be able to set this up to farm the vita version?

Link to comment
Share on other sites

2 hours ago, JWHilliard said:

Cheers, this will come in really handy.  I think I'm doing something wrong as every 10 minutes or so it seems to miss a bit somewhere but closing AHK & starting it again gets it back to normal.  I'll give it a shot again later as it's saving a lot of time.

 

I've never bothered looking into remote play before but would I be able to set this up to farm the vita version?

I know where this 10 minutes problem is, there is a line in the program that says 

sleep 25000

and that time seems to vary for some people, upping that number will definitely fix the issue, it just makes it take longer overall. My idea would be to let the user just choose how long they should wait between go's, wouldn't take very long to set up.

 

As for the vita, I was wondering but am not so sure. There isn't a native PSV Remote Play program for PC, I can try to look into it though.

  • Like 1
Link to comment
Share on other sites

5 hours ago, Septomor said:

I know where this 10 minutes problem is, there is a line in the program that says 


sleep 25000

Thanks, I'll adjust that bit and give it a shot. I had a brief look to try and see what I could change but it was 4am & I haven't done any programming since using BASIC at school around 20 years ago

Link to comment
Share on other sites

I tried loading this up again today but every time I tried it, it moved the mouse to the top left of my screen instead of clicking on the options button.  I've no idea why as that bit was working okay initially (it must be something to do with my pc as it was still your original script and I never had that issue yesterday).

 

Anyhoo, I gave in trying and spent this afternoon doing it the old fashioned way for a few hours, before I got bored.  I decided to try adjusting your code a little (nothing to lose) and managed to get it running again.

 

I changed the first movemouse line to the same co-ordinates as the button click, then adjusted the size of the window until the mouse moved to the OPTIONS button as I didn't want to start figuring out how the co-ordinates worked.

 

I also followed your advice & changed the sleep 25000 to sleep 28000, as well as adding in a couple of sleep 300 lines before each down press (on the odd occasion my version only moved down once in the menu).

 

I wish I knew about this before as I've just spent countless hours pushing X every 45 seconds for the Billionaire trophy in Lego Worlds.  I'm going to try and find the equivalent keys for the other buttons & might try learning how to do this myself.

 

ps. I haven't posted my amended version of the script as I'm aware I've just fluked a working version that fixed something I've changed with my PC

 

TLDR: Thanks again Septomor, this was a great help

Edited by JWHilliard
missing words
  • Like 1
Link to comment
Share on other sites

12 hours ago, JWHilliard said:

I tried loading this up again today but every time I tried it, it moved the mouse to the top left of my screen instead of clicking on the options button.  I've no idea why as that bit was working okay initially (it must be something to do with my pc as it was still your original script and I never had that issue yesterday).

 

Anyhoo, I gave in trying and spent this afternoon doing it the old fashioned way for a few hours, before I got bored.  I decided to try adjusting your code a little (nothing to lose) and managed to get it running again.

 

I changed the first movemouse line to the same co-ordinates as the button click, then adjusted the size of the window until the mouse moved to the OPTIONS button as I didn't want to start figuring out how the co-ordinates worked.

 

I also followed your advice & changed the sleep 25000 to sleep 28000, as well as adding in a couple of sleep 300 lines before each down press (on the odd occasion my version only moved down once in the menu).

 

I wish I knew about this before as I've just spent countless hours pushing X every 45 seconds for the Billionaire trophy in Lego Worlds.  I'm going to try and find the equivalent keys for the other buttons & might try learning how to do this myself.

 

ps. I haven't posted my amended version of the script as I'm aware I've just fluked a working version that fixed something I've changed with my PC

 

TLDR: Thanks again Septomor, this was a great help

 

Hey thats great that it works :) if you want to know the other key combinations, you can only do X, O, and d-pad moves. I just kinda figured out how to press OPTIONS, the only way is to click on it :/

Anyways, for X the command is {Enter} and O is {Esc}. D-pad is just {Left},{Right},{Down},{Up}. 

  • Like 1
Link to comment
Share on other sites

46 minutes ago, HappyGuySmiley said:

Well nothing works, the mouse goes in the up left corner of the screen and nothing happens after, no clicks nothing, am I missing something?

 

That was the same as I had the second time around.  I've sent you a PM

Link to comment
Share on other sites

13 hours ago, HappyGuySmiley said:

Well nothing works, the mouse goes in the up left corner of the screen and nothing happens after, no clicks nothing, am I missing something?

Are you resizing the window? It needs to be in the default size to work

  • Like 1
Link to comment
Share on other sites

9 hours ago, Septomor said:

Are you resizing the window? It needs to be in the default size to work

 

 I think I had resized or moved it so that will be what caused the issue with mine. I tried changing it back but couldn't get it working again.

 

I knew I must have done something wrong as it worked the first night

Link to comment
Share on other sites

  • 4 weeks later...
  • 11 months later...
2 hours ago, Septomor said:

It probably won't, but I think if you use Virtual Machine with Windows then it might work. Sorry :(

Yeah I figured that out too, I made the biggest mistake when I bought a MacBook a year ago, I should have bought windows, thx for the reply 

Link to comment
Share on other sites

  • 3 weeks later...

I spent almost 3 hours but could not make it work. Windows settings are in Russian therefore Ive changed the name to Дистанционное воcпроизведение PS4, but this does not help. The cursor is moving slightly and nothing happens. What do I do wrong?

Link to comment
Share on other sites

1 hour ago, Shuric1981 said:

I spent almost 3 hours but could not make it work. Windows settings are in Russian therefore Ive changed the name to Дистанционное воcпроизведение PS4, but this does not help. The cursor is moving slightly and nothing happens. What do I do wrong?

 

Here try this one 

 

DetectHiddenWindows, On

buildings := 0
Gui, Add, Button, default, Start
Gui, Add, Edit, vTEST w250, %buildings%
Gui, Show,w420 h145, Space Overlords Grinding
return

ButtonStart:
SetKeyDelay, 250
WinGet, remotePlay_id, ID, Дистанционное воcпроизведение PS4
WinGetClass, remotePlay_class, ahk_id %remotePlay_id%
WinMove, Дистанционное воcпроизведение PS4,, 0, 0, 800, 600
ControlFocus,, ahk_class %remotePlay_class%
WinActivate, Дистанционное воcпроизведение PS4

loop {
  Sleep, 1000
  MouseMove, 100, 100
   MouseMove, -20, -30, 50, R
  Sleep 500
  ControlClick, x529 y560, Дистанционное воcпроизведение PS4,,,, D
  Sleep 300
  ControlClick, x529 y560, Дистанционное воcпроизведение PS4,,,, U
  Sleep 1000
  ControlSend,, {Down Down}, ahk_id %remotePlay_id%
  ControlSend,, {Down Up}, ahk_id %remotePlay_id%
  ControlSend,, {Down Down}, ahk_id %remotePlay_id%
  ControlSend,, {Down Up}, ahk_id %remotePlay_id%
  ControlSend,, {Enter Down}, ahk_id %remotePlay_id%
  ControlSend,, {Enter Up}, ahk_id %remotePlay_id%
  buildings += 194
  GuiControl,, TEST, %buildings%
  Sleep 24000
}
return

GuiClose:
^k::ExitApp

And let me know if that works :) 

Link to comment
Share on other sites

@Septomor It's possible to target running process by its "exe" name. That should solve the issues for every language since the it's always called "RemotePlay.exe".

 

btw. I did not know about your thread when I created my RDR2 guide. Interesting to see another person using AHK for automation :)

Link to comment
Share on other sites

18 minutes ago, HusKy said:

@Septomor It's possible to target running process by its "exe" name. That should solve the issues for every language since the it's always called "RemotePlay.exe".

 

btw. I did not know about your thread when I created my RDR2 guide. Interesting to see another person using AHK for automation :)

 

Hey, I'd really like to know how you did that, because I'm looking at it using ahk_exe RemotePlay.exe everywhere, but it won't find the process at all. Yeah automating needlessly repetitive things are pretty fun aren't they? I'm currious to know what you did for RDR2 actually, I'll have to go look :) 

Link to comment
Share on other sites

11 minutes ago, Septomor said:

 

Hey, I'd really like to know how you did that, because I'm looking at it using ahk_exe RemotePlay.exe everywhere, but it won't find the process at all. Yeah automating needlessly repetitive things are pretty fun aren't they? I'm currious to know what you did for RDR2 actually, I'll have to go look :) 

 

Yes, "ahk_exe" is what I was thinking about. I did not use it in my script because I found out later but I assumed it just worked.

In my case, the script only needed to press :cross: button repeatedly over and over. :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...