Hallo noch einmal,
so sieht mein File Converter im Moment aus:
Spoiler anzeigen
#include <Array.au3>
#include <Inet.au3>
#include <String.au3>
;Writte by PokerFace
;If you change something, please let me know ![]()
#include <IE.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#NoTrayIcon
[/autoit] [autoit][/autoit] [autoit]Global $oIE=_IECreate("http://www.freefileconvert.com/",0,0,1)
Global $Website = "http://www.freefileconvert.com/"
Global $Ergebnisse
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Online Konverter", 625, 573, 335, 185)
$Label1 = GUICtrlCreateLabel("Online Konverter by Benne", 48, 16, 530, 47)
GUICtrlSetFont(-1, 28, 800, 0, "Lucida Fax")
$DataSelect = GUICtrlCreateInput("", 160, 184, 257, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
$Search = GUICtrlCreateButton("Durchsuchen", 224, 136, 121, 25, 0)
$Format = GUICtrlCreateCombo("", 200, 288, 193, 25)
$Label2 = GUICtrlCreateLabel("Das Format auswählen!", 160, 240, 261, 28)
GUICtrlSetFont(-1, 16, 800, 0, "Lucida Fax")
$Label3 = GUICtrlCreateLabel("Datei auswählen!", 192, 88, 192, 28)
GUICtrlSetFont(-1, 16, 800, 0, "Lucida Fax")
$Label4 = GUICtrlCreateLabel("Bitte gebe deine E-Mail Adresse an!", 88, 352, 393, 28)
GUICtrlSetFont(-1, 16, 800, 0, "Lucida Fax")
$Email = GUICtrlCreateInput("Brauchst du im Moment nicht!", 168, 392, 249, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
$Send = GUICtrlCreateButton("Abschicken!", 48, 448, 521, 89, 0)
GUICtrlSetFont(-1, 36, 800, 0, "Lucida Fax")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
_IEQuit ($oIE)
Exit
Case $Search
_GetFileOpenDialog()
Case $Send
;~ Global $FormatOut = GUICtrlRead ($Format)
Global $FormatOut = "doc"
_Konvert()
_WaitTillFinish()
EndSwitch
WEnd
Func _GetFileOpenDialog()
Global $oFileOpenDialog = _IEGetObjById ($oIE, "input_file")
_IEAction ($oFileOpenDialog, "click")
GUICtrlSetData ($DataSelect, "Erfolgreich geladen!")
EndFunc
Func _Konvert()
Global $oFileOut = _IEGetObjById ($oIE, "file_output_format")
_IEFormElementOptionSelect ($oFileOut, $FormatOut)
Global $oFileUploadButton = _IEGetObjById ($oIE, "upload_file_button")
_IEAction ($oFileUploadButton, "click")
EndFunc
Func _WaitTillFinish()
While 1
Global $Site = _IEPropertyGet($oIE, "locationurl")
Global $Source = _INetGetSource ($Site)
Global $DownloadLink = _StringBetween ($Source, "<a href=/converted/", "target=_blank>")
If IsArray ($DownloadLink) Then
MsgBox (1, "","Geklappt")
_ArrayDisplay ($DownloadLink)
ExitLoop
EndIf
Sleep (500)
WEnd
EndFunc
Dieses Konverter basiert auf einer Website, da ich so keine Exe gefunden habe, mit der ich per Parametern konvertieren kann ![]()
Okay..
Nun alles geht soweit, bis auf die Funktion _WaitTillFinish() es kommt einfach kein Array!
Obwohl ich per Inetgetsource eigentlich einen finden müsste.
Wenn ihr oben die Zeile:
Global $oIE=_IECreate("http://www.freefileconvert.com/",0,0,1)
[/autoit]
In diese abändert:
Global $oIE=_IECreate("http://www.freefileconvert.com/",0,1,1)
[/autoit]
Dann seht ihr auch die Schritte.
Kann mir jemand helfen? ![]()
Die Combobox müsst ihr nicht bedienen^^
Die hat noch keine Funktion ![]()
Übrigens:
Die Datei wird in das .doc Format konvertiert!
Guckst du hier:
Global $FormatOut = "doc"
[/autoit]
Mögliche Formate: doc, docx, odt, txt, pdf ...
Einfach in die Endung OHNE den Punkt ändern ![]()
Also NICHT :
Global $FormatOut = ".doc"
[/autoit]
Sondern:
Global $FormatOut = "doc"
[/autoit]Nur mal so am Rande ![]()