Remote Play - Keys Not Injecting

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
Sam71
Junior Coder
Posts: 23
Joined: Tue Mar 12, 2019 10:10 pm

Remote Play - Keys Not Injecting

Post by Sam71 » Tue Mar 19, 2019 3:23 am

I have tried using the trial version in hope of this working with the Sony Remote Play Windows application. My script is a simple one just for test purposes and is as follows:

Code: Select all

SetFocus>PS4 Remote Play
Press Left
Press Right
//Wait for
WaitScreenImage>%BMP_DIR%\image_8.bmp,0.7,CCOEFF
Press Left
Press Right
Please advise on what, if anything I am doing wrong.
Thanks,
Sam

User avatar
Grovkillen
Automation Wizard
Posts: 1131
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: Remote Play - Keys Not Injecting

Post by Grovkillen » Tue Mar 19, 2019 10:58 am

Are you sure the window is getting focused?
Let>ME=%Script%

Running: 15.0.27
version history

User avatar
Sam71
Junior Coder
Posts: 23
Joined: Tue Mar 12, 2019 10:10 pm

Re: Remote Play - Keys Not Injecting

Post by Sam71 » Tue Mar 19, 2019 11:37 am

Grovkillen wrote:
Tue Mar 19, 2019 10:58 am
Are you sure the window is getting focused?
Hi Grovkillen, I think so, I've included SetFocus in the script, is there a way of knowing for sure?.

User avatar
Sam71
Junior Coder
Posts: 23
Joined: Tue Mar 12, 2019 10:10 pm

Re: Remote Play - Keys Not Injecting

Post by Sam71 » Wed Mar 20, 2019 2:13 am

In answer to my own question and for others to reference, the work round would be
change the key timings:

Code: Select all

HoldKey>s,50,0
Wait>1.000
HoldKey>v,50,0
Wait>1.000

User avatar
Grovkillen
Automation Wizard
Posts: 1131
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: Remote Play - Keys Not Injecting

Post by Grovkillen » Wed Mar 20, 2019 7:11 pm

If you have the window unfocused during debug it will be focused if it's working.
Let>ME=%Script%

Running: 15.0.27
version history

User avatar
Sam71
Junior Coder
Posts: 23
Joined: Tue Mar 12, 2019 10:10 pm

Re: Remote Play - Keys Not Injecting

Post by Sam71 » Wed Mar 20, 2019 7:27 pm

Grovkillen wrote:
Wed Mar 20, 2019 7:11 pm
If you have the window unfocused during debug it will be focused if it's working.
Hi Grovkillen,

Thanks for the information, I'll keep that in mind for next time. I'm still trying to master the syntax atm. Bit of a steep learning curve but I like a challenge plus it looks like this program has a good community base so I should be ok for an answer or two from fine people like yourself :)

User avatar
Grovkillen
Automation Wizard
Posts: 1131
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: Remote Play - Keys Not Injecting

Post by Grovkillen » Wed Mar 20, 2019 8:10 pm

Yep, please feel free to ask.
Let>ME=%Script%

Running: 15.0.27
version history

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1384
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Remote Play - Keys Not Injecting

Post by Dorian (MJT support) » Thu Mar 21, 2019 10:48 am

Great advice as usual by Grovkillen. :)

If I was only able to give one single general tip, it would be this : Remember the context sensitive Help.
If you're in the Script Editor and your caret is positioned on any line that contains a command, pressing F1 will bring up the help file for that command - complete with usage examples, syntax, etc.

If your caret is not positioned on a command, or you're in the main Macro Scheduler window (e.g. not in the editor) the main Helpfile will launch. In there you'll find the Command Reference, where all the commands are listed by category. If you look at this, I can virtually guarantee a great many "eureka moments".

And the news just keeps getting better, because it's also online here : https://www.mjtnet.com/manual/
Yes, we have a Custom Scripting Service. Message me or go here

User avatar
Sam71
Junior Coder
Posts: 23
Joined: Tue Mar 12, 2019 10:10 pm

Re: Remote Play - Keys Not Injecting

Post by Sam71 » Thu Mar 21, 2019 1:00 pm

Dorian (MJT support) wrote:
Thu Mar 21, 2019 10:48 am
Great advice as usual by Grovkillen. :)

If I was only able to give one single general tip, it would be this : Remember the context sensitive Help.
If you're in the Script Editor and your caret is positioned on any line that contains a command, pressing F1 will bring up the help file for that command - complete with usage examples, syntax, etc.

If your caret is not positioned on a command, or you're in the main Macro Scheduler window (e.g. not in the editor) the main Helpfile will launch. In there you'll find the Command Reference, where all the commands are listed by category. If you look at this, I can virtually guarantee a great many "eureka moments".

And the news just keeps getting better, because it's also online here : https://www.mjtnet.com/manual/
Another great bit of advice, Thanks Dorian :D

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts