我尝试在.cmd文件中创建一个循环.
如果test.txt不存在,那么我将终止cmd进程.
@echo off
if not exists test.txt goto exit
Run Code Online (Sandbox Code Playgroud)
但是这段代码不起作用,我不知道如何每2秒做一次循环.
感谢帮助.
如何从输入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
有人能帮我吗?
我尝试在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)
我希望有一个人可以帮助我.
问候
有没有办法更改cmd标题?我写了一个vbs程序。但是dos标题不好。
名称是 c:\windows\system32\cscript.exe 我尝试使用:
标题 the_name 和标题 ="姓名"
但两者都不起作用。
感谢帮助。
每次当我尝试使用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) 有人一个脚本/或可以帮助我检查,是否有可用的服务器的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窗体应用程序,它将读取文本文件并将文本文件的字段放入文本框中.
文本文件格式示例:
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应用程序有一个Next
和Back
按钮,以便它可以遍历记录.
我不知道如何在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)
这是我的设置图片:
我希望有人作为一个想法:-)
感谢帮助
我有一个Dictionary
键和值都是字符串的地方.通过使用可以获得密钥的值[]
.但是[]
期待一个字符串.是否可以通过使用数字而不是String键来获取键的值?
Dictionary<String, String> m_GermanEnglish = new Dictionary<String, String>();
m_GermanEnglish.Add("der", "the");
Run Code Online (Sandbox Code Playgroud)