#comments-start
Скрипт для автоматического сканирования.
Работает совместно с программой Scanitto Pro (русский интерфейс)
Автор идеи: Astra55
16.09.11.
U235
#comments-end
#include <GuiEdit.au3>
#include <GuiConstantsEx.au3>
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("{DOWN}", "HiSpeed")
HotKeySet("{UP}", "LowSpeed")
Global $Interval=4000
Global $Paused
Opt("GUIOnEventMode", 0)
WinWait("Scanitto Pro", "")
$pos_w = WinGetPos("Scanitto Pro", "")
$pos_ctrl = ControlGetPos("Scanitto Pro", "", "TToolBar1")
WinActivate("Scanitto Pro", "")
$hGUI = GUICreate("Number of Scans", 200, 50, $pos_w[0]+$pos_ctrl[0], $pos_w[1]+$pos_ctrl[1]+50)
$ip = GUICtrlCreateInput("", 10, 10, 100, 20,$ES_NUMBER)
$btn = GUICtrlCreateButton("Ok", 140, 10, 30, 20)
GUISetState()
$msg = 0
While $msg <> $GUI_EVENT_CLOSE
$msg = GUIGetMsg()
Select
Case $msg = $btn
ExitLoop
EndSelect
WEnd
$n=0
$n=Number(GUICtrlRead ( $ip))
For $i = 1 to $n
ControlClick("Scanitto Pro", "", "TToolBar1")
WinWait("передача данных...")
WinWaitClose("передача данных...")
GUICtrlSetData ( $ip, $n-$i )
Sleep ($Interval)
FileDelete(@TempDir&"\*.bmp")
Next
Func Terminate()
Exit 0
EndFunc ;==>Terminate
Func TogglePause()
$Paused = NOT $Paused
While $Paused
Sleep(100)
ToolTip('Script is "Paused"',0,0)
WEnd
ToolTip("")
EndFunc ;==>TogglePause
Func HiSpeed()
If $Interval>1300 Then
$Interval = $Interval-300
sleep(100)
TrayTip ( "Interval", $Interval&" msec", 2 )
EndIf
EndFunc ;==>HiSpeed
Func LowSpeed()
$Interval = $Interval+300
TrayTip ( "Interval", $Interval&" msec", 2 )
EndFunc ;==>LowSpeed