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. WhiteLion

Beiträge von WhiteLion

  • Problem mit Modernmenu / GUISetState() - funktion wirft mich auf den desktop

    • WhiteLion
    • 4. März 2013 um 23:24

    hallo leute, ich habe ein tool, welches im hintergrund läuft und das modernmenu benutzt (Wer es nicht kennt: es ist ein besseres traymenü als das herkömmliche).
    Das Problem ist, dass ich das Tool öfters automatisch neu starten lasse (muss auch so bleiben!), was zur folge hat, dass logischer weise das traymenu wieder neu erstellt wird.
    Das modernmenu muss GUISetState() aufrufen, sonst sind die menüpunkte nicht anklickbar. Leider wirft mich genau dieses Aufrufen der Funktion GUISetState() immer wieder auf den
    desktop, was in spielen natürlich oft total doof ist. Habt Ihr eine Idee wie ich GUISetState() so aufrufen kann, dass ich dadruch nicht auf dem desktop lande!?

    [autoit]

    ;**********************************************************************
    ; _TrayIconCreate([ToolTip [, IconFile [, IconID]]])
    ;**********************************************************************
    Func _TrayIconCreate($sToolTip = "", $sIconFile = @AutoItExe, $nIconID = 0, $sCallback = "", $nMsg = 0, $hIcon = 0)
    If $sToolTip = "" Then $sToolTip = $sDefaultTT

    $nIconID = _GetIconID($nIconID, $sIconFile)

    If $sIconFile = "" Then
    If $hIcon = 0 Then
    If $nIconID = 0 Then
    $sIconFile = @AutoItExe
    Else
    $hIcon = LoadIcon(0, $nIconID)
    EndIf
    EndIf
    EndIf

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

    If $sIconFile <> "" Then
    Local $stIcon = DllStructCreate("hwnd")

    If ExtractIconExW($sIconFile, $nIconID, 0, DllStructGetPtr($stIcon), 1) > 0 Then
    $hIcon = DllStructGetData($stIcon, 1)
    Else
    $hIcon = LoadIcon(0, 32516)
    EndIf
    EndIf

    If $TRAYMSGWND = 0 Then
    $TRAYMSGWND = GUICreate("", 1, 1, 9999, 9999, -1, 0x00000080)
    GUISetState() ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< hier das Problem!
    ShowWindow($TRAYMSGWND, @SW_HIDE)
    EndIf

    Local $nNID = _GetNewTrayIndex()
    If $nNID = 0 Then
    DestroyIcon($hIcon)
    Return 0
    EndIf

    $TRAYNOTIFYIDS[$nNID][0] = $nNID
    $TRAYNOTIFYIDS[$nNID][1] = $hIcon
    $TRAYNOTIFYIDS[$nNID][2] = 0
    $TRAYNOTIFYIDS[$nNID][3] = 9
    $TRAYNOTIFYIDS[$nNID][4] = $sToolTip
    $TRAYNOTIFYIDS[$nNID][5] = $sCallback
    $TRAYNOTIFYIDS[$nNID][6] = $nMsg
    $TRAYNOTIFYIDS[$nNID][7] = FALSE
    $TRAYNOTIFYIDS[$nNID][8] = FALSE

    $TRAYLASTID = $nNID

    Return $nNID
    EndFunc

    [/autoit]
  • Profifrage: Tray Icons refreshen / aktuallisieren

    • WhiteLion
    • 2. März 2013 um 20:04

    okay, ich hab eine lösung gefunden die ich leicht modifiziert habe... quelltext hängt an...
    getestet unter Win 7 / Win 8 64 bit

    Dateien

    systray.zip 4,24 kB – 398 Downloads
  • Singleton funktioniert nicht :(

    • WhiteLion
    • 2. März 2013 um 18:12

    also @error ist 0 und wenn ich den rückgabewert von _singelton anzeigen lasse (sollte ja ein handle sein), dann ist dieser z.B. folgender (bei 4 programmstarts):
    1. instanz: 00000B1C
    2. instanz: 00000B1B
    3. instanz: 00000B1C
    4. instanz: 00000B1B

    Gerne dürft ihr die mal per teamviewer/skype selber schauen:
    Skype ID:whitelionatx

  • Singleton funktioniert nicht :(

    • WhiteLion
    • 28. Februar 2013 um 20:49

    Oscar

    Kein Problem:
    1. ich kompiliere den code aus meinem eröffnungspost unter nativem Win7 64
    (code und kompilierte variante hängt an)
    2. ich führe die kompilierte .exe aus und erwarte natürlich beim ersten starten der exe. NICHT die msgbox (

    [autoit]

    Msgbox(16,"Warning", $TileofWin&" is already running.", 10)

    [/autoit]

    )
    dann führe ich sie ein zweites und drittes ... ect. mal aus und alle ausgeführten varianten hängen natürlich in der While schleife und laufen sichtbar im tray.
    und natürlich sollte ja beim zweiten mal ausführen die messagebox erscheinen und beim klick auf "OK" beendet werden, das passiert aber nicht. Weder unter dem Win7 64 noch unter der völlig unberührten Win 8 64 installation die in der VMWare läuft.... ich kann auch gerne ein video davon machen.

    EDIT: ich verweise mal auf den post hier eines leidensgenossen (das zum thema: geht immer) :
    [ offen ] _Singleton funktioniert nicht

    Dateien

    test.zip 304,73 kB – 437 Downloads
  • Singleton funktioniert nicht :(

    • WhiteLion
    • 28. Februar 2013 um 14:18

    danke für die lösungen .... aber wie auch immer, das original "singleton" beispiel geht in einer frischen Win8 64 installation jedenfalls auch nicht.

  • Profifrage: Tray Icons refreshen / aktuallisieren

    • WhiteLion
    • 27. Februar 2013 um 20:33

    ich habe das problem, dass die programme, die sich im tray befinden ein totes icon hinterlassen, wenn sie unsanft (taskkill) beendet werden. erst wenn man über das trayicon die maus hält, dann verschwindet es. ich würde gerne wissen was ich machen kann um regelmäßigen abständen ein script laufen zu lassen, dass diese icons automatisch entfernt.

    EDIT: ich habe folgendes script gefunden, was aber nicht zu funktionieren scheint ...

    Spoiler anzeigen
    [autoit]

    #AutoIt3Wrapper_UseX64=y
    #NoTrayIcon

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

    Global $ret = _RefreshNotificationAreaIcons(0);User Promoted Notification Area/Notification Area - Win7-2008R2/Vista
    ConsoleWrite("+User Promoted Notification Area/Notification Area: " & $ret & @LF)
    $ret = _RefreshNotificationAreaIcons(1);Overflow Notification Area - Win7-2008R2
    ConsoleWrite("+Overflow Notification Area: " & $ret & @LF)
    $ret = _RefreshNotificationAreaIcons(2);System Promoted Notification Area - Win7-2008R2
    ;(system clears these after 30 seconds anyway)
    ConsoleWrite("+System Promoted Notification Area: " & $ret & @LF)

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

    ; #FUNCTION# ====================================================================================================
    ; Name...........: _RefreshNotificationAreaIcons
    ; Description ...: Remove Notification Area toolbar buttons (icons) orphaned after an application crash or process close
    ; Removes icons from all three Notification areas in Win 7/Server 2008R2 32/64 bit versions
    ; Syntax.........: _RefreshNotificationAreaIcons(0) - User Promoted Notification Area/Notification Area - Win7-2008R2/Vista
    ; _RefreshNotificationAreaIcons(1) - Overflow Notification Area - Win7-2008R2
    ; _RefreshNotificationAreaIcons(2) - System Promoted Notification Area (system clears these after 30 seconds anyway) - Win7-2008R2
    ; Return values .: Success Removed icon count
    ; Failure 0 sets error
    ; Author ........: rover 28/11/2011 - update of _RefreshTrayIcon()
    ; Modified.......:
    ; Remarks .......: Cannot be called from a service.
    ; Synopsis: Each taskbar Notification Area toolbar button/icon has an applications
    ; window handle associated with it that receives notification messages from user interaction with the icon.
    ; This toolbar button removal method tests if the handle is no longer valid,
    ; and uses the MS recommended API Shell_NotifyIcon to remove them.
    ; The Shell_NotifyIcon API requires a matching window handle and application identifier to allow icon deletion.
    ;
    ; Minimum Operating Systems: Vista, Win 2008, Win 7, Win 2008R2
    ; 64 bit OS support. Tested on: Win 7, Win 2008R2
    ; Related .......: _RefreshTrayIcon() (for 32 bit Win2k, XP and Vista), _RefreshSystemTray()
    ; Link ..........; @@MsdnLink@@ Shell_NotifyIcon
    ; Example .......; Yes
    ;
    ; ===============================================================================================================
    Func _RefreshNotificationAreaIcons($iTbar = 0)
    Switch @OSVersion
    Case "WIN_2000", "WIN_XP", "WIN_2003", "WIN_XPe"
    Return SetError(1, 1, 0)
    EndSwitch
    Local $hOwnerWin, $i_uID, $aRet, $iRet, $hTrayNotifyWnd, $iButtonCount = 0, _
    $hToolbar, $iCount, $iDLLUser32, $iDLLKrnl32, $iDLLShll32, _
    $tTBBUTTON, $pTBBUTTON, $iTBBUTTON, $tTRAYDATA, $pTRAYDATA, $iTRAYDATA, _
    $tNOTIFYICONDATA, $pNOTIFYICONDATA, $iProcessID, $hProcess, $pAddress
    $hTrayNotifyWnd = ControlGetHandle(WinGetHandle("[CLASS:Shell_TrayWnd]"), "", "[CLASS:TrayNotifyWnd]")
    Switch $iTbar
    Case 0
    $hToolbar = ControlGetHandle(ControlGetHandle($hTrayNotifyWnd, "", "[CLASS:SysPager]"), "", "[CLASS:ToolbarWindow32; INSTANCE:1]")
    Case 1
    $hToolbar = ControlGetHandle(WinGetHandle("[CLASS:NotifyIconOverflowWindow]"), "", "[CLASS:ToolbarWindow32; INSTANCE:1]")
    Case 2
    $hToolbar = ControlGetHandle($hTrayNotifyWnd, "", "[CLASS:ToolbarWindow32; INSTANCE:2]")
    EndSwitch
    $aRet = DllCall("user32.dll", "lparam", "SendMessageW", "hwnd", $hToolbar, "int", 0x418, "wparam", 0, "lparam", 0)
    If @error Or $aRet[0] < 1 Then Return SetError(2, @error, 0)
    $iCount = $aRet[0] - 1
    $iProcessID = WinGetProcess($hToolbar)
    If @error Or $iProcessID = -1 Then Return SetError(3, @error, 0)
    $aRet = DllCall("kernel32.dll", "ptr", "OpenProcess", "dword", 0x00000018, "int", 0, "int", $iProcessID)
    If @error Or $aRet[0] = 0 Then Return SetError(4, @error, 0)
    $hProcess = $aRet[0]
    $tTBBUTTON = DllStructCreate("int;int;byte;byte;align;dword_ptr;int_ptr")
    $pTBBUTTON = DllStructGetPtr($tTBBUTTON)
    $iTBBUTTON = DllStructGetSize($tTBBUTTON)
    If @error Or $iTBBUTTON = 0 Then Return SetError(5, @error, 0)
    $aRet = DllCall("kernel32.dll", "ptr", "VirtualAllocEx", "ptr", $hProcess, "ptr", 0, "int", $iTBBUTTON, "dword", 0x00001000, "dword", 0x00000004)
    If @error Or $aRet[0] = 0 Then
    DllCall("kernel32.dll", "int", "CloseHandle", "ptr", $hProcess)
    Return SetError(6, @error, 0)
    EndIf
    $pAddress = $aRet[0]
    $iDLLUser32 = DllOpen("user32.dll")
    $iDLLKrnl32 = DllOpen("kernel32.dll")
    $iDLLShll32 = DllOpen("shell32.dll")
    $tTRAYDATA = DllStructCreate("hwnd;uint;uint;dword[2];ptr")
    $pTRAYDATA = DllStructGetPtr($tTRAYDATA)
    $iTRAYDATA = DllStructGetSize($tTRAYDATA)
    $tNOTIFYICONDATA = DllStructCreate("dword;hwnd;uint;uint;uint;ptr;wchar[128];dword;dword;wchar[256];uint;wchar[64];dword;int;short;short;byte[8];ptr")
    $pNOTIFYICONDATA = DllStructGetPtr($tNOTIFYICONDATA)
    DllStructSetData($tNOTIFYICONDATA, 1, DllStructGetSize($tNOTIFYICONDATA))
    For $iID = $iCount To 0 Step -1
    If IsHWnd($hToolbar) = False Then ExitLoop
    $aRet = DllCall($iDLLUser32, "lparam", "SendMessageW", "hwnd", $hToolbar, "int", 0x417, "wparam", $iID, "lparam", $pAddress)
    If @error Or $aRet[0] <> 1 Then ContinueLoop
    $aRet = DllCall($iDLLKrnl32, "int", "ReadProcessMemory", "ptr", $hProcess, "ptr", $pAddress, "ptr", $pTBBUTTON, "int", $iTBBUTTON, "int*", -1)
    If @error Or $aRet[5] <> $iTBBUTTON Then ContinueLoop
    $aRet = DllCall($iDLLKrnl32, "int", "ReadProcessMemory", "ptr", $hProcess, "dword_ptr", DllStructGetData($tTBBUTTON, 5), "ptr", $pTRAYDATA, "int", $iTRAYDATA, "int*", -1)
    If @error Or $aRet[5] <> $iTRAYDATA Then ContinueLoop
    $hOwnerWin = DllStructGetData($tTRAYDATA, 1)
    If @error Or $hOwnerWin = 0 Then ContinueLoop
    If IsPtr($hOwnerWin) = 0 Or IsHWnd($hOwnerWin) = True Then ContinueLoop
    $i_uID = DllStructGetData($tTRAYDATA, 2)
    If @error Or $i_uID < 0 Then ContinueLoop
    $iRet = WinGetProcess($hOwnerWin)
    If @error Or $iRet <> -1 Then ContinueLoop
    DllStructSetData($tNOTIFYICONDATA, 2, $hOwnerWin)
    DllStructSetData($tNOTIFYICONDATA, 3, $i_uID)
    $aRet = DllCall($iDLLShll32, "int", "Shell_NotifyIconW", "dword", 0x2, "ptr", $pNOTIFYICONDATA)
    If @error Or $aRet[0] <> 1 Then ContinueLoop
    $iButtonCount += $aRet[0]
    Next
    DllCall($iDLLKrnl32, "int", "VirtualFreeEx", "ptr", $hProcess, "ptr", $pAddress, "int", 0, "dword", 0x00008000)
    DllCall($iDLLKrnl32, "int", "CloseHandle", "ptr", $hProcess)
    DllClose($iDLLShll32)
    DllClose($iDLLUser32)
    DllClose($iDLLKrnl32)
    Return SetError(0, 0, $iButtonCount)
    EndFunc ;==>_RefreshNotificationAreaIcons

    [/autoit]
  • Singleton funktioniert nicht :(

    • WhiteLion
    • 27. Februar 2013 um 20:29

    also ich kann nur von mir sprechen und von einigen thread eröffnern die am gleichen "singleton bug" leiden. es funktioniert bei mir nicht (script oben) und auch nicht in meiner Win 8 64bit VM ... genau das gleiche. in anderen threads wurde auch recht vehement behauptet das es unter "Win 7 64" funktionieren muss... nun ja, offensichtlich tut es das bei einigen aber nicht. ich behaupte einfach mal das ist ein bug, da selbst das beispiel, was ja kaum anders ist als mein script bei mir unter beiden OS nicht funktioniert.

  • Singleton funktioniert nicht :(

    • WhiteLion
    • 26. Februar 2013 um 13:48

    _singleton geht nicht unter win 7 64

    ich habe folgendes script, was leider nicht das multiple ausführen des scriptes verhindert:

    [autoit]


    #include <Misc.au3>
    Global $ToolTitle = "xyz";

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

    _checkMutex($ToolTitle)

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

    Func _checkMutex($TileofWin)
    if _Singleton($TileofWin,1) = 0 Then
    Msgbox(16,"Warning", $TileofWin&" is already running.", 10)
    Exit
    EndIf
    EndFunc

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

    While 1
    Sleep(3)
    WEnd

    [/autoit]


    hat jemand eine lösung ?


    EDIT:
    Habe gerade selber eine PID basierende lösung gefunden... wer sie gerne benutzen möchte:

    [autoit]

    Local $iSingleton = _SingletonPID('myUniqueName', 1)

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

    If $iSingleton = 0 Then
    MsgBox(4096, '', 'This is the first instance of the program running: ' & $iSingleton)
    Else
    MsgBox(4096, '', 'There is another instance running. This PID is: ' & $iSingleton)
    EndIf

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

    ; #FUNCTION# ====================================================================================================================
    ; Name ..........: _SingletonPID
    ; Description ...: Enforce a design paradigm where only one instance of the script may be running.
    ; Syntax ........: _SingletonPID($sOccurenceName[, $iFlag = 0])
    ; Parameters ....: $sOccurenceName - String to identify the occurrence of the script.
    ; $iFlag - [optional] Optional parameters. Default is 0.
    ; 0 - Exit the script with the exit code -1 if another instance already exists.
    ; 1 - Return the PID of the main executable and without exiting the script too.
    ; Return values .: Success - 0 No other process is running.
    ; Failure - The PID of the main executable.
    ; Author ........: guinness with initial ideas by Valik for _Singleton & KaFu for _EnforceSingleInstance.
    ; Example .......: Yes
    ; ===============================================================================================================================
    Func _SingletonPID($sOccurenceName, $iFlag = 0)
    Local $hWnd = WinGetHandle($sOccurenceName)
    If @error Then
    AutoItWinSetTitle($sOccurenceName)
    $hWnd = WinGetHandle($sOccurenceName)
    ControlSetText($hWnd, '', ControlGetHandle($hWnd, '', 'Edit1'), @AutoItPID)
    Else
    If BitAND($iFlag, 1) Then
    Return Number(ControlGetText($hWnd, '', ControlGetHandle($hWnd, '', 'Edit1')))
    Else
    Exit -1
    EndIf
    EndIf
    Return 0
    EndFunc ;==>_SingletonPID

    [/autoit]
  • Win 8 dlls ins systemverzeichnis scheiben per script ? - nicht möglich!?

    • WhiteLion
    • 25. Februar 2013 um 14:57
    [autoit]

    Func _PcapGetLastError($pcap=0) ; returns text from last pcap error
    If NOT IsPtr($pcap) Then return DllStructGetData($Pcap_errbuf,1)
    Local $v = DllCall($Pcap_dll, "str:cdecl", "pcap_geterr","ptr",$pcap)
    return DllStructGetData($Pcap_errbuf,1)&$v[0]
    EndFunc

    [/autoit]

    die funktion wirft einen fehler der aus der dll selber kommt, nämlich:
    No interfaces found! Make sure libpcap/WinPcap is properly installed on the local machine.

    Interfaces sind wohl die netzwerkadapter.

    :(

    Edit: ich hab mal ein beispiel + dlls angehängt .... evtl findet ja jemand den fehler bzw das problem.
    ansonsten hilft nur noch rausfinden, wie ich die dateien in die windows systemverzeichnisse kopieren kann....


    EDIT2:

    ich hab was gefunden, was winpcap silent installieren soll, aber auch da wirds wieder in die systemverzeichnisse verschoben:

    Code
    Yes it jusst places some DLL's and creates a service then starts it.
    you will need to extract the proper DLL's from the WinPCap installer package - use 7zip and have it "auto rename" the duplicate files
    there will be duplicates named with a _1 _2 etc on the end of the file names. each one is for a different version of windows - for win7 use the VISTA one
    
    
    For 32bit windows these to C:\windows\system32
    
    
    packet.dll
    
    
    pthreadvc.cll
    
    
    wpcap.dll
    
    
    For 64bit windows you will need to copy those files to C:\windows\syswow64
    as well as copying the 64bit versions of these:
    
    
    packet.dll
    
    
    wpcap.dll
    
    
    to the C:\windows\system32 directory
    
    
    then 1 more file - copy to c:\windows\system32\drivers
    
    
    npf.sys
    
    
    next use the SC command to create a service:
    sc create npf binPath= system32\drivers\npf.sys type= kernel start= auto error= normal tag= no DisplayName= "NetGroup Packet Filter Driver"
    then start the NPF service and winpcap is installed.
    To make sure you get the right DLL's you could instlal winpcap through the normal "click through" method - then search for those DLL's mentioned above and make sure you get the right copies.
    If that is confusing or u need more help let me know
    Alles anzeigen

    Quelle: http://briandesmond.com/blog/installing-winpcap-silently/

    Dateien

    winpcap.zip 200,95 kB – 382 Downloads
  • Win 8 dlls ins systemverzeichnis scheiben per script ? - nicht möglich!?

    • WhiteLion
    • 25. Februar 2013 um 14:05

    genau das hatte ich anfangs probiert. doch leider hatte das nie funktioniert .... ich teste es später nochmal aus, da ich eigentlich auch dagegen bin die win-verzeichnisse vollzumüllen. ich hatte keine richtige erklärung warum es nicht funktionierte, dachte mir, dass es evtl daran liegt, dass es treiber sind die dann an keinem anderen ort liegen dürfen... ob die erklärung stimmt, weiss ich nicht, aber die winpcap ´s sind ja tatsächlich treiber.

    EDIT: die nächste frage ist natürlich: warum funktioniert es trotz admin rechten nicht ins win 8 verzeichnis etwas zu kopieren ?

  • Win 8 dlls ins systemverzeichnis scheiben per script ? - nicht möglich!?

    • WhiteLion
    • 25. Februar 2013 um 12:52

    heyho trallato ;)
    in meinem script verwende ich die winpcap.dll ´s die im systemverzeichnis vom Windows liegen müssen damit sie funktionieren .... also (..windows/system oder ..windows/system32) ... leider klappt das Windows 8 nicht:

    [autoit]

    #RequireAdmin
    SetPrivilege("SeDebugPrivilege", 1) ;hilft auch nicht
    FileInstall("winpcap\wpcap.dll", @SystemDir & "\wpcap.dll")
    ...

    [/autoit]


    jemand eine idee wie ich das problem lösen kann ?

  • _Singleton funktioniert nicht

    • WhiteLion
    • 21. Februar 2013 um 15:44

    ich schände mal die leiche .... ich habe genau das selbe problem wie der threaderöffner.
    singleton rennt weder mit dem beispiel, noch mit dem was hier an lösungen gezeigt wurde.

  • mein Hex2Dec rechnet falsch :(

    • WhiteLion
    • 21. November 2012 um 15:05

    die aufgabe der funktion ist, dezimalzahlen in hexwerte zu wandeln.
    ich habe diese funktion benutzt (so weit ich mich erinnere) weil hex()/dec()
    bei großen dezimalzahlen versagten ... damit meine ich insbesondere 64 bit große
    integer werte.

    EDIT:

    oh sorry, ich habe die falsche funktion gepostet, hier die richtige:

    [autoit]

    Func Dec2Hex($iN)
    MsgBox(0, "dec2hex in:", $iN)
    Local $ihex = ""
    Do
    $ihex = Hex(Mod($iN, 16), 1) & $ihex
    $iN = Floor($iN / 16)
    ;ConsoleWrite($iN & " " & $ihex & @CRLF)
    Until $iN = 0
    Return $ihex
    MsgBox(0, "dec2hex out:", $ihex)
    EndFunc ;==>Dec2Hex

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

    edit2:

    um es nochmal klar zu stellen:
    die funktionen sollten in der lage sein dezimalzahlen in hex zu wandeln
    das ganze sollte unter 64bit auch funktionieren d.h. wenn ich also folgende dezimalzahl habe
    "8608480567731124087" sollte da als hex: "7777777777777777" rauskommen. (und umgekerht)
    da ich ausschließlich mit positiven zahlen rechne (ich mochte speicheradressen zusammenrechnen),
    sollten auch nur positive zahlen rauskommen, dh. unsigned int´s ....

  • mein Hex2Dec rechnet falsch :(

    • WhiteLion
    • 21. November 2012 um 13:55

    es rechnet falsch und ich weiss nicht warum :(
    entweder ist mir der fehler vorher nicht aufgefallen oder es liegt an 64 bit kompilierung oder dem update auf autoit 3.3.8.1
    ich gebe z.B. decimal ein: 30086629
    raus kommt 1CB15E0 ... was falsch ist! 1CB15E5 wäre richtig.

    [autoit]


    Func Hex2Dec($iN)
    MsgBox(0, "dec in:", $iN)
    Local $aN, $ihex = 0
    $aN = StringSplit(StringTrimLeft($iN, 2), "", 1)
    For $x = 1 To UBound($aN) - 1
    $ihex += Dec($aN[$x]) * (16 ^ (UBound($aN) - 1 - $x))
    Next
    MsgBox(0, "dec out:", $ihex)
    Return $ihex
    EndFunc ;==>Hex2Dec

    [/autoit]
  • hilfe bei der fehlersuche! programm beendet sich ohne fehlermeldung, log ist auf einmal weg.

    • WhiteLion
    • 9. November 2012 um 23:12

    es sind nicht nur einige PW hardcoded sondern zig selbstgeschriebende verschlüsselungen verteilt über ca. 16.000 zeilen code verteilt in ca. 75 includes. plus einige selbstgeschriebende c++ dll´s die icludiert werden .... ich habe eh wenig hoffnungen das sich da wirklich jemand einarbeiten möchte, selbst wenn ich das alles rauswerfe... dann läufts ja nicht mehr.... es kommuniziert ständig mit dem server. das wäre nen haufen arbeit der recht sinnlos ist und ich bin der meinung, dass es nicht viel nützt, außer das risiko das ich was übersehe erhöht und dann der server geDOSed wird. du kannste es gut finden oder nicht ... es gibt auch leute die möchten / können nicht jedes script veröffentlichen und brauchen trotzdem hilfe :)

  • hilfe bei der fehlersuche! programm beendet sich ohne fehlermeldung, log ist auf einmal weg.

    • WhiteLion
    • 9. November 2012 um 22:51

    in meinem script befinden sich viel informationen wie z.b. verschlüsselte serverkommunikation die ich nicht veröffentlichen möchte. weiterhin steht die überlegung an das ganze zu veröffentlichen, aber in welcher form ist noch unklar... ich weiss, es ist immer besser mit script, aber wenn man so lange an etwas arbeitet und noch das o.g. risiko hat dann möchte man es auch wohl überlegt machen, wenn man es veröffentlicht.

    ich lösche das debuglog genau an der stelle einmal (recht nahe beim programmstart):

    [autoit]


    if $debuglog = 1 Then
    $debuglogworks = FileWrite($ToolTitle&"debug.log","Timer1:"&$Timer1&@LF)
    if @error Then
    MsgBox(0, "Error:"&@error, "Couldn´t create debuglog!"&@CRLF&"Maybe you have no administrations rights given to this app.")
    Exit
    EndIf
    EndIf

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

    FileDelete(@ScriptDir & "\"&$ToolTitle&"debug.log")

    [/autoit]
  • hilfe bei der fehlersuche! programm beendet sich ohne fehlermeldung, log ist auf einmal weg.

    • WhiteLion
    • 9. November 2012 um 22:39
    Zitat von Christoph54

    So kurrios es auch klingt, mir ist das auch schon mal passiert! ^^
    Aber zum Glück hatte ich ja ein Backup von meinem durchaus wichtigen Scipt... not :whistling:

    hmmmm, ich glaube du hast mein anliegen nicht verstanden/gelesen. mein script nicht nicht weg, sondern nur das fehlerprotrokoll was es schreibt.

  • hilfe bei der fehlersuche! programm beendet sich ohne fehlermeldung, log ist auf einmal weg.

    • WhiteLion
    • 9. November 2012 um 22:20

    ... ich habe gut 3 monate an einem script / programm gearbeitet und stelle nun folgenden fehler fest:
    nach willkürlicher zeit (meistens so 2 tagen) beendet sich mein programm OHNE fehlermeldung.
    ich lasse zwar an allen möglichen stellen ein logfile schreiben, aber das ding ist rätselhafter weise dann auch verschwunden!? (ist mir völlig unbegreiflich)
    ich habe keine ahnung wie ich den fehler finden kann und bitte um hilfe.
    gibt es nicht ein errorlog (cerror oder so ähnlich) wo windows noch diverse fehlermeldungen speichert, dass ich dort nochmal schauen
    könnte ... oder fällt euch noch etwas ein!?

  • iMsgBox - Alpha

    • WhiteLion
    • 9. November 2012 um 21:09

    gibts auch ein beispielscript ? :D

    edit: hat sich erledigt ... :D

  • iUser - Wenn du den Benutzer kontrollieren willst

    • WhiteLion
    • 9. November 2012 um 21:05

    ich wette autobert war der jenige der mit "ja" gestimmt hat :D :D

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™