#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Date.au3>
#include <IE.au3>
GUICreate("My GUI",180,250)
[/autoit][autoit][/autoit][autoit]GuictrlcreateLabel("From",10,25,50,25)
$from = GUICtrlCreateDate("",50,20,100,25)
$DTM_SETFORMAT_ = 0x1032 ; $DTM_SETFORMATW
$style = "yyyy/MM/dd"
GUICtrlSendMsg($from, $DTM_SETFORMAT_, 0, $style)
GuictrlcreateLabel("To",10,65,50,25)
$to = GUICtrlCreateDate("",50,60,100,25)
$DTM_SETFORMAT_ = 0x1032 ; $DTM_SETFORMATW
$style = "yyyy/MM/dd"
GUICtrlSendMsg($to, $DTM_SETFORMAT_, 0, $style)
GuictrlcreateLabel("Select Shift",10,120,80,25)
GUictrlcreateCombo("SE",80,115,50)
Guictrlsetdata(-1,"SL|SN|DS")
$start = Guictrlcreatebutton("Start",40,215,100,25)
$weekend = GUICtrlCreateCheckbox("Weekend",10,170,100,25)
GuictrlcreateButton("",-2,100,500,5)
GUICtrlSetState(-1,$GUI_DISABLE)
GuictrlcreateButton("",-2,150,500,5)
GUICtrlSetState(-1,$GUI_DISABLE)
GUISetState(@SW_SHOW) ; will display an empty dialog box
; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
switch $msg
case $start
doit()
dates()
Endswitch
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
GUIDelete()
Func Date()
$datefrom= Guictrlread($from)
$dateto = Guictrlread($to)
$x = _DateDiff('D',$datefrom,$dateto)
for $i = 0 to $x
$xd = _DateAdd('D',$i,$datefrom)
global $lol = _DateTimeFormat($xd,2)
Next
EndFunc
Func doit()
$url = "http://www.URL.de"
Global $oIE = _IECreate($url)
global $oform = _IEFormGetCollection($oIE, 0)
$obutton = _IEFormElementGetObjByName($oform , "DropDownListKind")
_IEFormElementOptionSelect($obutton,"Arbeitszeit",1, "byText")
Endfunc
func dates()
$obutton = _IEFormElementGetObjByName($oform , "TextBoxDateFrom")
_IEFormElementSetValue($obutton,"20.02.2013") ;Eintrag wird vorgenommen, aber fliegt nach einer Sekunde wieder raus
$obutton = _IEFormElementGetObjByName($oform , "TextBoxDateTo")
_IEFormElementSetValue($obutton,"20.02.2013") ;Eintrag wird vorgenommen, aber fliegt nach einer Sekunde wieder raus
ENdfunc
ZitatAlles anzeigenForm-Index: 0 / Name: TimeSheetViewMainForm
Form: 0 /Element: 0 /Name: __EVENTTARGET
Form: 0 /Element: 1 /Name: __EVENTARGUMENT
Form: 0 /Element: 2 /Name: __LASTFOCUS
Form: 0 /Element: 3 /Name: __VIEWSTATE
Form: 0 /Element: 4 /Name: __PREVIOUSPAGE
Form: 0 /Element: 5 /Name: __EVENTVALIDATION
Form: 0 /Element: 6 /Name: DropDownListCategory
Form: 0 /Element: 7 /Name: DropDownListProject
Form: 0 /Element: 8 /Name: DropDownListIncident
Form: 0 /Element: 9 /Name: DropDownListKind
Form: 0 /Element: 10 /Name: DropDownListContract
Form: 0 /Element: 11 /Name: TextBoxDateFrom
Form: 0 /Element: 12 /Name: TextBoxTimeFrom
Form: 0 /Element: 13 /Name: TextBoxPause
Form: 0 /Element: 14 /Name: TextBoxDateTo
Form: 0 /Element: 15 /Name: TextBoxTimeTo
Form: 0 /Element: 16 /Name: DropDownListCostCenter
Form: 0 /Element: 17 /Name: DropDownListCostUnit
Form: 0 /Element: 18 /Name: TextBoxNote
Form: 0 /Element: 19 /Name: CheckBoxBillable
Form: 0 /Element: 20 /Name: CheckBoxStandByService
Form: 0 /Element: 21 /Name: DropDownListNumberOfDays
Form: 0 /Element: 22 /Name: CheckBoxBookWE
Form: 0 /Element: 23 /Name: ButtonTimeBook
Form: 0 /Element: 24 /Name: ButtonCanc