|
electronixtar
铂金会员
      
积分 7493
发帖 2672
注册 2005-9-2
状态 离线
|
|
2006-11-1 05:22 |
|
|
electronixtar
铂金会员
      
积分 7493
发帖 2672
注册 2005-9-2
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
提示:
1. 该批处理的参数比较严格:网址前必须有 http:// 或 ftp:// ,否则出错。
例如,我保存第二个代码为: iGet.bat,然后我运行
iGet.bat ftp://www.dormforce.net 就可以得到一个FTP的内容,然后结合 for 就可以输出FTP的列表
2. 该批处理会直接把结果输出到屏幕,要保存到文件,请使用 > 或者 >> 重定向
3. 该批处理的好处是不需要任何组件(xmlhttp),能自动处理编码问题,缺点是:如果原网页有弹出广告的话,还是会弹出的。如果要完全后台安静下载,可以用经典的 iGet.vbs http://xxxxxx C:\down.htm
该 iGet.vbs 不能直接得到网页文本
Set xPost = CreateObject("Microsoft.XMLHTTP")
xPost.Open "GET",LCase(WScript.Arguments(0)),0
xPost.Send()
Set sGet = CreateObject("ADODB.Stream")
sGet.Mode = 3
sGet.Type = 1
sGet.Open()
sGet.Write(xPost.responseBody)
sGet.SaveToFile LCase(WScript.Arguments(1)),2
Last edited by electronixtar on 2006-11-1 at 05:42 AM ]
Tips:
1. The parameters of this batch processing are relatively strict: there must be http:// or ftp:// before the URL, otherwise an error will occur.
For example, I save the second code as: iGet.bat, then I run
iGet.bat ftp://www.dormforce.net can get the content of an FTP, and then combine with for to output the list of FTP
2. This batch processing will directly output the result to the screen. To save it to a file, use > or >> for redirection
3. The advantage of this batch processing is that it does not require any components (xmlhttp) and can automatically handle encoding problems. The disadvantage is: if the original web page has pop-up ads, it will still pop up. If you want to completely download in the background quietly, you can use the classic iGet.vbs http://xxxxxx C:\down.htm
This iGet.vbs cannot directly get the web page text
Set xPost = CreateObject("Microsoft.XMLHTTP")
xPost.Open "GET",LCase(WScript.Arguments(0)),0
xPost.Send()
Set sGet = CreateObject("ADODB.Stream")
sGet.Mode = 3
sGet.Type = 1
sGet.Open()
sGet.Write(xPost.responseBody)
sGet.SaveToFile LCase(WScript.Arguments(1)),2
Last edited by electronixtar on 2006-11-1 at 05:42 AM ]
|

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>" |
|
2006-11-1 05:26 |
|
|
vkill
金牌会员
     
积分 4103
发帖 1744
注册 2006-1-20 来自 甘肃.临泽
状态 离线
|
|
2006-11-1 05:28 |
|
|
electronixtar
铂金会员
      
积分 7493
发帖 2672
注册 2005-9-2
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
我倒是有一个想法,像
@echo off
<"%~f0" more +5 >tmp.vbs
cscript //NoLogo /e:vbscript tmp.vbs %1
del tmp.vbs
goto:eof
这样的,每次我都要重复写,干脆联盟成立一个标准的可以拿来引用(include)的批处理头(header),然后每次大家的格式都统一点
如果有高人再写一个批处理的IDE,呵呵,就可以大大的简化批处理的书写了。
Last edited by electronixtar on 2006-11-1 at 05:32 AM ]
I do have an idea. Like
@echo off
<"%~f0" more +5 >tmp.vbs
cscript //NoLogo /e:vbscript tmp.vbs %1
del tmp.vbs
goto:eof
In this way, I have to repeat writing it every time. It would be better to establish a standard batch processing header that can be referenced (include) by the China DOS Union, so that everyone's formats can be unified.
If there are experts who can write a batch processing IDE, heh, it can greatly simplify the writing of batch processing.
Last edited by electronixtar on 2006-11-1 at 05:32 AM ]
|

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>" |
|
2006-11-1 05:30 |
|
|
vkill
金牌会员
     
