dein script führt bei mir zu ein error
Beiträge von heyhey83
-
-
[autoit]
IECreate ( @ScriptDir & "\Datei.mht")
[/autoit]Das geht so nicht mit mein script
Hier noch mal der script
Spoiler anzeigen
[autoit]#Region
[/autoit] [autoit][/autoit] [autoit]
#AutoIt3Wrapper_Icon=\favicon.ico
#EndRegion#include <ButtonConstants.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <File.au3>
#include <IE.au3>Opt('GUIOnEventMode', 1)
[/autoit] [autoit][/autoit] [autoit]
Opt('GUICloseOnESC', 0)
Opt("TrayAutoPause", 0)
Opt("TrayMenuMode", 1)
Opt("TrayOnEventMode", 1)TraySetIcon(@ScriptDir & "\favicon.ico")
[/autoit] [autoit][/autoit] [autoit]#Region ### START Koda GUI section ### Form=
[/autoit] [autoit][/autoit] [autoit]
$Form1 = GUICreate("txt", 890, 780, 50, 5)
$Label1 = GUICtrlCreateLabel("txt", 770, 5, 36, 17)
$Label2 = GUICtrlCreateLabel("txt", 290, 5, 100, 60)
$Input1 = GUICtrlCreateInput("", 680, 20, 200, 21)
$oIE=_IECreateEmbedded()
$Obj=GUICtrlCreateObj($oIE,10,20,657,729)
GUIRegisterMsg($WM_COMMAND, "MY_WM_COMMAND")
GUISetState(@SW_SHOW)
$FolderIE=StringReplace(@ScriptDir,"\","/")
#EndRegion ### END Koda GUI section ###
GUISetIcon(@ScriptDir & "\favicon.ico")
GUISetOnEvent($GUI_EVENT_CLOSE, '_Exit')
GUISetBkColor(0x87CEEB)$Menu_File = GUICtrlCreateMenu("Info")
[/autoit] [autoit][/autoit] [autoit]
$Menu_File_Item = GUICtrlCreateMenuItem("About", $Menu_File)
GUICtrlSetOnEvent(-1, '_About')TraySetState()
[/autoit] [autoit][/autoit] [autoit]
TraySetToolTip("txt")
TrayCreateItem("Beenden")
TrayItemSetOnEvent(-1, "_Exit")While 1
[/autoit] [autoit][/autoit] [autoit]
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEndFunc MY_WM_COMMAND($hWnd, $Msg, $wParam, $lParam)
[/autoit] [autoit][/autoit] [autoit]
Local $nNotifyCode = BitShift($wParam, 16)
Local $hCtrl = $lParam
If $nNotifyCode = 1024 Or $nNotifyCode = 786 Then
If $hCtrl = GUICtrlGetHandle($Input1) Then
$suchbegriff=GUICtrlRead($Input1)
if FileExists($suchbegriff&".html") then
_IENavigate($oIE,"file://localhost/"&$FolderIE&"/"&$suchbegriff&".html")
endif
EndIf
EndIf
Return $GUI_RUNDEFMSG
EndFuncWhile Sleep(1000)
[/autoit] [autoit][/autoit] [autoit]
WEndWhile 1
[/autoit] [autoit][/autoit] [autoit]
Sleep(10)
WEndExit
[/autoit] [autoit][/autoit] [autoit]Func _Exit()
[/autoit] [autoit][/autoit] [autoit]
Exit
EndFuncFunc _About()
[/autoit]
Run("About.exe")
EndFunc -
aber mal eine frage kann ich die html datei als mht machen und das es die auch so anzeigt wie bei html ??? und was muss ich beachten ?
MfG
Roberto -
ja die Grundlagen
-
ja ich suche weiter mal schauen
-
Wenn ich das richtig verstanden habe und ich in den neben Ordner suchen will muss ich das da ändern von
[autoit]$FolderIE=StringReplace(@ScriptDir,"\","/")
[/autoit]
[autoit]
auf$FolderIE=StringReplace(@ScriptDir,"\data\")
[/autoit] -
ja sorry habe es geändert hatte es auch noch mal nachgelesen aber danke
-
so habe nun alles soweit angepasst nun teste ich das und bekomme kein Suchergebnis mehr komisch.
Hier mal der code
[autoit]#Region
[/autoit][autoit][/autoit][autoit]
#AutoIt3Wrapper_Icon=\favicon.ico
#EndRegion#include <ButtonConstants.au3>
[/autoit][autoit][/autoit][autoit]
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <File.au3>
#include <IE.au3>Opt('GUIOnEventMode', 1)
[/autoit][autoit][/autoit][autoit]
Opt('GUICloseOnESC', 0)
Opt("TrayAutoPause", 0)
Opt("TrayMenuMode", 1)
Opt("TrayOnEventMode", 1)TraySetIcon(@ScriptDir & "\favicon.ico")
[/autoit][autoit][/autoit][autoit]#Region ### START Koda GUI section ### Form=
[/autoit][autoit][/autoit][autoit]
$Form1 = GUICreate("txt", 1060, 850, 200, 5)
$Label1 = GUICtrlCreateLabel("ICAO", 850, 65, 36, 17)
$Input1 = GUICtrlCreateInput("", 760, 80, 200, 21)
$Button1 = GUICtrlCreateButton("Suchen", 980, 77, 75, 25)
$oIE=_IECreateEmbedded()
$Obj=GUICtrlCreateObj($oIE,88,80,657,729)
GUIRegisterMsg($WM_COMMAND, "MY_WM_COMMAND")
GUISetState(@SW_SHOW)
$FolderIE=StringReplace(@ScriptDir,"\","/")
#EndRegion ### END Koda GUI section ###GUISetIcon(@ScriptDir & "\favicon.ico")
[/autoit][autoit][/autoit][autoit]
GUISetOnEvent($GUI_EVENT_CLOSE, '_Exit')$Menu_File = GUICtrlCreateMenu("Info")
[/autoit][autoit][/autoit][autoit]
$Menu_File_Item = GUICtrlCreateMenuItem("About", $Menu_File)
GUICtrlSetOnEvent(-1, '_About')TraySetState()
[/autoit][autoit][/autoit][autoit]
TraySetToolTip("txt")
TrayCreateItem("Beenden")
TrayItemSetOnEvent(-1, "_Exit")While 1
[/autoit][autoit][/autoit][autoit]
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEndFunc MY_WM_COMMAND($hWnd, $Msg, $wParam, $lParam)
[/autoit][autoit][/autoit][autoit]
Local $nNotifyCode = BitShift($wParam, 16)
Local $hCtrl = $lParam
If $nNotifyCode = 1024 Or $nNotifyCode = 786 Then
If $hCtrl = GUICtrlGetHandle($Input1) Then
$suchbegriff=GUICtrlRead($Input1)
if FileExists($suchbegriff) then
_IENavigate($oIE,"file://localhost/"&$FolderIE&"/"&$suchbegriff&".html")
endif
EndIf
EndIf
Return $GUI_RUNDEFMSG
EndFuncWhile Sleep(1000)
[/autoit][autoit][/autoit][autoit]
WEndWhile 1
[/autoit][autoit][/autoit][autoit]
Sleep(10)
WEndExit
[/autoit][autoit][/autoit][autoit]Func _Exit()
[/autoit][autoit][/autoit][autoit]
Exit
EndFuncFunc _About()
[/autoit]
Run("About.exe")
EndFunc -
ja habe es inzwischen auch gemerkt na ja nun geht das ja alles soweit.
Aber ich danke dir für deine Hilfe.
-
test.au3" (37) : ==> Illegal text at the end of statement (one statement per line).:
TrayCreateItem("Beenden"),
TrayCreateItem("Beenden")^ ERRORSo wo ist den da der fehler
-
so habe das jetzt mal geändert ,jetzt kommt ein anderer Fehler wenn ich die exe starte (error illegal text at the end of statement (one statement per line))
Spoiler anzeigen
[autoit]#Region
[/autoit] [autoit][/autoit] [autoit]
#AutoIt3Wrapper_Icon=\favicon.ico
#EndRegion#include <ButtonConstants.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <File.au3>
#include <IE.au3>Opt('GUIOnEventMode', 1)
[/autoit] [autoit][/autoit] [autoit]
Opt('GUICloseOnESC', 0)
Opt("TrayAutoPause", 0)
Opt("TrayMenuMode", 1)
Opt("TrayOnEventMode", 1)TraySetIcon(@ScriptDir & "\favicon.ico")
[/autoit] [autoit][/autoit] [autoit]#Region ### START Koda GUI section ### Form=
[/autoit] [autoit][/autoit] [autoit]
$Form1 = GUICreate("txt", 1177, 850, 313, 48)
$Input1 = GUICtrlCreateInput("", 824, 120, 121, 21)
$Button1 = GUICtrlCreateButton("Suchen", 952, 120, 75, 25)
$oIE=_IECreateEmbedded()
$Obj=GUICtrlCreateObj($oIE,88,80,657,729)
GUIRegisterMsg($WM_COMMAND, "MY_WM_COMMAND")
GUISetState(@SW_SHOW)
GUISetIcon(@ScriptDir & "\favicon.ico")
$FolderIE=StringReplace(@ScriptDir,"\","/")
#EndRegion ### END Koda GUI section ###$Menu_File = GUICtrlCreateMenu("Info")
[/autoit] [autoit][/autoit] [autoit]
$Menu_File_Item = GUICtrlCreateMenuItem("About", $Menu_File)
GUICtrlSetOnEvent(-1, '_About')TraySetState()
[/autoit] [autoit][/autoit] [autoit]
TraySetToolTip("txt")
TrayCreateItem("Beenden"),
TrayItemSetOnEvent(-1, "_Exit")While 1
[/autoit] [autoit][/autoit] [autoit]
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEndFunc MY_WM_COMMAND($hWnd, $Msg, $wParam, $lParam)
[/autoit] [autoit][/autoit] [autoit]
Local $nNotifyCode = BitShift($wParam, 16)
Local $hCtrl = $lParam
If $nNotifyCode = 1024 Or $nNotifyCode = 786 Then
If $hCtrl = GUICtrlGetHandle($Input1) Then
$suchbegriff=GUICtrlRead($Input1)
if FileExists($suchbegriff) then
_IENavigate($oIE,"file://localhost/"&$FolderIE&"/"&$suchbegriff&".html")
endif
EndIf
EndIf
Return $GUI_RUNDEFMSG
EndFuncWhile 1
[/autoit] [autoit][/autoit] [autoit]
Sleep(10)
WEndExit
[/autoit] [autoit][/autoit] [autoit]Func _Exit()
[/autoit] [autoit][/autoit] [autoit]
Exit
EndFuncFunc _About()
[/autoit]
Run("About.exe")
EndFuncEdit Oscar: Spoiler hinzugefügt! Bitte bei längeren Quelltexten unbedingt auch den Spoiler-Tag benutzen!
-
geht bei mir nicht immer noch der scheiß Fehler mit welcher Version machst du das schicke mir mal die .au3
-
und was muss ich in zeile 35 eingeben
-
okay ja also das html muss weg
-
es öffnet sich aber gebe ich jetzt in der suche ein xxx fintet der keine xxx.html
-
egal wie ich das mache immer wieder kommt die fehler meldung
-
ja werde ich machen.
-
Error: Unable to add resources
C:\User\Name\AppData\Local\AutoIt v3\Aut2Exe\autCB85.tmp.exe das steht da mehr nicht -
also das ganze liegt ja bei mir alles in einen ordner habe ich da was übersehen in den code was ich ändern muss kann den fehler nicht finden
-
okay aber wie gesagt bekomme immer noch die Fehler Meldung ich schaue gerade warum bin ich doof oder blind