Hallo zusammen,
ich komme einfach nicht weiter, dabei ist es eigentlich nichts aussergewöhnliches. Wenn jemand bisschen Zeit investieren möchte, wäre ich sehr dankbar.
Hier mal mein Code
Spoiler anzeigen
;*****************************************
;D3-ID-Agent.au3 by PS
;Erstellt mit ISN AutoIt Studio v. 0.8 BETA
;*****************************************
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <GuiButton.au3>
#include <IsPressedEx_UDF.au3>
#include <Forms\GUI_HELP.isf>
Opt("GUIOnEventMode", 1) ;0=disabled, 1=OnEvent mode enabled
Opt("TrayMenuMode", 3) ; Default tray menu items (Script Paused/Exit) will not be shown.
$GUI_Hilfe = TrayCreateItem("Hilfe")
[/autoit] [autoit][/autoit] [autoit]Global $Fehler = 0
[/autoit] [autoit][/autoit] [autoit]Global $oError = ObjEvent("AutoIt.Error", "MyErrFunc")
[/autoit] [autoit][/autoit] [autoit];----------------------------------------------------------------------------------------------------------
; Com Error Handler
;----------------------------------------------------------------------------------------------------------
Func MyErrFunc($oMyError)
MsgBox(16, "COM Error handler", "err.number is: " & @TAB & $oError.Number & @CRLF & _
"err.windescription:" & @TAB & $oError.windescription & @CRLF & _
"err.description is: " & @TAB & $oError.description & @CRLF & _
"err.source is: " & @TAB & $oError.source & @CRLF & _
"err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _
"err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _
"err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _
"err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _
"err.retcode is: " & @TAB & $oError.retcode & @CRLF & @CRLF)
EndFunc
$dll = DllOpen("user32.dll")
[/autoit] [autoit][/autoit] [autoit]While 1
Local $msg = TrayGetMsg()
Select
Case $msg = 0
Sleep(50)
If _IsPressedEx("{CTRL}+{F8}", $dll) Then
$Fehler = 0
SoundPlay(@ScriptDir & "\Bleep.wav")
$old_Memory = ClipGet()
Send("^c")
$Identnummer = ClipGet()
$Identnummer = _Check_Identnummer($Identnummer)
MsgBox(0, "", $Identnummer)
If $Fehler = 0 Then
_Check_Oracle($Identnummer)
ShellExecute(@ScriptDir & "\D3_ID.d3l")
Sleep(250)
If WinActive("d.3 Login") Then MsgBox(0, "D3-ID Agent", "Sie müssen Sich zuvor am D.3 System (WAK-Archiv) anmelden, bevor die Treffermenge angezeigt werden kann")
EndIf
ClipPut($old_Memory)
EndIf
ContinueLoop
Case $msg = $GUI_Hilfe
GUISetState(@SW_SHOW, $GUI_HELP)
EndSelect
WEnd
DllClose($dll)
Func _Check_Identnummer($Identnummer)
EndFunc
Func _Check_Oracle($Identnummer)
EndFunc
und hier noch die GUI_HELP.isf
Spoiler anzeigen
; -- Created with ISN Form Studio 2 for ISN AutoIt Studio -- ;
[/autoit] [autoit][/autoit] [autoit]$GUI_HELP = GUICreate("D.3-ID Agent - Hilfe",350,293,-1,-1,$WS_CAPTION,-1)
GUICtrlCreatePic(@scriptdir&"\"&"Images\Agent.jpg",20,20,68,70,-1,-1)
GUICtrlSetState(-1,80)
GUICtrlCreateLabel("Mit dem D.3-ID Agent haben Sie die Möglichkeit, eine Identnummer in D.3 aus jeder Software heraus zu suchen. Gehen Sie wie folgt vor:",100,50,238,58,-1,8192)
GUICtrlSetState(-1,80)
GUICtrlCreateLabel("1. Markieren Sie die gewünschte Identnummer, nach der gesucht werden soll.",20,110,315,29,-1,-1)
GUICtrlSetState(-1,80)
GUICtrlCreateLabel("2. Drücken Sie nun die STRG + F8 Taste gleichzeitig.",20,140,308,22,-1,-1)
GUICtrlSetState(-1,80)
GUICtrlCreateLabel("3. Das d.explorer Fenster öffnet sich und zeigt Ihnen alle gefundenen Revisionen der markierten Identnummer an.",20,160,309,41,-1,-1)
GUICtrlSetState(-1,80)
GUICtrlCreateLabel("Sollten Sie Fragen oder Anregungen haben, können Sie sich gerne an den Helpdesk der WAK wenden.",20,210,317,80,-1,-1)
GUICtrlSetState(-1,80)
GUICtrlCreateLabel("D.3 ID Agent",120,10,171,38,-1,-1)
GUICtrlSetState(-1,80)
GUICtrlSetFont(-1,20,700,0,"Arial")
$OK = GUICtrlCreateButton("OK",120,250,100,30,-1,-1)
GUICtrlSetOnEvent(-1,"_HelpEND")
GUICtrlSetState(-1,512)
#cs
[gui]
title=D.3-ID Agent - Hilfe
breite=350
hoehe=293
style=$WS_CAPTION
exstyle=-1
bgcolour=0xF0F0F0
bgimage=none
handle=GUI_HELP
parent=
code=
[0x00181910]
handle=288
code=
type=image
x=20
y=20
width=68
height=70
text=
state=80
style=
exstyle=
textcolour=0x000000
bgcolour=0xF0F0F0
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=
func=
bgimage=Images\Agent.jpg
[0x00CA188A]
handle=289
code=
type=label
x=100
y=50
width=238
height=58
text=Mit dem D.3-ID Agent haben Sie die Möglichkeit, eine Identnummer in D.3 aus jeder Software heraus zu suchen. Gehen Sie wie folgt vor:
state=80
style=
exstyle=$BS_MULTILINE
textcolour=0x000000
bgcolour=0xF0F0F0
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=
func=
bgimage=
tabpage=-1
tooltip=
[0x0026186E]
handle=290
code=
type=label
x=20
y=110
width=315
height=29
text=1. Markieren Sie die gewünschte Identnummer, nach der gesucht werden soll.
state=80
style=
exstyle=
textcolour=0x000000
bgcolour=0xF0F0F0
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=
func=
bgimage=
[0x00071856]
handle=291
code=
type=label
x=20
y=140
width=308
height=22
text=2. Drücken Sie nun die STRG + F8 Taste gleichzeitig.
state=80
style=
exstyle=
textcolour=0x000000
bgcolour=0xF0F0F0
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=
func=
bgimage=
[0x012D189C]
handle=292
code=
type=label
x=20
y=160
width=309
height=41
text=3. Das d.explorer Fenster öffnet sich und zeigt Ihnen alle gefundenen Revisionen der markierten Identnummer an.
state=80
style=
exstyle=
textcolour=0x000000
bgcolour=0xF0F0F0
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=
func=
bgimage=
[0x000A1872]
handle=293
code=
type=label
x=20
y=210
width=317
height=80
text=Sollten Sie Fragen oder Anregungen haben, können Sie sich gerne an den Helpdesk der WAK wenden.
state=80
style=
exstyle=
textcolour=0x000000
bgcolour=0xF0F0F0
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=
func=
bgimage=
[0x00071850]
handle=294
code=
type=label
x=120
y=10
width=171
height=38
text=D.3 ID Agent
state=80
style=
exstyle=
textcolour=0x000000
bgcolour=0xF0F0F0
font=Arial
fontsize=20
fontstyle=700
fontattribute=0
id=
func=
bgimage=
tabpage=-1
tooltip=
[0x01DD1880]
handle=295
code=
type=button
x=120
y=250
width=100
height=30
text=OK
state=$GUI_DEFBUTTON
style=
exstyle=
textcolour=0x000000
bgcolour=0xF0F0F0
font=MS Sans Serif
fontsize=8
fontstyle=400
fontattribute=0
id=OK
func=_HelpEND
bgimage=
tabpage=-1
tooltip=
#ce
Beschreibung: Auf das TrayIcon klicken und Hilfe auswählen. Nun will ich eigentlich nur den OK Button klicken und das Fenster wieder schließen lassen. Also wirklich nichts spektakuläres, aber der Button reagiert nicht, bzw. lässt sich scheinbar nicht drücken.
Für jede Hilfe bin ich dankbar.