It is currently April 27th, 2024, 11:02 am

Trying How To Use a Command - Examples I've found arent really working

Get help with creating, editing & fixing problems with skins
User avatar
CodeCode
Posts: 1366
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Trying How To Use a Command - Examples I've found arent really working

Post by CodeCode »

SO I have A RunCommand Measure.

These option values are said to work on the CMD, but it isnt going right.

Code: Select all

WinUAE Specific
Parameter	Description
-config=configfile.uae	Load the given configuration file during startup.
-statefile=statefile.uss	Load a saved system state file.
-f configfile.uae	Similar to -config, but without the equals sign: will load a configuration file.

Code: Select all

command line:

winuae.exe -f "path/to/config_to_load.uae"

This will load the config automatically and display the WinUAE GUI.

To load the config automatically and start emulation without displaying the WinUAE GUI:

winuae.exe -f "path/to/config_to_load.uae" -s use_gui=no
I am hoping for some guidance in setting up the RunCommand correctly.

In short, I click a button, the .uae file loads the config for WinUAE.

Thanks. :welcome:
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
balala
Rainmeter Sage
Posts: 16176
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Trying How To Use a Command - Examples I've found arent really working

Post by balala »

CodeCode wrote: February 20th, 2024, 12:56 am I am hoping for some guidance in setting up the RunCommand correctly.
Something like this?

Code: Select all

[MeasureRun]
Measure=Plugin
Plugin=RunCommand
Program=winuae.exe
Parameter=-f "path/to/config_to_load.uae"
State=???
The idea is to use the executable into the Program option and its parameter into the Parameter option. Obviously you have to adapt the Program option, for instance by specifying the path of the program, if it's placed somewhere else than in the config of your skin (it should be the case, most probably).
And don't forget to add a !CommandMeasure bang to execute the above measure, to the meter which should be clicked to load the config.
RicardoTM
Posts: 268
Joined: December 28th, 2022, 9:30 pm
Location: México

Re: Trying How To Use a Command - Examples I've found arent really working

Post by RicardoTM »

Well, I don't use WinUAW nor know what that is, but this should work:

Code: Select all

[MeasureRun]
Measure=Plugin
Plugin=RunCommand
Program= %ComSpec% /U /C
Parameter=winuae.exe -f "PATH_TO_WINUAE_CONFIG.uae" -s use_gui=no
State=Hide
OutputType=ANSI
OutputFile=#CURRENTPATH#Log.txt

Program= %ComSpec% /U /C This is what runs cmd. You can read the docs for more info about it

Parameter=winuae.exe -f "PATH_TO_WINUAE_CONFIG.uae" -s use_gui=no This is where the command goes.

You can also add any action you want when it finishes

And you also need a mouse action on a meter to run the command.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Trying How To Use a Command - Examples I've found arent really working

Post by Yincognito »

CodeCode wrote: February 20th, 2024, 12:56 am SO I have A RunCommand Measure.

These option values are said to work on the CMD, but it isnt going right.

Code: Select all

WinUAE Specific
Parameter	Description
-config=configfile.uae	Load the given configuration file during startup.
-statefile=statefile.uss	Load a saved system state file.
-f configfile.uae	Similar to -config, but without the equals sign: will load a configuration file.

Code: Select all

command line:

winuae.exe -f "path/to/config_to_load.uae"

This will load the config automatically and display the WinUAE GUI.

To load the config automatically and start emulation without displaying the WinUAE GUI:

winuae.exe -f "path/to/config_to_load.uae" -s use_gui=no
I am hoping for some guidance in setting up the RunCommand correctly.

In short, I click a button, the .uae file loads the config for WinUAE.

Thanks. :welcome:
Besides what balala and RicardoTM mentioned, if by any chance your executable is in a different folder than your skin's folder and you didn't specify its path in the Program or Parameter options, you might want to consider using the StartInFolder option of your RunCommand measure. Obviously, that will impact other operations you might do if not specifying full paths, so you should take that into account as well.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
CodeCode
Posts: 1366
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Trying How To Use a Command - Examples I've found arent really working

Post by CodeCode »

Hey,
I worked through several examples, and the best I got was simply opening the gui.

It also broke my WinUAE configs, cascading until I had to delete everything, then start over.

