X



テスト
0001デフォルトの名無しさん
垢版 |
2020/06/10(水) 15:44:50.43ID:mTSVbvel
テスト
0071デフォルトの名無しさん
垢版 |
2024/04/14(日) 11:26:35.91ID:A6nc8mUa
「@if …」から「//end」の範囲を CompileUpdateNewPostFtd.bat として保存

@if (0)==(0) echo off
set jsc=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\jsc.exe
"%jsc%" /nologo /debug+ /fast- /t:winexe /out:"%~dp0UpdateNewPostFtd.exe" "%~f0"
exit /b %ERRORLEVEL%
@end
import Microsoft.Win32;
import System;
import System.IO;
var arguments: String[] = Environment.GetCommandLineArgs();
if (arguments.Length == 1)
    Environment.Exit(0);
const live5chRegistoryKey: String
    = "HKEY_CURRENT_USER\\Software\\VB and VBA Program Settings\\Live2ch\\";
var live5chPath: String = Registry.GetValue(live5chRegistoryKey + "Path",
    "Path", Environment.CurrentDirectory + "/live2ch.exe");
var live5chDirectory: String = Path.GetDirectoryName(live5chPath);
var ftdPostFile = live5chDirectory + "\\newpost.ftd";
var maxPost: int = Int32.Parse(Registry.GetValue(
    live5chRegistoryKey + "Setting",
    "FtdMaxPost", Environment.CurrentDirectory + "\\live2ch.exe"));
/*
0072デフォルトの名無しさん
垢版 |
2024/04/14(日) 11:27:31.43ID:A6nc8mUa
*/
var arg: String = arguments[1];
var url: String;
if (/^https?:(\/\/.+\/)/.test(arg))
    url = "http:" + RegExp.$1;
else
    Environment.Exit(1);
var postUrl: Array = [url];
var sr : StreamReader = new StreamReader(ftdPostFile);
while (! sr.EndOfStream) {
    var u: String = sr.ReadLine();
    if (u != url)
        postUrl.push(u);
    if (postUrl.Length == maxPost)
        break;
}
sr.Close();
var sw : StreamWriter = new StreamWriter(ftdPostFile);
for (var i = 0; i < postUrl.length; i++)
    sw.WriteLine(postUrl[i]);
sw.Close();
//end
レスを投稿する


ニューススポーツなんでも実況