积分 4103
发帖 1744
注册 2006-1-20 来自 甘肃.临泽
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
Originally posted by electronixtar at 2006-11-1 05:30:
我倒是有一个想法,像
这样的,每次我都要重复写,干脆联盟成立一个标准的可以拿来引用(include)的批处理头(header),然后每次大家的格式都 ...
我在想:
set/p 1= 批处理名字:
set/p 2= 批处理中间内容:
echo .............
只是这样想想,不过最好是出个写的标准 ,那样更容易阅读的,不要一个个写的天书似的,例如开头先写
:: 思路:
:: 原理:
等等
Originally posted by electronixtar at 2006-11-1 05:30:
I actually have an idea, like
this, every time I have to repeat writing, it might be better for the union to establish a standard batch processing header that can be included, and then everyone's format ...
I'm thinking:
set/p 1= Batch processing name:
set/p 2= Batch processing intermediate content:
echo .............
Just thinking about it, but it's best to come up with a writing standard, so that it's easier to read, not written like天书one by one. For example, first write at the beginning
:: Idea:
:: Principle:
and so on
|
|
2006-11-1 05:36 |
|
|
无奈何
荣誉版主
      
积分 1338
发帖 356
注册 2005-7-15
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
Re electronixtar
可以在“新建”里指定模板文件。
比如将上述内容保存到D:\BAT\template.cmd
然后添加下面的注册表项。
Windows Registry Editor Version 5.00
"FileName"="D:\\BAT\\template.cmd"
Re electronixtar
You can specify the template file in "New".
For example, save the above content to D:\BAT\template.cmd
Then add the following registry entry.
Windows Registry Editor Version 5.00
"FileName"="D:\\BAT\\template.cmd"
|

☆开始\运行 (WIN+R)☆
%ComSpec% /cset,=何奈无── 。何奈可无是原,事奈无做人奈无&for,/l,%i,in,(22,-1,0)do,@call,set/p= %,:~%i,1%<nul&ping/n 1 127.1>nul
|
|
2006-11-1 06:42 |
|
|
electronixtar
铂金会员
      
积分 7493
发帖 2672
注册 2005-9-2
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
无奈何 兄高招啊!学习
There is no translation needed as the text is in Chinese but the request is to translate from Chinese to English. Wait, no, the user provided "无奈何 兄高招啊!学习" which is Chinese. So the translation is "Brother Nai Wu He, great move! Learning"
|

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>" |
|
2006-11-9 11:30 |
|
|
ccwan
金牌会员
     
积分 2725
发帖 1160
注册 2006-9-23 来自 河北廊坊
状态 离线
|
|
2006-11-9 21:26 |
|
|
scriptor
银牌会员
    
积分 1187
发帖 555
注册 2006-12-21
状态 离线
|
『第 9 楼』:
zan 一个
使用 LLM 解释/回答一下
不错
不过还是借用了vbs 等其他的方法,能不能只用dos命令的,而且不要ie的
纯粹在dos 的那个黑色界面下,那就更好了。
哈哈。。。
谁能写一个batch啊??
Not bad
But still borrowed methods like vbs, etc. Can it only use DOS commands and not use IE?
Purely in the DOS black interface, that would be even better.
Haha...
Who can write a batch?
|
|
2006-12-22 16:17 |
|
|
wudixin96
银牌会员
    
积分 1928
发帖 931
注册 2007-1-6
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
骗人。用vbs的。o(∩_∩)o...哈哈。
不过也学习了。
Cheating. Using VBS. o(∩_∩)o... Haha. But also learned.
|
|
2007-4-7 00:17 |
|
|
everest79
金牌会员
      一叶枝头,万树皆春
