小编Seb*_*ian的帖子

如果不存在则退出+ cmd

我尝试在.cmd文件中创建一个循环.

如果test.txt不存在,那么我将终止cmd进程.

@echo off
if not exists test.txt goto exit
Run Code Online (Sandbox Code Playgroud)

但是这段代码不起作用,我不知道如何每2秒做一次循环.

感谢帮助.

cmd dos

9
推荐指数
1
解决办法
3万
查看次数

超值Javascript输入

如何从输入1中传输值2并添加一些字母?

<script type="text/javascript">

function doit(){
document.getElementById('input2').value=document.getElementById('input1').value;
}

</script>
Run Code Online (Sandbox Code Playgroud)

输入1:2342

输入2:pcid2342d

有人能帮我吗?

html javascript input string-concatenation

4
推荐指数
1
解决办法
2万
查看次数

c#中的Foreach问题

我尝试在c#中创建一个foreach循环.在textbox1中是位置,现在我将尝试列出textbox2中的所有文件夹.但我没有找到错误:

        string[] filePaths = Directory.GetFiles(@"" + textBox1.Text + "");
        foreach (string value in filePaths)
        {
            textBox2.Text = "" + value + "\n";
        }
Run Code Online (Sandbox Code Playgroud)

我希望有一个人可以帮助我.

问候

c# foreach winforms

2
推荐指数
2
解决办法
483
查看次数

使用 vbscript 更改控制台标题

有没有办法更改cmd标题?我写了一个vbs程序。但是dos标题不好。

名称是 c:\windows\system32\cscript.exe 我尝试使用:

标题 the_name 和标题 ="姓名"

但两者都不起作用。

感谢帮助。

vbscript wsh

1
推荐指数
1
解决办法
7536
查看次数

HTA文件中的Javascript

每次当我尝试使用vbscript在hta文件中添加javascript时,当我单击提交按钮时会出现错误消息:

object doesn't support this property or method
Run Code Online (Sandbox Code Playgroud)

我试试这个

<script type="text/javascript" src=""></script>
Run Code Online (Sandbox Code Playgroud)

还有这个

    <script type="text/javascript">
       ...code
    </script>
Run Code Online (Sandbox Code Playgroud)

有谁知道这个问题?

//编辑:我有问题,我忘记了一个VBScript:调用vbscript sub感谢!!

<input type="submit" value=" Submit " onclick="Submit" style="margin-left:100px;">
Run Code Online (Sandbox Code Playgroud)

这是正确的:

<input type="submit" value=" Submit " onclick="VBScript:Submit" style="margin-left:100px;">
Run Code Online (Sandbox Code Playgroud)

javascript vbscript hta

1
推荐指数
1
解决办法
6449
查看次数

Windows Update检查vbscript

有人一个脚本/或可以帮助我检查,是否有可用的服务器的Windows更新?

所以当黄色更新图标在任务栏中时,我会收到一封邮件.

我的想法是:如果wuauclt.exe在任务栏中超过10分钟,则发送邮件.

但我不知道这个.

我发现只有这个:

Dim strComputer, strProcess
Do
   strProcess = inputbox( "Please enter the name of the process (for instance: explorer.exe)", "Input" )
Loop until strProcess <> ""
Do
   strComputer = inputbox( "Please enter the computer name", "Input" )
Loop until strComputer <> ""
If( IsProcessRunning( strComputer, strProcess ) = True ) Then
    WScript.Echo "Process " & strProcess & " is running on computer " & strComputer
Else
    WScript.Echo "Process " & strProcess & " is NOT running on …
Run Code Online (Sandbox Code Playgroud)

windows vbscript process

1
推荐指数
1
解决办法
4622
查看次数

如何使用C#解析文本文件?

我想创建一个Windows窗体应用程序,它将读取文本文件并将文本文件的字段放入文本框中.

文本文件格式示例:

Name;Surname;Birthday;Address

Name;Surname;Birthday;Address
Run Code Online (Sandbox Code Playgroud)

的WinForms

Name: textboxname

Surname: textboxsurname

Birthday: textboxbirth

Address: textboxaddress
Run Code Online (Sandbox Code Playgroud)

我还希望这个Winforms应用程序有一个NextBack按钮,以便它可以遍历记录.

我不知道如何在C#中做到这一点.我从哪里开始?

c# string winforms

0
推荐指数
1
解决办法
5418
查看次数

在c#中保存用户设置

我尝试在c#中保存用户设置.

我可以读取值并将其放在文本框中,但我无法更改它.

这是我的WindowsForm,带有文本框和保存按钮:

    namespace tool
{
    public partial class Form4 : Form
    {
        string source = Properties.Settings.Default.Source;
        public Form4()
        {
            InitializeComponent();
        }

        private void Form4_Load(object sender, EventArgs e)
        {
            textBox1.Text = source;
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void save_Click(object sender, EventArgs e)
        {
            Properties.Settings.Default.Source = source;
            Properties.Settings.Default.Save();
            Application.Exit();
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

这是我的设置图片:

在此输入图像描述

我希望有人作为一个想法:-)

感谢帮助

c# settings

0
推荐指数
1
解决办法
2379
查看次数

按编号检索字典项目

我有一个Dictionary键和值都是字符串的地方.通过使用可以获得密钥的值[].但是[]期待一个字符串.是否可以通过使用数字而不是String键来获取键的值?

Dictionary<String, String> m_GermanEnglish = new Dictionary<String, String>();
m_GermanEnglish.Add("der", "the");
Run Code Online (Sandbox Code Playgroud)

c# string dictionary key

0
推荐指数
1
解决办法
959
查看次数