找回密码
 加入
搜索
查看: 3294|回复: 4

[效率算法] 自己做的淘宝合成关键词,求改效率,请指教。已经删除*.txt

[复制链接]
发表于 2012-8-6 16:56:24 | 显示全部楼层 |阅读模式
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Documents and Settings\Administrator\桌面\Form1.kxf
$Form1 = GUICreate("淘宝关键词生成器1.1", 1113, 548, 186, 118)
$Group1 = GUICtrlCreateGroup("一级", 8, 0, 185, 505)
$Edit1 =GUICtrlCreateEdit("", 16, 16, 169, 481)
GUICtrlSetData(-1, FileRead ("a.txt"))
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("二级", 200, 0, 185, 505)
$Edit2 = GUICtrlCreateEdit("", 208, 16, 169, 481)
GUICtrlSetData(-1, FileRead ("b.txt"))
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group3 = GUICtrlCreateGroup("三级", 392, 0, 185, 505)
$Edit3 = GUICtrlCreateEdit("", 400, 16, 169, 489)
GUICtrlSetData(-1, FileRead ("c.txt"))
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group4 = GUICtrlCreateGroup("四级", 584, 0, 185, 505)
$Edit4 = GUICtrlCreateEdit("", 592, 16, 169, 481)
GUICtrlSetData(-1, FileRead ("d.txt"))
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group5 = GUICtrlCreateGroup("生成关键词", 776, 0, 329, 505)
$Edit5 = GUICtrlCreateEdit("", 784, 16, 313, 481)
GUICtrlSetData(-1, "")
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("一键生成", 840, 512, 177, 33)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $Button1
;~                         FileDelete("*.txt")
                        $a1 = GUICtrlRead ($Edit1)
                        $b2 = GUICtrlRead ($Edit2)
                        $c3 = GUICtrlRead ($Edit3)
                        $d4 = GUICtrlRead ($Edit4)
                        FileWriteLine("a.txt", $a1)
                        FileWriteLine("b.txt", $b2)
                        FileWriteLine("c.txt", $c3)
                        FileWriteLine("d.txt", $d4)


For $i = 1 To 100 Step 1
        $Num1 =FileReadLine ( "a.txt", $i )
        If $Num1 = "" Then ExitLoop
                For $ii = 1 To 100 Step 1
                        $Num2 = FileReadLine ( "b.txt", $ii )
                        If $Num2 = "" Then ExitLoop
                                        For $iii = 1 To 100 Step 1
                                                $Num3 = FileReadLine ( "c.txt", $iii )
                                                If $Num3 = "" Then ExitLoop
                                       
                                                For $iiii = 1 To 100 Step 1
                                                        $Num4 = FileReadLine ( "c.txt", $iiii )
                                                        If $Num4 = "" Then ExitLoop
                               
                                                        $Num = $Num1&$Num2&$Num3&$Num4
                                                        GUICtrlSetData ( $Edit5, $Num )
                                                        FileWriteLine("zong.txt", $Num)
                                                Next
                                        Next
                Next
Next
       


        GUICtrlSetData ( $Edit5, FileRead ( "zong.txt" , 9999999 ) )
        EndSwitch
WEnd
发表于 2012-8-6 22:11:03 | 显示全部楼层
还淘宝,明明就是在收拾几个TXT文件嘛,如果文件不多,你用一个INI文件简单多了
发表于 2012-8-7 09:05:12 | 显示全部楼层
我感觉楼主的内容写的很不错,但我相信不久的将来,我也会写出来的!顶楼主!
 楼主| 发表于 2012-8-8 14:39:09 | 显示全部楼层
回复 2# 502762378


    淘宝代销,现在要自己弄标题了。所以一次大概要上架1000个左右的关键词。

如果是自己想,除非是脑残了。

看看有没有人能优化一下。
 楼主| 发表于 2012-8-9 13:58:06 | 显示全部楼层
看看有没有人能优化一下。速度挺慢
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-3 13:03 , Processed in 0.077561 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表