File: C:/xampp/htdocs/cmykDe/CNYplate/SaveW7-Plate3.au3
#include <Date.au3>
#Include <Array.au3>
#include <GUIConstants.au3>
#Include <File.au3>
#include <String.au3>
;#include <_sql.au3>
#include <INet.au3>
Global $sFilename = "" ; Default file is "shell32.dll"
HotKeySet("^q", "Terminate")
$k=0
While $k <= 1000000000
Opt("WinTitleMatchMode", 2)
Opt("PixelCoordMode",2)
$sw =''
$mfilter=""
$mchem=""
$mwash=""
$st=""
$cp=""
$pt=""
$ft=""
$dvtime=""
$dvtmpt=""
$barcode=""
$stf=""
;winactivate("[CLASS:RBWindow]","")
sleep(1000)
;15791353 F0F4F9 16777215 FFFFFF 7775850 76A66A
$var = PixelGetColor( 212 , 466 )
$var2 = PixelGetColor( 493 , 478 )
;MsgBox(0,"The decimal color is", $var,1)
;MsgBox(0,"The hex color is", Hex($var, 6),1)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
while $var<13421772
;MsgBox(0,"","wait0")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
if $var2>10421772 then
msgbox(0,"","See 4 Diag box",1)
GUICreate("Sser Ink Control", 320,220, @DesktopWidth/2-160, @DesktopHeight/2-45, -1, 0x00000018); WS_EX_ACCEPTFILES
GUIStartGroup()
$radio1 = GUICtrlCreateRadio("86", 20, 20, 30, 20)
$radio2 = GUICtrlCreateRadio("88", 20, 40, 30, 20)
GUIStartGroup()
$radio4 = GUICtrlCreateRadio("C", 60, 20, 30, 20)
$radio5 = GUICtrlCreateRadio("M", 60, 40, 30, 20)
$radio6 = GUICtrlCreateRadio("Y", 60, 60, 30, 20)
$radio7 = GUICtrlCreateRadio("K", 60, 80, 30, 20)
GUIStartGroup()
$radio9 = GUICtrlCreateRadio("811", 100, 20, 40, 20)
$radio10 = GUICtrlCreateRadio("790", 100, 40, 40, 20)
GUIStartGroup()
GUICtrlCreateLabel("F-Step", 150, 7)
$radio11 = GUICtrlCreateRadio("4", 150, 20, 30, 20)
$radio12 = GUICtrlCreateRadio("5", 150, 40, 30, 20)
$radio13 = GUICtrlCreateRadio("6", 150, 60, 30, 20)
$radio14 = GUICtrlCreateRadio("x", 150, 80, 30, 20)
GUICtrlCreateLabel("��v�ɶ�", 200, 7)
$dvtm=GUICtrlCreateInput("30", 200, 30, 50, 20)
GUICtrlCreateUpdown(-1)
GUICtrlCreateLabel("��v�ū�", 200, 67)
$dvtmp=GUICtrlCreateInput("23", 200, 85, 50, 20)
GuiCtrlCreateLabel("����: ", 15, 125, 40, 16)
$hFile1 = GUICtrlCreateInput($sFilename, 50, 125, 55, 16, -1)
$filter=GUICtrlCreateCheckbox("���o��", 115, 123, 70, 20)
;GUICtrlSetState(-1)
$chem=GUICtrlCreateCheckbox("�[�Ĥ�", 190, 123, 60, 20)
;GUICtrlSetState(-1)
$wash=GUICtrlCreateCheckbox("�~����", 250, 123, 60, 20)
;GUICtrlSetState(-1)
GUIStartGroup()
$radio15 = GUICtrlCreateRadio("����", 15, 150, 40, 20)
$radio16 = GUICtrlCreateRadio("����", 70, 150, 40, 20)
$radio17 = GUICtrlCreateRadio("�ɴ@", 125, 150, 40, 20)
$radio18 = GUICtrlCreateRadio("�A�h", 180, 150, 40, 20)
$radio19 = GUICtrlCreateRadio("���", 235, 150, 40, 20)
$btn = GUICtrlCreateButton ("OK", 20, 175, 60, 20)
GUISetState ()
While $sw ='' and $var<13421772
;msgbox (0,$var,$sw,2)
$iMsg = GUIGetMsg()
Select
Case $iMsg = $radio1 And BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED
$st="86"
Case $iMsg = $radio2 And BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED
$st="88"
Case $iMsg = $radio4 And BitAND(GUICtrlRead($radio4), $GUI_CHECKED) = $GUI_CHECKED
$cp="C"
Case $iMsg = $radio5 And BitAND(GUICtrlRead($radio5), $GUI_CHECKED) = $GUI_CHECKED
$cp="M"
Case $iMsg = $radio6 And BitAND(GUICtrlRead($radio6), $GUI_CHECKED) = $GUI_CHECKED
$cp="Y"
Case $iMsg = $radio7 And BitAND(GUICtrlRead($radio7), $GUI_CHECKED) = $GUI_CHECKED
$cp="K"
Case $iMsg = $radio9 And BitAND(GUICtrlRead($radio9), $GUI_CHECKED) = $GUI_CHECKED
$pt="811"
Case $iMsg = $radio10 And BitAND(GUICtrlRead($radio10), $GUI_CHECKED) = $GUI_CHECKED
$pt="790"
Case $iMsg = $radio11 And BitAND(GUICtrlRead($radio11), $GUI_CHECKED) = $GUI_CHECKED
$ft="4"
Case $iMsg = $radio12 And BitAND(GUICtrlRead($radio12), $GUI_CHECKED) = $GUI_CHECKED
$ft="5"
Case $iMsg = $radio13 And BitAND(GUICtrlRead($radio13), $GUI_CHECKED) = $GUI_CHECKED
$ft="6"
Case $iMsg = $radio14 And BitAND(GUICtrlRead($radio14), $GUI_CHECKED) = $GUI_CHECKED
$ft="x"
Case $iMsg = $radio15 And BitAND(GUICtrlRead($radio15), $GUI_CHECKED) = $GUI_CHECKED
$stf="����"
Case $iMsg = $radio16 And BitAND(GUICtrlRead($radio16), $GUI_CHECKED) = $GUI_CHECKED
$stf="����"
Case $iMsg = $radio17 And BitAND(GUICtrlRead($radio17), $GUI_CHECKED) = $GUI_CHECKED
$stf="�ɴ@"
Case $iMsg = $radio18 And BitAND(GUICtrlRead($radio18), $GUI_CHECKED) = $GUI_CHECKED
$stf="�A�h"
Case $iMsg = $radio19 And BitAND(GUICtrlRead($radio19), $GUI_CHECKED) = $GUI_CHECKED
$stf="���"
Case $iMsg = $dvtm
$dvtime=GUICtrlRead($dvtm)
Case $iMsg = $dvtmp
$dvtmpt=GUICtrlRead($dvtmp)
Case $iMsg = $hFile1
;GUICtrlSetData($hFile1, $sTmpFile); GUI will be updated at next iteration
$barcode=GUICtrlRead($hFile1)
;MsgBox (4096, "drag drop file", $path_pdf
Case $iMsg = $filter And BitAND(GUICtrlRead($filter), $GUI_CHECKED) = $GUI_CHECKED
$mFilter= "���o��"
Case $iMsg = $chem
$mchem=GUICtrlRead($chem,1)
Case $iMsg = $wash
$mwash=GUICtrlRead($wash,1)
Case $iMsg= $btn
; msgbox(0," select:", $st&"-"& $cp&"-"&$pt,1)
; GUIDelete();
$sw =-1
$var=13421778
msgbox(0,"your select2:", $st&"-"& $cp&"-"&$pt&"-"&$ft&"-"&$dvtime&"-"&$dvtmpt&"-"&$barcode&"-f:"&$mFilter&"-m"&$mchem&"-w"&$mwash&"-"&$stf,1)
Exitloop 1
Case $iMsg = $GUI_EVENT_CLOSE
Exit
EndSelect
Wend;;1
else
;msgbox(0,"","See 2 Diag box",1)
EndIf
;;AutoIt v3 GUI
GUIDelete();
sleep(1000)
WinClose("[AutoIt v3 GUI]","")
sleep(500)
winactivate("[CLASS:RBWindow]","")
sleep(1000)
ControlClick("ColorPort", "�x�s���", "[CLASS:Button; INSTANCE:4]")
sleep(1000)
while WinExists("�x�s -")
if WinExists("�x�s - CSV") then
sleep(500)
; MsgBox(0, "", "CSV was active",1)
sleep(500)
;ControlCommand("[CLASS:RBWindow]", "", "Button14", "check");device
sleep(500)
ControlCommand("[CLASS:RBWindow]", "", "Button6", "check");vcmy
sleep(500)
;ControlCommand("[CLASS:RBWindow]", "", "Button7", "check");minus paper
sleep(500)
;ControlClick("�x�s - CSV", "�x�s", "[CLASS:RBWindow]", "[CLASS:Button; INSTANCE:1]")
Opt("MouseCoordMode",2)
winactivate("[CLASS:RBWindow]","")
sleep(500)
mouseclick("left",318,589,2)
sleep(500)
;msgbox(0,"","wait 2",1)
Else
sleep(500)
MsgBox(0, "", "CSV was not active",1)
sleep(500)
WinActivate("�x�s -")
Sleep(500)
ControlClick("[CLASS:RBWindow]", "", "ComboBox1")
sleep(500)
Send("{up}")
sleep(500)
Send("{up}")
sleep(500)
Send("{up}")
sleep(500)
Send("{up}")
sleep(500)
Send("{up}")
sleep(1000)
send("{down}")
sleep(500)
send("{down}")
sleep(500)
send("{down}")
sleep(500)
send ("c")
sleep(500)
send ("c")
sleep(500)
send ("c")
sleep(500)
;while WinExists("�x�s -- CSV")
;ControlCommand("[CLASS:RBWindow]", "", "Button14", "check");devive
sleep(1000)
ControlCommand("[CLASS:RBWindow]", "", "Button6", "check")
sleep(500)
ControlCommand("[CLASS:RBWindow]", "", "Button7", "check")
sleep(1000)
ControlClick("�x�s - CSV", "�x�s", "[CLASS:Button; INSTANCE:1]")
sleep(1000)
; msgbox(0,"","wait 4")
;wend
endif
$rn1=Random(0, 100, 1)
$rn2=Random(0, 1000, 1)
$rn=$rn1&"-"&$rn2
send("!n")
sleep(800)
clipput("C:\xampp\htdocs\FograPlate\upload\"&$rn&".csv")
sleep(500)
send("^v")
sleep(800)
;MsgBox(0,"","wait")
;ControlClick("[CLASS:RBWindow]", "", "ComboBox1")
;ControlClick("�x�s", "�x�s", "[CLASS:Button; INSTANCE:2]")
send("!s")
sleep(500)
;msgbox(0,"","wait 3")
WinActivate("ColorPort","")
sleep(500)
ControlClick("ColorPort", "�M�����", "[CLASS:Button; INSTANCE:5]")
sleep(1000)
ControlClick("", "�T�w", "[CLASS:Button; INSTANCE:1]")
sleep(500)
;msgbox(0,"your select2:", $st&"-"& $cp&"-"&$pt&"-"&$ft&"-"&$dvtime&"-"&$dvtmpt&"-"&$barcode&"-f:"&$mFilter&"-m"&$mchem&"-w"&$mwash&"-"&$stf)
$command = "C:\Program Files (x86)\Mozilla Firefox\firefox.exe -new-tab "
$url = "http://127.0.0.1/fograplate/TVI-parsing12.php?f321=upload/"&$rn&".csv&ctp="&$st&"&size="&$pt&"&plat="&$cp&"&fStep="&$ft&"&dvTime="&$dvtime&"&dvTemp="&$dvtmpt&"&pNo="&$barcode&"&filter="&$mFilter&"&chem="&$mchem&"&wash="&$mwash&"&stf="&$stf
;msgbox(0,"",$url)
Run($command & $url, "", @SW_MAXIMIZE)
wend
wend ;;var
wend
Func Terminate()
;ProcessClose("Wscript.exe")
Exit 0
;$iOrdinal=1
EndFunc