积分 2564
发帖 1127
注册 2006-12-25
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
est失踪一段时间了哦
以下是我在网上D来的
if lcase(right(wscript.fullname,11))="wscript.exe" then
shell.run("cmd.exe /k echo off&cls&cscript //nologo "&chr(34)&wscript.scriptfullname&chr(34))
wscript.quit
end if
est has been missing for a while oh
The following is what I got from the Internet
if lcase(right(wscript.fullname,11))="wscript.exe" then
shell.run("cmd.exe /k echo off&cls&cscript //nologo "&chr(34)&wscript.scriptfullname&chr(34))
wscript.quit
end if
|
|
2007-4-7 01:23 |
|
|
everest79
金牌会员
      一叶枝头,万树皆春
积分 2564
发帖 1127
注册 2006-12-25
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
看到楼主的贴我有点模糊的想法,是否我们一直追求的隐藏运行批处理也可以利用模版VBS来达成
After seeing the thread starter's post, I have a vague idea. Can the hidden execution of batch processing that we have been pursuing all the time also be achieved by using a template VBS?
|
|
2007-4-7 01:39 |
|
|
estar
中级用户
  
积分 346
发帖 103
注册 2004-4-6
状态 离线
|
|
2007-4-7 05:21 |
|
|
everest79
金牌会员
      一叶枝头,万树皆春
积分 2564
发帖 1127
注册 2006-12-25
状态 离线
|
『第 14 楼』:
使用 LLM 解释/回答一下
老实说你是不是马甲
To be honest, are you a sock puppet?
|
|
2007-4-7 07:12 |
|
|
ygrzzz
初级用户
 
积分 62
发帖 24
注册 2008-9-17
状态 离线
|
『第 15 楼』:
使用 LLM 解释/回答一下
楼主把vbs代码搬进了批处理文件里,给vbscript脚本换了个外衣~~~
这外衣下面能不能再穿条批处理自己的裤子呢?
就是批处理完成一部分工作
遇到功能薄弱处再借助vbs来辅助一下,2者混编,比如
@echo off
IF exist tmp.vbs (start notepad&del tmp.vbs&exit) ELSE goto scr
:scr
<"%~f0" more +6 >tmp.vbs
cscript //NoLogo /e:vbscript tmp.vbs %1
goto:eof
Set oDOM = WScript.GetObject(WScript.Arguments(0))
do until oDOM.readyState = "complete"
WScript.sleep 200
loop
WScript.echo oDOM.documentElement.outerText
程序的 实际起效流程是先vbs完成部分任务,接着批处理完成余下的任务
我是新手,不过杂7杂8的代码收集了一大堆有些vbs代码单一功能不错想借助一下,然后利用相对易懂的批处理做一些功能的衍变
这样的思路是不是可行啊
The LZ moved the VBS code into the batch file and gave the VBScript script a new coat~~~
Can there be another pair of batch processing pants under this coat?
That is, the batch processing completes part of the work
When encountering weak functions, it then uses VBS to assist, and the two are mixed, such as
@echo off
IF exist tmp.vbs (start notepad&del tmp.vbs&exit) ELSE goto scr
:scr
<"%~f0" more +6 >tmp.vbs
cscript //NoLogo /e:vbscript tmp.vbs %1
goto:eof
Set oDOM = WScript.GetObject(WScript.Arguments(0))
do until oDOM.readyState = "complete"
WScript.sleep 200
loop
WScript.echo oDOM.documentElement.outerText
The actual effective process of the program is that VBS completes part of the task first, and then the batch processing completes the remaining tasks
I'm a novice, but I've collected a large number of various codes. Some VBS code has a good single function and I want to use it with the help, and then use the relatively easy-to-understand batch processing to make some functional evolutions
Is this idea feasible?
|
|
2008-9-26 22:54 |
|