Macro/投稿/237 のバックアップ(No.6)




TwitterのフォロワーなどのコピーからIDの抽出

  • ページ: Macro/投稿
  • 作者: kartis?
  • カテゴリー: vbs
  • 投稿日: 2015-12-26 (土) 22:33:44

メッセージ

  • SPAM業者などのフォロワー/フォロイーをコピーした編集中のファイルから ブロック済み、非公開アカウントを除いた、3文字以上のアカウントを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

  • 途中経過セーブしてなかったので削除効いてなかったのを修正 -- 2016-01-31 (日) 18:05:41
  • アカウントは16文字までなので制限 -- 2016-05-19 (木) 19:19:29

URL B I U SIZE Black Maroon Green Olive Navy Purple Teal Gray Silver Red Lime Yellow Blue Fuchsia Aqua White

    ホーム 一覧 単語検索 最終更新 バックアップ リンク元   ヘルプ   最終更新のRSS