Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Thanks for mentioning the issue.

Should be fixed here: https://pastebin.com/47HvJPkF

Thanks for trying but your script plainly doesn't work. it throws off a red error too fast then dies. After a zillion tries i could screenshot it, it said that "execution of scripts is disabled in this system." and even though i try a few things on google, nothing worked.

Also i can't find the command to run this file straight through powershell since the shortcut way likes to die before i can humanly read the message.

(1 edit)

That is because the execution policy on your system is set to restricted. I forgot that this is the default, sorry about that. Also the script needs an update, because gelbooru changed their auto complete url.


Execution Policy:

If you want to run it and don't want to change the system settings to allow all scripts to be run (which I would not advise if you do not need it), then create a .bat file (e.g. start.bat) in the folder with the start.ps1 script.

Open it with any plain editor like good old notepad and paste this script:

powershell -executionpolicy RemoteSigned -File "start.ps1"

Which will set the execution policy for this one instance of powershell and make the script runnable.


Update:

Here is the updated version of the script to accept the auto completes in a JSON format.

https://pastebin.com/vmzTytxA

(1 edit)

Well, thank you for replying, now we're getting somewhere but not quite there.

I followed your instructions, with your most up to date script and i got this error:


The term 'Invoke-WebRequest' is not recognized as the name of a cmdlet, 
function, script file, or operable program. 
Check the spelling of the name, or if a path was included, 
verify that the path is correct and try again.
At C:\waifu_solitaire v2.0.0\waifu_solitaire\v2.0.0\start.ps1:83 char:37
+             $img = Invoke-WebRequest <<<<  $Matches[1] -OutFile $out_path
    + CategoryInfo          : ObjectNotFound: (Invoke-WebRequest:String) [], C
   ommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

I did some digging and turns out the Invoke-Webrequest was removed from Powershell 5. 

This guy seemingly have recreated the function itself, but when i tried to implement it a quick red message would appear and crash the cmd, can't debug, too fast. Maybe you have better tools:

https://github.com/cloudbase/unattended-setup-scripts/blob/master/FastWebRequest...

No, Invoke-WebRequest is present in version 5 (I am running 5.1 and it is still there). I found a post where it is explained, that the alias wget is deprecated in 5.1, but the original function is still there.

The only time where Invoke-WebRequest would not be present for you would be if you ran version 2 or lower. This is only the case on Windows 7. You can check this if you run a powershell window (Just type powershell into your windows search or press the Windows Key + R, type powershell and run it).

There type the command:

$PSVersionTable.PSVersion

If this shows for the Major column a version lower than 3 you are running on an old version and a solution for you would be to update your version here then it should run. 

As much as I want to fix this game I really don't want to find workarounds for web requests and Json parsing in version 2.0. I did this at one point for other stuff and it is a pain in the arse :P . (Also the version 2 on my system is somehow busted and I would either need to reinstall windows, setup a windows 7 VM or something similar just to test stuff.)

(+1)

Ah. I forgot to mention. I RUN Windows 7.  I don't like Win 10 since it uses way more of my Ram

I take it that this is a limitation of my own S.O., right?

Welp. Thank you for trying so hard in that case. We got so close tho.

Windows 7 just does not ship initially with the latest powershell but with the link here, you can download the installation for the newer powershell. This is the link for the installation to powershell 5.1 for Windows 7.

You don't have to update your OS just for that :)

I apologise as I do not wish to bother you any further however I've followed your steps on windows 10 and tried to run it but end up with this error and I really love this game

Invoke-WebRequest : The remote name could not be resolved: 'https'  At D:\;)\waifu_solitaire\v2.0.0\start1.ps1:82 char:25  +             $response = Invoke-WebRequest $url  +                         ~~~~~~~~~~~~~~~~~~~~~~          + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException          + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand   Invoke-WebRequest : Cannot validate argument on parameter 'Uri'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again. At D:\;)\waifu_solitaire\v2.0.0\start1.ps1:88 char:38  +             $img = Invoke-WebRequest $Matches[1] -OutFile $out_path  +                                      ~~~~~~~~~~~          + CategoryInfo          : InvalidData: (:) [Invoke-WebRequest], ParameterBindingValidationException          + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.InvokeWebRequestCommand 

Im not proficient in powershell script however I believe this line 

($response.Content | Select-String -Pattern 'js-pop" id="p.\d*" href="(.*?)"' -AllMatches) 

Is returning null

No worries. I wrote it and fixing it because gelbooru is changing its website is really not a big deal. I rather have to thank you for posting the error and so on. Helped a lot with fixing it :)

Should be working now with this script: https://pastebin.com/K1ae96KX

Honestly can't thank you enough :D I really love this game and seeing it go to ruin is so sad so thank you again for creating fixes :DD

Glad to see that you keep it updated ^^

I know i might be asking too much but is it possible for you to change it to other website like Rule34.xxx or at least teach me how to? I spent time googling finding the regexes to no avail  and trying to mess around with the coding on my own by changing the website.

Thanks in advanc

It's hard work when you're flying blind.   Nice effort thinking ahead to guess where user might have the problem.    Many don't.  Kudos.