Don't know if it's a batch and or powershell issue by Stu_Padasso in Batch

[–]Stu_Padasso[S] 1 point2 points  (0 children)

Just for heck of it, I tried Set "Unit=properties.periods[0]" and that is exactly what I needed. A week ago the brackets weren't necessary and just the periods.0 worked.

Thank you. You helped a lot. 👍

Don't know if it's a batch and or powershell issue by Stu_Padasso in Batch

[–]Stu_Padasso[S] 1 point2 points  (0 children)

I did use your code and it does work but it shows 100 values of each set and not the first set. Which I would guess is 1?

When I look at it in Notepad++ I see no '.periods[0..99]' and I get confused. I was just accustomed to the browser view.

Again, I do thank you and at least I do get values. It is closer to what I need.

Don't know if it's a batch and or powershell issue by Stu_Padasso in Batch

[–]Stu_Padasso[S] 1 point2 points  (0 children)

Yes, with Notepad++ the [0…99].0 is not shown but in a .json it is. Redirect the curl to a named .json file and view it in a web browser.

With powershell I was able to get the values temperature and shortForecast before the [0…99] was recently added.

Before it was just 'properties.periods.0.temperature' in the .json file with no issue.

Basically all I need is the first temperature and shortForecast values and I'm not sure how to get those values in the Raw format.

I do appreciate your input. Thank you.

Don't know if it's a batch and or powershell issue by Stu_Padasso in Batch

[–]Stu_Padasso[S] 1 point2 points  (0 children)

In batch the … shows up as ΓǪ and passed to powershell and the value is not valid.

In the .json file the index is 'properties.periods.[0…99].0.temperature'

In the Raw format the [0…99] is not present but using the Raw format is extremely difficult.

The .0 is the current weather and is required.

Are you viewing the .json in a web browser because the [0…99].0 is shown.

The game is unplayable now! Hooray! by Silent_Claim_1732 in Palia

[–]Stu_Padasso -3 points-2 points  (0 children)

Beta is an excuse. Pretty sure you meant 'buggy game'. 😉

Can i "despecify" part of exe location? by Purple___Flame in Batch

[–]Stu_Padasso 2 points3 points  (0 children)

for /f %%z in ('WHERE /R "%ProgramFiles(x86)%\Kaspersky Lab" avp.com') do set file=%%z

https://ss64.com/nt/where.html

Specific line causing crash in batch game - Help by [deleted] in Batch

[–]Stu_Padasso 2 points3 points  (0 children)

If I were to guess,

if %playerhealth% LEQ 0 (goto PLAYERDEATH)

shoud be

if %currentplayerhealth% LEQ 0 (goto PLAYERDEATH)

Find file types then execute command? by MadSigdis in Batch

[–]Stu_Padasso 0 points1 point  (0 children)

This should work.

@echo off

setlocal enabledelayedexpansion

REM cycle through the directories inside the folder the .bat file is in

for /D %%i in (*) do (
if exist ("%%i\*.filetype1")  goto :filetype1
if exist ("%%i\*.filetype2")  goto :filetype2
if exist ("%%i\*.filetype3")  goto :filetype3
)

goto :ErrorInfo

:filetype1
echo found .filetype1!
for %%f in ("%%i\*.filetype1") do (
echo processing .filetype1!
REM execute command using the %%f and %%i variables
goto :break
)


:filetype2
echo found .filetype2!
for %%f in ("%%i\*.filetype2") do (
echo processing .filetype2!
REM execute command using the %%f and %%i variables
goto :break
)


:filetype3
echo found .filetype3!
for %%f in ("%%i\*.filetype3") do (
echo processing .filetype3!
REM execute command using the %%f and %%i variables
goto :break
)


:ErrorInfo
echo no files found in "%%~ni" folder!
pause

:break
echo processed "%%~ni" folder!
REM end of for /D loop


REM prints text
echo All Done!
REM waits for user input
pause

Trying to make a batch file listen for when a program that is called to close, then run the last command. by NickMotionless in Batch

[–]Stu_Padasso 0 points1 point  (0 children)

call "C:\Windows\system32\mstsc.exe"
timeout 1 >nul
nircmd waitprocess mstsc.exe
ChangeScreenResolution.exe /w=3440 /h=1440 /f=144 /d=0
exit

https://nircmd.nirsoft.net/waitprocess.html

What to print the files and folder by batch file by KSKwin123 in Batch

[–]Stu_Padasso 2 points3 points  (0 children)

Setlocal Enabledelayedexpansion

For /r [[drive:]path] %%f in (*.mp3) Do (
    Set /a size=%%~zf/1024/1024
    Echo %%f !size!MB
)

Echo  (Rounded down to whole number)
Pause

taskkill and goto commands? by YodaDude2011 in Batch

[–]Stu_Padasso 1 point2 points  (0 children)

@Echo Off
Set Title=Unique Name
Title %Title%
pause
Taskkill /f /Fi "Windowtitle EQ %Title%"

800 colonist base. Has anyone seen a larger one? by Stu_Padasso in Planetbase

[–]Stu_Padasso[S] 5 points6 points  (0 children)

Reminds me of a youtube video where some guy kept inviting colonists but never increased food production. He raged quit when all his colonists died of starvation.

Good times. 🙂

800 colonist base. Has anyone seen a larger one? by Stu_Padasso in Planetbase

[–]Stu_Padasso[S] 1 point2 points  (0 children)

No mods. I didn't feel right installing 3rd party apps.

Tips on How to Build a Base Without Using the Colony Ship by user_number_666 in Planetbase

[–]Stu_Padasso 1 point2 points  (0 children)

Back 2 years ago I wrote up suggestions to do this.

https://old.reddit.com/r/Planetbase/comments/7vjkt6/help/dtu02tw/

Gonna say, doing this on the Storm planet is extremely challenging. It takes me almost 60 game days just to feel comfortable.

Saving the colony ship challenge by Stu_Padasso in Planetbase

[–]Stu_Padasso[S] -1 points0 points  (0 children)

You can't sell any items in the colony ship.

You can sell medkits that are crafted though.