After all if old Amiga platform games and apps, needed to be manually changed - it really isn't worth wrecking my WinUAAE build, that being new at this, going back to scratch wasn't worth the effort, since the gui is fairly easy to navigate in comparison.

I did manage at one point get the sounds of a game playing, but there was no window for it - wasn't able to get that result again. O.O
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Trying How To Use a Command - Examples I've found arent really working

Post by Yincognito »

CodeCode wrote: February 20th, 2024, 11:29 am Hey,
I worked through several examples, and the best I got was simply opening the gui.

It also broke my WinUAE configs, cascading until I had to delete everything, then start over.

After all if old Amiga platform games and apps, needed to be manually changed - it really isn't worth wrecking my WinUAAE build, that being new at this, going back to scratch wasn't worth the effort, since the gui is fairly easy to navigate in comparison.

I did manage at one point get the sounds of a game playing, but there was no window for it - wasn't able to get that result again. O.O
Assuming your skin code was correct (can't say it, since I don't use WinUAE and the code hasn't been posted), the cascading thing might relate to the executable running in multiple instances because of that command line. Some programs offer settings to control that and only allow a single instance of them to run at the same time (think Rainmeter not spawning another instance when ran with parameters from the command line, if it's already running), which would normally fix the said issue.

Also, one more thing about using a RunCommand / command line to do stuff: it isn't necessarily suited for "continuous handling" of other software (like, for example, when you send "bangs" to Rainmeter from the command line) - most of the times command lines are meant as "one time actions" in that regard. I don't know what those "config.uae" files contain or what they're supposed to do, but I'd be skeptical of them being used to run games, apps and the like. Of course, since I didn't use (yet) any other "emulator" than DOSBox (and maybe some Android ones in the future) and none of them through a Rainmeter skin, I'm not familiar with how this works or what you're trying to achieve (if that's feasible in the first place).

P.S. In some cases, an AutoIt / AutoHotKey script might do more in such cases.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
CodeCode
Posts: 1366
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Trying How To Use a Command - Examples I've found arent really working

Post by CodeCode »

Yincognito wrote: February 20th, 2024, 2:56 pm ... the cascading thing might relate to the executable running in multiple instances because of that command line. Some programs offer settings to control that and only allow a single instance of them to run at the same time (think Rainmeter not spawning another instance when ran with parameters from the command line, if it's already running), which would normally fix the said issue.
Yes, I did find that more than one or three instances of the WinUAE software was running. But if that was the cause of things falling apart, it would have been for something like that - or none visible even.

The usages would likely have been, in practice, not often. but I suppose finding out early is better than days or even weeks of multiple instances hovering in the background, wrecking an entire drive, or more than one even.

There was no listed use like I was trying and several relatively recent posts mentioned this idea, but the actual usage was completely different.

Word to the wary: Just swap virtual disks rather than shortcutting like this. WinUAE would have likely by now have made room for that if it was useful.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Trying How To Use a Command - Examples I've found arent really working

Post by Yincognito »

CodeCode wrote: February 20th, 2024, 9:06 pm Yes, I did find that more than one or three instances of the WinUAE software was running. But if that was the cause of things falling apart, it would have been for something like that - or none visible even.

The usages would likely have been, in practice, not often. but I suppose finding out early is better than days or even weeks of multiple instances hovering in the background, wrecking an entire drive, or more than one even.

There was no listed use like I was trying and several relatively recent posts mentioned this idea, but the actual usage was completely different.

Word to the wary: Just swap virtual disks rather than shortcutting like this. WinUAE would have likely by now have made room for that if it was useful.
I see. Well, you gave it a shot - better just use the program as it's supposed to, than messing things up by trying to get from it what it can't provide. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
CodeCode
Posts: 1366
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Trying How To Use a Command - Examples I've found arent really working

Post by CodeCode »

Yincognito wrote: February 20th, 2024, 9:22 pm I see. Well, you gave it a shot - better just use the program as it's supposed to, than messing things up by trying to get from it what it can't provide. ;-)
Well, that is what the configs are for, but not to be managed by a third party program to access those configs.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Trying How To Use a Command - Examples I've found arent really working

Post by Yincognito »

CodeCode wrote: February 20th, 2024, 9:27 pm Well, that is what the configs are for, but not to be managed by a third party program to access those configs.
Maybe. :???:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth