Attract-Mode Support > Scripting

Passing command line arguments within a layout [SOLVED]

(1/3) > >>

BOXXMAN:
How would you go about passing system and rom information as variables to a command line? For example, I am trying to use Rocketlauncher in a layout to bring up the pause menu for the current game in the display by using

fe.plugin_command("/Rocketlauncher/Rocketlauncher.exe", -s [system] -r [name] -p AttractMode -m pause");

However, if I try to pass arguments as magic tokens (which I'm assuming is wrong) in [brackets] it doesn't work. I have also tried enclosing in quotes ["name"], and "[name]", plus just about every way i can think of with or without brackets and quotes. Everything either shows up as a literal string, or crashes the layout. What is the correct way to get these parameters and pass them as arguments? The frontend itself seems to have no problem doing it when inputting the arguments to set up the emulator. Also, it would be appreciated if you could point me in the right direction how to add this of some sort of function that can be called on when one of the "custom" buttons is pressed. Thanks for any help with this. :-[

qqplayer:
I´m looking for the same thing.
Sorry to say this but I think that this is a great f.e. with tons of posibilities but sometimes I feel totally lost.
Users need more "officiall" support.
The main developer doesnt answer on github...
I can´t find an updated wiki with all the f.e. options...
I know people in this forum helps a lot but you know... maybe the main developer could help us in the right way with most of our problems.

 

BOXXMAN:
Yeah, I mean I like the idea of how open it is, but it's kind of a steep learning curve on some things. I could do a lot with Hyperspin using AHK scripts to run other programs that you could pass the variables of rom and system from it easily. However, I like the flexibility and to customize this fe in any way you like. I can do pretty much anything visually I want with it, but figuring out how to pass variables to any external application is aggravating. I could just figure out how to do that, it would be easy to add a manual reader, a secondary marquee display, or any other number of things into a layout that require a variable. I'm still trying to figure it out, I'll let you know if I manage to.

keilmillerjr:
Hyper Shlt was a pain in the @ss to try and set up. Thats why I initially switched to attract mode. Anyways…


--- Code: ---fe.plugin_command( executable, arg_string )
--- End code ---

The plugin command takes an argument string. Have you tried returning a function inside the string?

Not tested, but try something along these lines and let me know how you make out.


--- Code: ---fe.plugin_command("/Rocketlauncher/Rocketlauncher.exe", "-s „ + fe.game_info(Info.System) + " -r „ + fe.game_info(Info.Name) + " -p AttractMode -m pause");
--- End code ---

BOXXMAN:
That gets me a bit closer  to results. I'm not sure how you are making those lower style closing ", and maybe that's why i'ts not working. As it is, I used "" to enclose everything, and it does partially pass the name now, but still with problems. For example, I tried it with Sony Playstation 2 as the system, and it outputs -sSony as the system. So, it is sending the -s as a string as well as the command line switch, and the system name is getting cut off as well. Any ideas?

Navigation

[0] Message Index

[#] Next page

Go to full version