File: C:/xampp/htdocs/Fogra778/Fogra_CGATES_12754.au3
#include <Date.au3>
#Include <Array.au3>
#include <GUIConstants.au3>
#Include <File.au3>
#include <String.au3>
;#include <_sql.au3>
#include <INet.au3>
#include <AutoItConstants.au3>
HotKeySet("^`", "Terminate")
$ok1=1
$k=0
While $k <= 10000000000
Opt("WinTitleMatchMode", 2)
Opt("PixelCoordMode",2)
msgbox(0,$k,"�Ұʺʬ�",1)
while WinExists("[TITLE:ColorPort; CLASS:#32770]", "")
winactivate("[TITLE:ColorPort; CLASS:#32770]", "")
sleep(500)
send("{enter}")
sleep(500)
SplashTextOn("ĵ�i", "��Ʀ��~�A���s���q!",500, 100, -1, -1, 0, "", 24)
Sleep(2000)
SplashOff()
wend
winactivate("[CLASS:RBWindow]","")
sleep(500)
;15791353 F0F4F9 16777215 FFFFFF 7775850 76A66A
$var = PixelGetColor( 212 , 466 )
while $var<16777215
while WinExists("[TITLE:ColorPort; CLASS:#32770]", "")
winactivate("[TITLE:ColorPort; CLASS:#32770]", "")
sleep(500)
send("{enter}")
sleep(500)
SplashTextOn("ĵ�i", "��Ʀ��~�A���s���q!",500, 100, -1, -1, 0, "", 24)
Sleep(2000)
SplashOff()
wend
;while title
ControlClick("ColorPort", "�x�s���", "[CLASS:Button; INSTANCE:4]")
sleep(500)
while WinExists("�x�s -")
if WinExists("�x�s - CGATS") then
;WinSetTrans("�x�s - CGATS", "", 10) ; Make Notepad window semi-transparent.
sleep(500)
ControlClick("�x�s - CGATS", "�x�s", "[CLASS:Button; INSTANCE:1]")
sleep(500)
Else
sleep(500)
MsgBox(0, "", "CGATES was not active",1)
sleep(500)
ControlClick("[CLASS:RBWindow]", "", "ComboBox1")
sleep(1000)
Send("cg")
sleep(500)
send("{enter}")
sleep(500)
;ControlClick("[CLASS:RBWindow]", "", "ComboBox2")
;sleep(700)
;Send("{up}")
;sleep(1000)
;send("{enter}")
;sleep(700)
sleep(700)
ControlClick("�x�s - CGATS", "�x�s", "[CLASS:Button; INSTANCE:1]")
sleep(500)
;wend
endif
;;if
$rn=Random(0, 100, 1)
;WinSetTrans("Save", "", 10)
send("!n")
ClipPut("C:\adfs\Xin\"&@min&@sec&".txt")
sleep(300)
send("^v")
sleep(300)
send("!s")
sleep(500)
WinActivate("ColorPort","")
sleep(500)
ControlClick("ColorPort", "�M�����", "[CLASS:Button; INSTANCE:5]")
;WinSetTrans("", "�T�w", 10)
sleep(30)
winactivate ("","�T�w")
sleep(300)
ControlClick("", "�T�w", "[CLASS:Button; INSTANCE:1]")
sleep(500)
wend ;;40WinExists("�x�s -")
;40WinExists("�x�s -")
; while $var 16777
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;send file;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Global $Paused
HotKeySet("{ESC}", "Terminate")
Global $sFilename = "" ; Default file is "shell32.dll"
;msgbox(0,"","check 67",1)
$path_check=''
if FileRead("C:\adfs\�����Ѽ�.txt") = "stop" then
MsgBox(0,"","����ʬ�")
exit
EndIf
$sp1=''
$Parameters = StringSplit(FileRead("C:\adfs\�����Ѽ�.txt"), "�U")
;_ArrayDisplay($Parameters ,"pp")
$status = $Parameters[1]
$st = $Parameters[2]
$barcode = $Parameters[3]
$sp1 = $Parameters[4]
$spa = $Parameters[5]
$spb = $Parameters[6]
$ok = $Parameters[7]
;if $ok<>'' and $ok1='1' then
;FileCopy("C:\xamppCurr\htdocs\Fogra542\target\target.txt","C:\xamppCurr\htdocs\Fogra542\target.txt",1)
;endif
sleep(500)
$csv_in=("C:\adfs\Xin");;;;;;;;;;��|1
$MyVar1=($csv_in)
$FileList=_FileListToArray($MyVar1, '*.txt',1)
if not @Error=4 then
;msgbox(0,"","check 215",1)
for $j=1 to $FileList[0] step 1
;sleep(500)
$rr1=($csv_in& "\" & $Filelist[$j])
;sleep(500)
$text = StringReplace(_DateTimeFormat(_NowCalc(), 2), "/", "-")
$text2 = StringReplace(_DateTimeFormat(_NowCalc(), 5), ":", "")
;msgbox(0,$text2,$text)
$filename=$status&"_"&$barcode&"_"&$st&"_"&$text&"_"&$text2
;msgbox(0,$text2,$filename)
$filenameT=$filename&"_"&$Filelist[$j]
filemove($rr1,"C:\xamppCurr\htdocs\Fogra"&$st&"\upload\"&$filenameT,1)
;filemove($rr1,"C:\xampp\htdocs\Fogra"&$st&"\upload\"&$filenameT,1)
$filenameP=$filenameT
;msgbox("","","/"&"Fogra"&$st&"/upload/"&$filenameT)
Opt( "WinTitleMatchMode" ,2 )
Opt("MouseCoordMode",0)
$company='FW'
; MsgBox(0,"","http://127.0.0.1/Fogra"&$st&"/6pmmTVI-parsingCTOKX.php?f123=target.txt&f321=upload/"&$filenameT&"&spl="&$sp1&"&spa="&$spa&"&spb="&$spb&"&uid="&$company);
$url = "http://127.0.0.1/Fogra"&$st&"/6pmmTVI-parsingCTOKX.php?f123=target.txt&f321=upload/"&$filenameT&"&spl="&$sp1&"&spa="&$spa&"&spb="&$spb&"&uid="&$company&"&okName="&$ok;
ShellExecute($url)
;MsgBox(0,"","hold")
FileDelete($rr1)
sleep(1000)
next ;;;$j
endif
;msgbox(0,"","cycle")
;;while k
;;while 1
;;;;;;;;;;;;else do
wend ;;var
$var=16777215
$k=$k+1
wend
;while K
Func Terminate()
;ProcessClose("Wscript.exe")
Exit 0
;$iOrdinal=1
EndFunc