|
TwitterのフォロワーなどのコピーからIDの抽出
- ページ: Macro/投稿
- 作者: kartis?
- カテゴリー: vbs
- 投稿日: 2015-12-26 (土) 22:33:44
メッセージ
- SPAM業者などのフォロワー/フォロイーをコピーした編集中のファイルから
ブロック済み、非公開アカウントを除いた、3文字以上のアカウントをGREPする
- 実行後結果にGREP結果のソート を使用してアカウント一覧のみのリストを作れる
- 現在開いているセーブ済みテキストからgrepするので新規作成してセーブしてないと動作しない
- マクロ動作時に途中セーブするので、書き換えてほしくない場合はコピーしてから実行すること
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
| '非公開アカウント削除
sKey = "非公開ツイート"
GoFileTop
lngLine = ExpandParameter(CStr("$y"))
SearchNext CStr(sKey), CLng(21)
Do Until (ExpandParameter(CStr("$y")) = lngLine)
selectline(0)
Delete(0)
SearchNext CStr("@\w+"), CLng(&H04)
selectline(0)
Delete(0)
lngLine = ExpandParameter(CStr("$y"))
SearchNext CStr(sKey), CLng(21)
Loop
'ブロック中アカウント削除
sKey = "ブロック中"
GoFileTop
lngLine = ExpandParameter(CStr("$y"))
SearchNext CStr(sKey), CLng(21)
Do Until (ExpandParameter(CStr("$y")) = lngLine)
selectline(0)
Delete(0)
SearchNext CStr("@\w+"), CLng(&H04)
selectline(0)
Delete(0)
lngLine = ExpandParameter(CStr("$y"))
SearchNext CStr(sKey), CLng(21)
Loop
FileSave
'3文字以上の@アカウント名でGrep
sKey = "\@[A-z0-9_]{3,16}"
sFile = ExpandParameter(Cstr("$f"))
sPath = ExpandParameter(Cstr("$F"))
if len(sKey) > 0 and sFile <> sPath then
'msgbox spath & "," & sfile
sDir = Left(CStr(sPath), Len(sPath) - Len(sFile) - 1)
Grep sKey, CStr(sFile), CStr(sDir), 25368
end if
|
- 途中経過セーブしてなかったので削除効いてなかったのを修正 --
- アカウントは16文字までなので制限 --
- ブロック済み等の除外は、ブロック済みとかが分かる状態からコピペしたテキストでないと除外できないので、念のため --
|
|