hallo
ich habe ein kleines problem ich möchte das wenn man auf den knopf senden drückt
eine txt datei auf meinen server geschikt wird mit dem inhalt aus den boxen
Spoiler anzeigen
;Include constants
#include <GUIConstants.au3>
;Initialize variables
Global $GUIWidth
Global $GUIHeight
$GUIWidth = 150
$GUIHeight = 500
;Create window
GUICreate("Kontakt me", $GUIWidth, $GUIHeight)
; INPUTBOX
GUICtrlCreateInput("", 10, 200, 130, 20)
; INPUTBOX
GUICtrlCreateInput("", 10, 300, 130, 20)
;Create an "Senden" button
$OK_Btn = GUICtrlCreateButton("Senden", 50, 425, 70, 25)
;Show window/Make the window visible
GUISetState(@SW_SHOW)
;Loop until:
;- user presses Esc
;- user presses Alt+F4
;- user clicks the close button
While 1
;After every loop check if the user clicked something in the GUI window
$msg = GUIGetMsg()
Select
[/autoit] [autoit][/autoit] [autoit];Check if user clicked on the close button
Case $msg = $GUI_EVENT_CLOSE
;Destroy the GUI including the controls
GUIDelete()
;Exit the script
Exit
;Check if user clicked on the "Senden" button
Case $msg = $OK_Btn
MsgBox(64, "Senden", "Hir sollte eig die messeg gesendet werden!")
EndSelect
WEnd
[/autoit]und wenn man auf den knopf senden klickt sollen die beiden daten aus den input boxen
auf meinem server in einer txt datei geschpeichert werden
bedanke mich jetzt schonmal für jede art von hilfe
//edit:
Momentan siht der code so aus
Spoiler anzeigen
;Include constants
#include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIEdit.au3>
;\/**\/**\/**\/**\/**\/**\/**\/**\/**\/**\/**\/**\/
#include <IE.au3> ;/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\
;\/**\/**\/**\/**\/**\/**\/**\/**\/**\/**\/**\/**\/
#include <INet.au3> ;/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\
;Initialize variables
Global $GUIWidth
Global $GUIHeight
$GUIWidth = 600
$GUIHeight = 450
;Create window
GUICreate("Kontakt me", $GUIWidth, $GUIHeight)
; INPUTBOX
;\/**\/**\/**\/**\/**\/**\/**\/**\/**\/**\/**\/**\/
;MIT VARIABLE
$Content = ReadText()
$output1 = GUICtrlCreateInput($Content, 10, 10, 580, 280, $ES_Multiline + $ES_AutoVScroll + $WS_VScroll)
$Refresh_Btn = GUICtrlCreateButton("Aktualisieren", 490, 300, 100, 25)
GUICtrlCreateLabel("Name", 10, 310, 80, 20)
$input1 = GUICtrlCreateInput("", 10, 330, 180, 20)
; INPUTBOX
;\/**\/**\/**\/**\/**\/**\/**\/**\/**\/**\/**\/**\/
;MIT VARIABLE
GUICtrlCreateLabel("Nachricht", 10, 360, 80, 20)
$input2 = GUICtrlCreateInput("", 10, 380, 180, 20)
;Create an "Senden" button
$OK_Btn = GUICtrlCreateButton("Senden", 120, 410, 70, 25)
;Show window/Make the window visible
GUISetState(@SW_SHOW)
GUICtrlSetState( $input1, $GUI_Focus )
;Loop until:
;- user presses Esc
;- user presses Alt+F4
;- user clicks the close button
While 1
;After every loop check if the user clicked something in the GUI window
$msg = GUIGetMsg()
Select
;Check if user clicked on the close button
Case $msg = $GUI_EVENT_CLOSE
;Destroy the GUI including the controls
GUIDelete()
;Exit the script
Exit
Case $msg = $Refresh_Btn
GUICtrlSetState($Refresh_Btn, $GUI_Disable)
$Content = ReadText()
GUICtrlSetData($output1, $Content)
_GUICtrlEdit_SetSel($output1, StringLen($Content), StringLen($Content))
GUICtrlSetState($Refresh_Btn, $GUI_Enable)
GUICtrlSetState($input2, $GUI_Focus)
;Check if user clicked on the "Senden" button
Case $msg = $OK_Btn
;MsgBox(64, "Senden", "Hir sollte eig die messeg gesendet werden!")
GUICtrlSetState($OK_Btn, $GUI_Disable)
$oIE = _IECreate("Levin1993.de/ZCQ.php?name=" & _INetExplorerCapable(GUICtrlRead($input1)) & "&data=" & _INetExplorerCapable(GUICtrlRead($input2)), 0, 0)
_IELoadWaitTimeout(3000)
_IELoadWait($oIE)
_IEQuit($oIE)
GUICtrlSetState($OK_Btn, $GUI_Enable)
$Content = ReadText()
GUICtrlSetData($output1, $Content)
_GUICtrlEdit_SetSel($output1, StringLen($Content), StringLen($Content))
GUICtrlSetState($input2, $GUI_Focus)
;HIER SENDEN:
;\/**\/**\/**\/**\/**\/**\/**\/**\/**\/**\/**\/**\/
;InetGet("Levin1993.de/ZCQ.php?name="&_INetExplorerCapable(GUICtrlread($input1))&"&data="&_INetExplorerCapable(GUICtrlread($input2)), @tempdir&"\~temp36.txt")
;/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\_/\
EndSelect
WEnd
Func ReadText()
InetGet( "http://www.levin1993.de/FILENAME.txt", @WorkingDir & "\Temp.txt", 1 )
$File = FileOpen( @WorkingDir & "\Temp.txt", 0 )
$Content = FileRead( $File )
FileClose( $File )
$Content = StringReplace( $Content, @LF, @CRLF )
return $Content
EndFunc