1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. iwasready

Beiträge von iwasready

  • Fragen zur Kommunikation zwischen Prozessen

    • iwasready
    • 17. März 2010 um 07:37

    Das habe ich schon bemerkt ist aber für grössere Datenmengen wohl weniger geeignet oder?

  • Fragen zur Kommunikation zwischen Prozessen

    • iwasready
    • 16. März 2010 um 23:07

    Hallo Schnitzel

    Danke für die Inputs, habe das Forum schon durchforstet und zwei der drei von dir genannten threads schon gelesen.

    Nun ich denke die Kommunikation lässt sich am genialsten über Pipes bewerkstelligen.

    Die nächste Frage lautet nun, wenn ich eine NamedPipe (_NamedPipes_CreateNamedPipe ) einrichte, wie kann ich anschliessend Daten da reinschreiben respektive wieder rausholen. Auf dem Gebiet Pipes bin ich definitiv ein Anfänger und auf eure Inputs angewiesen. Im Forum gibt es kein wirklich klares "wie geht das" mit Pipes.

    Danke bereits für eure Hilfe und Inputs :)

    Gruss
    Iwasready

  • TCP - Server empfängt nicht oder nur einmal :(

    • iwasready
    • 16. März 2010 um 16:15

    Oops stimmt, Danke habe ich so angepasst!

  • TCP - Server empfängt nicht oder nur einmal :(

    • iwasready
    • 16. März 2010 um 16:12

    Hehe das Problem ist gelöst :)

    Wie Xenobiologist sagte, es war ein Problem der Reihenfolge :)

  • TCP - Server empfängt nicht oder nur einmal :(

    • iwasready
    • 16. März 2010 um 12:04

    Danke für die schnelle Antwort! Obwohl mein Tool kein Chat Programm wird schaue ich mir dein Script an! Vielleicht finde ich ja den Fehler ;)

  • TCP - Server empfängt nicht oder nur einmal :(

    • iwasready
    • 16. März 2010 um 11:54

    Hallöchen zusammen.

    Anhanden der Wiki Artikel versuche ich einen Client/Server zu schreiben.

    Leider habe ich das Problem, dass der Server die Daten nicht wirklich empfängt oder teilweise funktioniert es einmalig.

    Habe ich mich "verschrieben"?

    Spoiler anzeigen
    [autoit]

    ;Check startup parameters (exit when no parameters are set!)
    if $CmdLine[0] = 0 Then
    exit
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    ;Server or Client
    Switch $CmdLine[1]
    case 1 ;Server

    [/autoit] [autoit][/autoit] [autoit]

    ;Start TCP service
    TCPStartup()

    [/autoit] [autoit][/autoit] [autoit]

    ;Create listening socket
    $MainSocket = TCPListen(@IPAddress1,555)

    [/autoit] [autoit][/autoit] [autoit]

    ;Exit if socket could not be created!
    If $MainSocket = -1 then
    exit
    EndIf
    while 1
    ;Initialize a variable to represent a connection
    $ConnectedSocket = -1

    [/autoit] [autoit][/autoit] [autoit]

    ;Wait for and accept a connection
    Do
    $ConnectedSocket = TCPAccept($MainSocket)
    Until $ConnectedSocket <> -1

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $Recv = TCPRecv($ConnectedSocket,4096)
    if $Recv <> "" then TrayTip("SERVER","Received " & $Recv,1000)
    if @error then
    ExitLoop
    EndIf
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    ;If existing, close open socket
    If $ConnectedSocket <> -1 then
    TCPCloseSocket($ConnectedSocket)
    TrayTip("SERVER","Closed a ConnectedSocket",1000)
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    WEnd
    ;Shutdown TCP service
    TCPShutdown()

    [/autoit] [autoit][/autoit] [autoit]

    case 2 ;Client
    ;Start TCP service
    TCPStartup()

    [/autoit] [autoit][/autoit] [autoit]

    ;Initialize a variable to represent a connection
    $ConnectedSocket = -1

    [/autoit] [autoit][/autoit] [autoit]

    ;Attemp to connect to the server
    $ConnectedSocket = TCPConnect(@IPAddress1,555)

    [/autoit] [autoit][/autoit] [autoit]

    ;Exit on error
    If @error then
    exit
    EndIf

    [/autoit] [autoit][/autoit] [autoit]

    TCPSend($ConnectedSocket,"TEST")

    [/autoit] [autoit][/autoit] [autoit]

    ;Shutdown TCP service
    TCPShutdown()
    EndSwitch

    [/autoit]
  • Fragen zur Kommunikation zwischen Prozessen

    • iwasready
    • 16. März 2010 um 08:08

    Hallo Zusammen

    Ich möchte aus meinem Hauptpogramm heraus einen zweites AutoIT compiled Script starten. Soweit geht das ja mit Run() oder RunWait() etc. Nun möchte ich aber, dass diese zwei Prozesse miteinander kommunizieren können. wie kann ich das anstellen? Gibt es dafür eine Möglichkeit?

    Besten Dank für eure Inputs.
    iwasready

  • InetRead TimeOut? Script stürtzt ab!

    • iwasready
    • 15. März 2010 um 11:38

    Danke für die Rückmeldung!

    Dass die Überprüfung so oft durchgeführt wird ist nur zu Testzwecken.

    Ich werde deine Änderung übernehmen, habe gar nicht soweit gedacht.

    Gruss
    iwasready

  • InetRead TimeOut? Script stürtzt ab!

    • iwasready
    • 15. März 2010 um 10:38

    Hallo (auto)Bert

    Ich denke am einfachsten ist es, wenn ich gleich das komplette als ZIP einstelle :)

    Da die Datei zu gross ist für das Forum habe ich sie auf meinem Server bereitgestellt.

    ->> System_Manager.zip

    Gruss
    Iwasready

  • InetRead TimeOut? Script stürtzt ab!

    • iwasready
    • 15. März 2010 um 09:55

    Hallo (auto)Bert

    Natürlich, ist im obigen Post angepasst!

  • InetRead TimeOut? Script stürtzt ab!

    • iwasready
    • 15. März 2010 um 09:34

    Natürlich :) Sorry wenn die Formatierung nicht gepasst hat, habe vergesen auf "Quellcode" umzuschalten.
    Script 1: Hauptscript

    Spoiler anzeigen
    [autoit]

    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_icon=Ressources\icoSysMan.ico
    #AutoIt3Wrapper_outfile=SysMan_Client.exe
    #AutoIt3Wrapper_UseUpx=n
    #AutoIt3Wrapper_Res_Comment=System Manager based on AutoIt 3.x
    #AutoIt3Wrapper_Res_Fileversion=1.0.0.0
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    ;System Maintenance Client
    ;*************************
    ; Developed for the Salvation Army Switzerland

    [/autoit] [autoit][/autoit] [autoit]

    ;Includes
    #include "UDF_SysMan.au3"
    #include
    #include
    #include
    #include
    #include
    #include
    #include
    #include 'Ribbonsbar.au3'
    #Include
    #include
    #include

    [/autoit] [autoit][/autoit] [autoit]

    ;Global variables
    Global $InternetConnection=0 ;0 = no Internet, 1 = Internet connection is available
    Global $SQLiteDB;SQLite db handle
    Global $ApplVersion = "1.0.0";Version of Application (used for identification)

    [/autoit] [autoit][/autoit] [autoit]

    ;------------------------------------------------------------------------------------------------------ START STARTUP SCRIPTS
    if FileExists(@ScriptDir & "\Startup") Then
    $StartupScriptFiles = _FileListToArray(@ScriptDir & "\Startup","*.au3")
    $i=0
    while $i<$StartupScriptFiles[0]
    $i=$i+1
    RunWait(@AutoItExe & " " & @ScriptDir & "\Startup\" & $StartupScriptFiles[$i],"",@SW_HIDE)
    WEnd
    $i=0
    EndIf
    ;------------------------------------------------------------------------------------------------------ END STARTUP SCRIPTS

    [/autoit] [autoit][/autoit] [autoit]

    ;------------------------------------------------------------------------------------------------------ START DATABASE
    _SQLite_Startup ()
    If @error Then
    MsgBox(16, "SQLite Error", "SQLite.dll Can't be Loaded!")
    Exit - 1
    EndIf
    ConsoleWrite("_SQLite_LibVersion=" &_SQLite_LibVersion() & @CRLF)
    $SQLiteDB = _SQLite_Open(IniRead("sysmandata.ini","SysMan","Database","sysmandata.sqlite"))
    If @error Then
    MsgBox(16, "SQLite Error", "Can't Load Database!")
    Exit - 1
    EndIf
    ;------------------------------------------------------------------------------------------------------ END DATABASE
    ;############################################################################
    _Log("SysMan","Application started!")
    ;Check Running Permission (has to be Administrator)
    ;_RunningAsAdmin("","","")

    [/autoit] [autoit][/autoit] [autoit]

    ;------------------------------------------------------------------------------------------------------ START GUI INITIALISATION
    $hGUI = GUICreate ( "System Manager - v." & $ApplVersion , 900, 500, -1, -1)
    Opt("GUIOnEventMode",1)

    [/autoit] [autoit][/autoit] [autoit]

    GUISetOnEvent($GUI_EVENT_CLOSE, "_GuiEvent_CLOSE")
    GUISetOnEvent($GUI_EVENT_MINIMIZE, "_GuiEvent_MINIMIZE")

    [/autoit] [autoit][/autoit] [autoit]

    GUISetBkColor( 0x99B9E3 );Gui BG Blue
    ;~ GUISetBkColor( 0x4C4C4C );Gui BG Black
    ;~ GUISetBkColor( 0xC9CCD5 );Gui BG Silver
    $hBar = _RibbonsBar_Create( $hGUI, 0, 0, 900, 0, 'blue')

    [/autoit] [autoit][/autoit] [autoit]

    ;Create statusbar in GUI
    Local $StatusBarParts[3] = [300, 600, -1]
    $hStatus = _GUICtrlStatusBar_Create ($hGUI,$StatusBarParts)
    _GUICtrlStatusBar_SetText($hStatus,"System Manager started!",1)
    _GUICtrlStatusBar_SetText($hStatus,"Internet connection not yet tested!",0)
    ;------------------------------------------------------------------------------------------------------ END GUI INITIALISATION

    [/autoit] [autoit][/autoit] [autoit]

    ;------------------------------------------------------------------------------------------------------ BEGIN TAB System Manager
    $hTab_SysMan = _RibbonsBar_Create_Tab( $hBar, 'System Manager' )
    $hItem_File = _RibbonsBar_Create_TabItem ( $hTab_SysMan, 'File' , 160 )
    $hButton_File_Close = _RibbonsBar_Create_SmallButton($hItem_File,'',132,1 ,'Close',80)
    $hButton_File_Hide = _RibbonsBar_Create_SmallButton($hItem_File,'',270,2 ,'Hide',80)

    [/autoit] [autoit][/autoit] [autoit]

    ;------------------------------------------------------------------------------------------------------ END TAB System Manager
    _RibbonsBar_Tab_SetState($hTab_SysMan);set active tab!
    GUISetState()
    ;------------------------------------------------------------------------------------------------------ START TRAY ICON
    Opt("TrayAutoPause",0)
    Opt("TrayMenuMode",1)
    $TrayIcon_Close = TrayCreateItem("Close")
    $TrayIcon_Show= TrayCreateItem("Show")
    ;------------------------------------------------------------------------------------------------------ START TRAY ICON

    [/autoit] [autoit][/autoit] [autoit]

    ;Register interval tasks
    AdlibRegister("_hStatus_SystemTime",1000)
    AdlibRegister("_CheckForInternetConnection",10000)

    [/autoit] [autoit][/autoit] [autoit]

    ;------------------------------------------------------------------------------------------------------ START GUI INPUT
    While 1
    ;Input from RibbonsBar
    Switch _RibbonsBar_GetMsg()
    Case -3
    ;Close
    Exit
    Case $hButton_File_Close
    if msgbox(4,"Close?","Would you realy like to close this application?") = 6 Then
    Exit
    EndIf
    Case $hButton_File_Hide
    GuiSetState(@SW_HIDE,$hGUI)
    EndSwitch

    [/autoit] [autoit][/autoit] [autoit]

    ;Input from GUI
    ;Switch GUIGetMsg()
    ;EndSwitch

    [/autoit] [autoit][/autoit] [autoit]

    ;Input from TryIcon
    Switch TrayGetMsg()
    case $TrayIcon_Show
    GUISetState(@SW_SHOW,$hGUI)
    case $TrayIcon_Close
    Exit
    EndSwitch

    [/autoit] [autoit][/autoit] [autoit]

    WEnd
    ;------------------------------------------------------------------------------------------------------ END GUI INPUT

    [/autoit] [autoit][/autoit] [autoit]

    ;------------------------------------------------------------------------------------------------------ START INTERVAL FUNCTIONS

    [/autoit] [autoit][/autoit] [autoit]

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _hStatus_SystemTime()
    ; Description ...: Display the current system time inside the application
    ; Syntax.........: _hStatus_SystemTime()
    ; Author ........: Y. Menge ([email='yves_menge@swi.salvationarmy.org'][/email])
    ; ===============================================================================================================================
    Func _hStatus_SystemTime()
    $SystemTime=_Date_Time_GetSystemTime()
    _GUICtrlStatusBar_SetText($hStatus,_Date_Time_SystemTimeToDateStr($SystemTime) & " - " & _Date_Time_SystemTimeToTimeStr($SystemTime),2)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _CheckForInternetConnection()
    ; Description ...: Check if the needed host is available on the network
    ; Syntax.........: _CheckForInternetConnection()
    ; Author ........: Y. Menge ([email='yves_menge@swi.salvationarmy.org'][/email])
    ; ===============================================================================================================================
    Func _CheckForInternetConnection()
    $Result=_CheckInternet(_DBSettings_GET("ConnectionCheckURL","http://update.salvationarmy.ch/sysman/connectiontest.html"),_DBSettings_GET("ConnectionCheckValue","142199AB5289B0EA68E697DD4C0E6E7081ECBF385501722D60D7233FD984"))
    if $Result=0 then
    $InternetConnection=0
    _GUICtrlStatusBar_SetText($hStatus,"Internet connection unavailable! ={",0)
    ConsoleWrite("No Internet :(")
    Else
    $InternetConnection=1
    _GUICtrlStatusBar_SetText($hStatus,"Internet connection available! =}",0)
    ConsoleWrite("Working :)")
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ;------------------------------------------------------------------------------------------------------ END INTERVAL FUNCTIONS

    [/autoit] [autoit][/autoit] [autoit]

    ;------------------------------------------------------------------------------------------------------ START INTERNAL FUNCTIONS

    [/autoit] [autoit][/autoit] [autoit]

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _GuiEvent_MINIMIZE
    ; Description ...: Hide the GUI!
    ; Syntax.........: _GuiEvent_CLOSE()
    ; Author ........: Y. Menge ([email='yves_menge@swi.salvationarmy.org'][/email])
    ; ===============================================================================================================================
    Func _GuiEvent_MINIMIZE()
    GUISetState(@SW_HIDE)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _GuiEvent_CLOSE
    ; Description ...: Close open databases and exit the application
    ; Syntax.........: _GuiEvent_CLOSE()
    ; Author ........: Y. Menge ([email='yves_menge@swi.salvationarmy.org'][/email])
    ; ===============================================================================================================================
    Func _GuiEvent_CLOSE()
    ;Close database
    _SQLite_Close()
    _SQLite_Shutdown ()

    [/autoit] [autoit][/autoit] [autoit]

    _Log("SysMan","Application cloesd!")

    [/autoit] [autoit][/autoit] [autoit]

    ;exit application
    Exit
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ;------------------------------------------------------------------------------------------------------ END INTERVAL FUNCTIONS

    [/autoit]

    Script 2:

    Spoiler anzeigen
    [autoit]


    ;Include needed Files
    #include

    [/autoit] [autoit][/autoit] [autoit]

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _Log
    ; Description ...: Creat a log entry in the database
    ; Syntax.........: _FileListToArrayEx($sPath, $sFilter = '*.*', $iFlag = 0, $sExclude = '')
    ; Parameters ....: $strType - Type of log entry
    ; $sArcName - Value of log entry
    ; Return values .: Success - Returns 1
    ; Failure - Returns 0
    ; Author ........: Y. Menge ([email='yves_menge@swi.salvationarmy.org'][/email])
    ; ===============================================================================================================================
    Func _Log($strType, $strValue)
    _SQLite_Exec(-1,"INSERT INTO Log (""Type"",""Value"") VALUES("""& $strType &""","""& $strValue & """)")
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _ArraySize
    ; Description ...: Get the lenght of a array! Works with empty arrays too (returns 0)
    ; Syntax.........: _ArraySize($aArray)
    ; Parameters ....: $aArray - Array name
    ; Return values .: Success - Lenght of the given array
    ; Author ........: Y. Menge ([email='yves_menge@swi.salvationarmy.org'][/email])
    ; ===============================================================================================================================
    Func _ArraySize( $aArray )
    SetError( 0 )
    $index = 0
    Do
    $pop = _ArrayPop( $aArray )
    $index = $index + 1
    Until @error = 1
    Return $index - 1
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _RunningAsAdmin()
    ; Description ...: Check admin priviledges. If scripts is running without admin priviledges, restart the script as admin!
    ; Syntax.........: _RunningAsAdmin($strAdminUser,$strAdminPassword,$strAdminDomain)
    ; Parameters ....: $strAdminUser- Admin Account
    ;$strAdminPassword- Account Password
    ;$strAdminDomain- Account Domain to log on
    ; Author ........: Y. Menge ([email='yves_menge@swi.salvationarmy.org'][/email])
    ; ===============================================================================================================================
    Func _RunningAsAdmin($strAdminUser, $strAdminPassword, $strAdminDomain)
    If IsAdmin() = 0 Then
    if RunAs($strAdminUser,$strAdminDomain,$strAdminPassword,0,FileGetShortName(@ScriptFullPath)) = 0 Then
    _Log("SysMan","Could not start as Admin! AminUser, AdminPassword and LogonDomain correct?")
    Exit
    EndIf
    Exit
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _DBSettings_GET()
    ; Description ...: Get a setting out of database
    ; Syntax.........: _DBSettings_GET($strName, $strDefaultValue)
    ; Parameters ....: $strName- Settingname to get
    ;$strDefaultValue- Defaultvalue if setting ist not in database
    ; Author ........: Y. Menge ([email='yves_menge@swi.salvationarmy.org'][/email])
    ; ===============================================================================================================================
    Func _DBSettings_GET($strName, $strDefaultValue)
    local $aResult, $hQuery
    _SQLite_Query(-1,"SELECT value FROM settings WHERE name='" & $strName & "'",$hQuery)
    _SQLite_FetchData($hQuery,$aResult)
    _SQLite_QueryFinalize($hQuery)
    ;return default value if none is saved inside db
    if $aResult[0]="" Then
    return $strDefaultValue
    EndIf
    ;return db value
    return $aResult[0]
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _DBSettings_SET()
    ; Description ...: Set or modifie a setting to a new value
    ; Syntax.........: _DBSettings_SET($strName, $strValue)
    ; Parameters ....: $strName- Settingname
    ;$strValue- Value to set
    ; Author ........: Y. Menge ([email='yves_menge@swi.salvationarmy.org'][/email])
    ; ===============================================================================================================================
    Func _DBSettings_SET($strName, $strValue)
    local $aResult, $hQuery
    ;Check if value allready exists!
    _SQLite_Query(-1,"SELECT name FROM settings WHERE name='" & $strName & "'",$hQuery)
    _SQLite_FetchData($hQuery,$aResult)
    _SQLite_QueryFinalize($hQuery)
    if $aResult[0]="" Then
    ;Create a new setting in db
    _SQLite_Exec(-1,"INSERT INTO settings (name,value) VALUES ('" & $strName & "','" & $strValue & "')")
    Else
    ;Modify a existing setting in db
    _SQLite_Exec(-1,"UPDATE settings SET value='" & $strValue & "' WHERE name='" & $strName & "'")
    EndIf
    _SQLite_QueryFinalize($hQuery)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _DBSettings_DEL()
    ; Description ...: Remove a setting from the table
    ; Syntax.........: _DBSettings_DEL($strName)
    ; Parameters ....: $strName- Settingname
    ; Author ........: Y. Menge ([email='yves_menge@swi.salvationarmy.org'][/email])
    ; ===============================================================================================================================
    Func _DBSettings_DEL($strName)
    _SQLite_Exec(-1,"DELETE FROM settings WHERE name='" & $strName & "'")
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _CheckPing()
    ; Description ...: Check the availability of a internet connection to a specific host!
    ; Syntax.........: _CheckPing($strHost)
    ; Parameters ....: $strHost- Host to check
    ; Return values .: Success - Returns >0
    ; Failure - Returns 0
    ; Author ........: Y. Menge ([email='yves_menge@swi.salvationarmy.org'][/email])
    ; ===============================================================================================================================
    Func _CheckPing($strHost)
    $Result = Ping($strHost)
    if $Result > 0 Then
    return $Result
    Else
    return 0
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _CheckInternet()
    ; Description ...: Check the availability of a internet connection to a specific host!
    ; Syntax.........: _CheckInternet($strURL, $strCheckValue)
    ; Parameters ....: $strURL- URL to read in!
    ;$strCheckValue- A string to compare with
    ; Return values .: Success - Returns 1
    ; Failure - Returns 0
    ; Author ........: Y. Menge ([email='yves_menge@swi.salvationarmy.org'][/email])
    ; ===============================================================================================================================
    Func _CheckInternet($strURL, $strCheckValue)
    $Result=BinaryToString(InetRead($strURL),16)
    if $Result=$strCheckValue Then
    return 1
    Else
    return 0
    EndIf
    EndFunc

    [/autoit]


    //Edit: Für die GUI Ribbonbar Oberfläche verwende ich die folgende UDF --> RibbonsBar (Office 2007 Bar) UDF


    Gruss
    Iwasready

  • InetRead TimeOut? Script stürtzt ab!

    • iwasready
    • 15. März 2010 um 09:19

    Guten Morgen :)

    Ich arbeite gerade an einem Script welches die Verfügbarkeit einer URL testen soll. Nun solange die URL verfügbar ist läuft alles einwandfrei. Ist die Seite zwar im DNS auflösbar aber nicht erreichbar, schmiert das komplette Script ab.

    Ich verwende AdLib für die wiederkehrende Aktion.

    Mein Script ist wie folgt aufgebaut:

    [autoit]

    ;Register interval tasksAdlibRegister("_hStatus_SystemTime",1000)AdlibRegister("_CheckForInternetConnection",10000)
    Func _CheckForInternetConnection()$Result=_CheckInternet(_DBSettings_GET("ConnectionCheckURL","http://update.salvationarmy.ch/sysman/connectiontest.html"),_DBSettings_GET("ConnectionCheckValue","142199AB5289B0EA68E697DD4C0E6E7081ECBF385501722D60D7233FD984"))if $Result=0 then$InternetConnection=0_GUICtrlStatusBar_SetText($hStatus,"Internet connection unavailable! ={",0)ConsoleWrite("No Internet :(")Else$InternetConnection=1_GUICtrlStatusBar_SetText($hStatus,"Internet connection available! =}",0)ConsoleWrite("Working :)")EndIfEndFunc
    Func _hStatus_SystemTime()$SystemTime=_Date_Time_GetSystemTime()_GUICtrlStatusBar_SetText($hStatus,_Date_Time_SystemTimeToDateStr($SystemTime) & " - " & _Date_Time_SystemTimeToTimeStr($SystemTime),2)EndFunc
    Func _CheckInternet($strURL, $strCheckValue)$Result=BinaryToString(InetRead($strURL),16)if $Result=$strCheckValue Thenreturn 1Elsereturn 0EndIfEndFunc

    [/autoit]


    Gibt es eine Möglichkeit wie eine Art TimeOut einzubauen? Sprich wenn die Seite nicht inerhalb von z.B. 1 Sekunde geladen wird, fehler ausgeben?

    Besten Dank für eure Unterstützung.

    Gruss
    Iwasready

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™