需要跳过“输入框”声明并继续下一行 [英] Need a skip "inputbox" statement and continue to next lines

查看:109
本文介绍了需要跳过“输入框”声明并继续下一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个输入框语句,可以采用如下整数:

InputBox(输入数字)

- ----

-------


如果用户在特定时间内没有输入任何输入,比如30秒,我应该能够继续下一行。


请让我知道你怎么能实现这个?

I have an input box statement which can take a integer as below:

InputBox("eneter the number")
-----
-------

If the user doesn''t enter any input for a particular time say 30 secs, i should be able to continue to next line.

Please let me know your how can implement this?

推荐答案

我不认识和逻辑


如果没有数据输入,输入框的用途是什么?
i dont undetsrand the logic

if there is no data input what is the use of input box ?



i dont undetsrand逻辑


如果没有数据输入,输入框的用途是什么?
i dont undetsrand the logic

if there is no data input what is the use of input box ?



================================== ================

''退出计算机

Dim a,b,x,y,z


a = InputBox(_______分钟后退出?)

b = a * 60000

WScript.Sleep b


选择=输入框(如果你想取消输入1,如果你想要仍然注销输入2)

选择案例选择

案例1


MsgBox(再见)


案例2


将strComputer = QUOT;"

将objWMIService = GetObject的(QUOT; winmgmts:{impersonationLevel = impersonat e,以(关机)} \\"&安培; strComputer的&安培;" \root\cimv2")


将colOperatingSystems = objWMIService.ExecQuery _

("从Win32_OperatingSystem" SELECT *)


对于colOperatingSystems中的每个objOperatingSystem

objOperatingSystem.Win32Shutdown(0)

Ne xt


Case Else

MsgBox(无效条目)



结束选择

-----------------


上述代码的意图是:

用户将在特定时间后安排注销PC。在该特定时间之后将提示输入框。如果用户此时可用,他将取消操作,如果用户不可用,则应该注销PC。因此,如果没有为输入框提供输入,我应该能够克服(跳过)从PC注销。


==================================================
'' logging off a Computer
Dim a,b,x,y,z

a= InputBox("log off after _______ minute/s?")
b=a*60000
WScript.Sleep b


Choice = InputBox("if you want cancel enter 1,if yoy want to still log off enter 2")
Select Case choice
Case 1

MsgBox ("bye")

Case 2

strComputer = "."
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonat e,(Shutdown)}\\" & strComputer & "\root\cimv2")

Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")

For Each objOperatingSystem in colOperatingSystems
objOperatingSystem.Win32Shutdown(0)
Next

Case Else
MsgBox("invalid entry")


End select
-----------------

The intention of above code is:

User will schedule log off PC after a particular time. Inputbox will be prompted after that particular time. If the user is available at that time, he will cancel the operation and if the user is not available the PC should be logged off. So If no input is provided for the input box, I should be able to overcome(skip) that log off the PC.


由于输入框是模态窗口,用户必须对此进行响应。


最好使用文本框。


设置默认值。


如果你是用户输入一个超过写入的值。


如果在默认时间间隔后没有使用默认值运行
Since input box is a modal window the user must respond to that.

better use a textbox .

set a default value.

if u user enters a value over write that .

if does not run with default value after the default time interval


这篇关于需要跳过“输入框”声明并继续下一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