我正在寫一個宏;但在某些時候我需要幫助。
我想要的是批量下載頁面以供離線查看。我用過IDM;但是下載后查看檔案時頁面似乎丟失了。
我還需要能夠自動設定它們的名稱,以便我可以用另一個宏自動替換它們;所以我在 IDM 或類似程式之外撰寫宏。
所以我想用CTRL S Save type: Webpage, Single File方法下載。我做了一切;我只希望它自動將記錄名稱按 1 增加 1。
樣本;
document.selection.StartOfDocument();
nLines = document.GetLines();
for( y = 1; y < nLines; y ) {
str = document.GetLine( y );
if( str.length != 0 ) {
document.selection.OpenLink();
Sleep( 5000 );
shell.SendKeys( "^s" );
Sleep( 500 );
//////////////////////////////////////////////////////////////////
How can I add the command I want at this point?
I can get it to write the number '1'; but it has to increment by 1 each time.
How can I do this code?
//////////////////////////////////////////////////////////////////
shell.SendKeys( "~" );
Sleep( 500 );
shell.SendKeys( "%{F4}" );
Sleep( 500 );
}
document.selection.LineDown(false,1);
}
alert( "Finished Saving" );
在此命令之后,它將為記錄名稱寫入 1。并且每次都會增加 1。
-
- URL - (檔案名將被保存為
1.)
- URL - (檔案名將被保存為
-
- URL - (檔案名將被保存為
2.)
- URL - (檔案名將被保存為
-
- URL - (檔案名將被保存為
3.)
- URL - (檔案名將被保存為
- ...
-
- URL - (檔案名將被保存為
365.)
- URL - (檔案名將被保存為
P.S: To put it another way; When saving the connections, the registration name should be saved as the "Line Number" where that connection is located. That way, after all the files have been downloaded, I'll be able to use my other macro to rename them with the URL they belong to.
Finally; If you know of another way to do what I want, I'd love to hear it.
Thank you in advance and have a nice day.
uj5u.com熱心網友回復:
y是行號。因此,將示例中的注釋行替換為:
shell.SendKeys( y );
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/323619.html
