i am trying to convert this code from linux/mac to windows:
- -
i know that in windows it's set /p to set the variable, but when i change things above to do that, it doesn't run properly from the cmd prompt.
to run the above command in linux/mac, i had to use the eval to execute the command. i don't know what the evivelant cmd is in windows or whether that's the right way to set this up in windows. maybe just running the variable for the 3 above commands will work.
in summary, i'm just trying to get a prompt so i can input the level of contrast/brightness/gamma and then once i pick them, send the commands to change those settings.
the above commands for set property and show text are the correct commands for this, i send them by themselves putting the number in where the variable is in the above setup. so i know the codes are fine, i just can't get this to run like i'm used to in other os'.
i don't need to hear that i should put it into a batch script. i run snippets from a terminal command app while logged into multiple hosts, so i want to double click the snippet and then input the levels i need to change locally on all the hosts. so batch scripting this is not what i'm trying to figure out. i'm trying to get this to run from the cmd prompt.
thanks for the help!
Batch:
echo -e ""
echo -e "Enter Contrast/Brightness/Gamma number (-100 to 100, 0 default)"
echo -e "CONTRAST: "
read c_num
echo -e "BRIGHTNESS: "
read b_num
echo -e "GAMMA: "
read g_num
cnum_command="echo { \"command\": [\"set_property\", \"contrast\", $c_num] } >\\.\pipe\mpvsocket
bnum_command="echo { \"command\": [\"set_property\", \"brightness\", $b_num] } >\\.\pipe\mpvsocket
gnum_command="echo { \"command\": [\"set_property\", \"gamma\", $g_num] } >\\.\pipe\mpvsocket
eval $cnum_command
eval $bnum_command
eval $gnum_command
echo show-text "Brightness: ${brightness} Contrast: ${contrast} Gamma: ${gamma}" 4000 >\\.\pipe\mpvsocket
- -
i know that in windows it's set /p to set the variable, but when i change things above to do that, it doesn't run properly from the cmd prompt.
to run the above command in linux/mac, i had to use the eval to execute the command. i don't know what the evivelant cmd is in windows or whether that's the right way to set this up in windows. maybe just running the variable for the 3 above commands will work.
in summary, i'm just trying to get a prompt so i can input the level of contrast/brightness/gamma and then once i pick them, send the commands to change those settings.
the above commands for set property and show text are the correct commands for this, i send them by themselves putting the number in where the variable is in the above setup. so i know the codes are fine, i just can't get this to run like i'm used to in other os'.
i don't need to hear that i should put it into a batch script. i run snippets from a terminal command app while logged into multiple hosts, so i want to double click the snippet and then input the levels i need to change locally on all the hosts. so batch scripting this is not what i'm trying to figure out. i'm trying to get this to run from the cmd prompt.
thanks for the help!
Last edited by a moderator:
My Computer
System One
-
- OS
- all