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. Mar Bobley

Beiträge von Mar Bobley

  • vbs to au3 oder js to au3 uebersetzer hier? (geht um dll einbinden und "abhoeren")

    • Mar Bobley
    • 17. September 2010 um 18:54

    YEAH!!!

    habs hinbekommen!

    fuer alle die auch x10 remote control geraete haben:

    1.) active home sdk installieren
    2.) ahscript.dll registrieren
    3.) hier ein beispielcode um events (in meinem fall tastendruck auf der fernbedienung)

    Spoiler anzeigen
    [autoit]

    HotKeySet("{F11}","_exit")

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

    $x10 = ObjCreate("X10.ActiveHome")
    If @error Then
    MsgBox(0,"",@error)
    EndIf

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

    $x10event = ObjEvent($x10,"_x10event")

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

    Func _x10event($parameter1,$parameter2,$parameter3,$parameter4,$parameter5,$parameter6,$parameter7)
    MsgBox(0,"",$parameter1 & @CRLF & $parameter2 & "@CLF" & $parameter3 & @CRLF & $parameter4 & @CRLF & $parameter5 & @CRLF & $parameter6 & @CRLF & $parameter7)
    EndFunc

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

    Func _exit()
    Exit
    EndFunc

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

    While 1
    Sleep(10)
    WEnd

    [/autoit]


    gruss, phil

  • vbs to au3 oder js to au3 uebersetzer hier? (geht um dll einbinden und "abhoeren")

    • Mar Bobley
    • 16. September 2010 um 04:46

    erstmal mein nicht funktionierender code:

    Spoiler anzeigen
    [autoit]

    Dim $temp = ""

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

    HotKeySet("{F11}","_exit")

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

    $rcdll = DllOpen("ahscript.dll")
    If @error Then
    MsgBox(0,"error open dll",@error)
    EndIf

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

    Func _exit()
    Exit
    EndFunc

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

    While 1
    $temp = DllCall($rcdll,"str","RecvAction")
    If @error Then
    MsgBox(0,"error call recvaction",@error)
    EndIf
    If $temp = "" Then
    Else
    MsgBox(0,"",$temp)
    EndIf
    WEnd

    [/autoit]

    bei dem dllcall kriege ich fehler 3
    was mache ich falsch?

    hier in js:

    Spoiler anzeigen
    PHP
    This is where I load the ActiveX Componet For ActiveHome Pro
    //-->
    <OBJECT   ID="ActiveHomeObj" width=0 height=0   classid="CLSID:001000AF-2DEF-0208-10B6-DC5BA692C858"   codebase="ahscript.dll" standby="Loading X10 net components..."   type="application/x-oleobject"></OBJECT>
    <!--//
    This is where we receive data from the CM15A and display it in the textarea
    //-->
    <SCRIPT   FOR="ActiveHomeObj" EVENT="RecvAction( commandString, param1, param2,   param3, param4, param5, param6)" LANGUAGE="Jscript">
    /*
     * param2 is the button description
     * param3 0 = button down, -1 = button up
     */
    if(param2 == "Left" && param3 != -1 ) {
    
    
    nextPhoto(-1);
    
    
    } else if(param2 == "Right" && param3 != -1) {
    
    
    nextPhoto(1);
    
    
    }
    
    
    </SCRIPT>
    Alles anzeigen


    wie der coder schon schreibt ist es wohl ein activex "ding" hab dann ein wenig gegoogled und die
    au3chm durchforstet und rumprobiert aber da ich keine ahnung von dlls habe (au3 schon ein wenig)
    ist dabei nix rumgekommen.

    ist es richtig mit dllcall und objevent?


    diese ahscript.dll habe ich aus dem sdk fuer meine usb-funk-fernbedinung das leider wenig hilft (bis auf son paar sample codes in sprachen != au3)


    vielen dank fuer eure hilfe! gruss, phil


    //edit: hier nochma fast das gleiche in //edit: vbscript gefunden:

    Spoiler anzeigen
    PHP
    <HTML>
    <HEAD>
    <TITLE>ActiveHome VB Scripting</TITLE>
    </HEAD>
    
    
    <BODY BGCOLOR="#ffffff" >
    <!--TOOLBAR_START-->
    <!--TOOLBAR_EXEMPT-->
    <!--TOOLBAR_END-->
    
    
    <CENTER><H2>ActiveHome VB Scripting</H2></CENTER>
    
    
    <FONT FACE="verdana,arial,helvetica" SIZE=1>
    	<A href="#" onclick=self.close() CLASS="clsDemo">Close This Test</A>
    </FONT><HR>
    
    
    
    
    <OBJECT ID="ActiveHome1" width=0 height=0
    	classid="CLSID:001000AF-2DEF-0208-10B6-DC5BA692C858"
    	codebase="ahscript.dll"
        	standby="Loading X10 net components..."
        	type="application/x-oleobject">
    </OBJECT>
    
    
    <FORM NAME="myForm">
    	Send Status
    	<BR>
    	<INPUT TYPE="text" NAME="sendstatus" size="50">
    	<BR>
    	Receive Status
    	<BR>
    	<INPUT TYPE="text" NAME="recv1">
    	<INPUT TYPE="text" NAME="recv2">
    	<INPUT TYPE="text" NAME="recv3">
    	<INPUT TYPE="text" NAME="recv4">
    	<INPUT TYPE="text" NAME="recv5">
    	<INPUT TYPE="text" NAME="recv6">
    	<BR>
    </FORM>
    
    
    
    
    <SCRIPT LANGUAGE="vbscript">
    Function doCommand( Command )
    
    
    	if Command = 1 then
        	myForm.sendstatus.value = "e8 On sent"
        	ActiveHome1.SendAction "sendplc", "e8 on"
    	elseif Command = 2 then
        	myForm.sendstatus.value = "e8 Off sent"
        	ActiveHome1.SendAction "sendplc", "e8 off"
    	end if
    End Function
    
    
    
    
    Function ActiveHome1_RecvAction( bszRecv, vParm1, vParm2, vParm3, vParm4, vParm5, vReserved )
    
    
    	myForm.recv1.value = bszRecv
    	myForm.recv2.value = vParm1
    	myForm.recv3.value = vParm2
    	myForm.recv4.value = vParm3
    	myForm.recv5.value = vParm4
    	myForm.recv6.value = vParm5
    End function
    
    
    </SCRIPT>
    
    
    <FORM NAME="myButtons">
      <BR>
      <CENTER>
       <INPUT NAME="btnSendOn" TYPE="Button" VALUE="Send e8 on" onclick="doCommand( 1 );">
       <INPUT NAME="btnSendOff" TYPE="Button" VALUE="Send e8 off" onclick="doCommand( 2 );">
       </CENTER>
      <BR>
    </FORM>
    
    
    <P>
    <HR>
    <FONT FACE="Arial" SIZE="1" COLOR="BLACK">
    © 2004 <A TARGET="_blank" HREF="http://www.x10.com">X10</A>. All rights reserved.
    </FONT>
    
    
    </BODY>
    </HTML>
    Alles anzeigen
  • dynamische menschlich aussehende mausbewegungen?

    • Mar Bobley
    • 17. August 2009 um 23:52

    hi
    ich moechte eine dynamische mausbewegung von punkt zu punkt machen die menschlich aussieht.
    ich denke gut eignen dafuer wird sich eine mathematische loesung mit kreisen oder besser ovalen die sehr gross sind (5x bildschirm oder so) und daraus einen teil als kurve fuer die maus zu verwenden(vielleicht auch nur einen teil der strecke um es noch "menschlicher" zu machen)
    nur leider finde ich die funktionen dafuer nicht unter maths functions in der autoit help datei.
    bin mir fast sicher dass autoit so etwas kann nur finde ich es nicht.
    vielen dank fuer eure hilfe, mar bobley
    //edit: hab die loesung doch noch hier im forum gefunden: [ gelöst ] Dynamischen Kreis zeichnen bzw mit MouseMove abfahren?
    verstehs zwar noch nicht aber wird schon noch und den rest krieg ich dann auch zusammengebastelt

  • warum wurde colormode(option) entfernt? jetzt rennt ein programm nicht mehr :-(

    • Mar Bobley
    • 22. Juni 2008 um 14:34

    hallo

    wie kann ich colormode ersetzen?

    hier das script:

    Spoiler anzeigen
    [autoit][/autoit] [autoit][/autoit] [autoit]

    If @ScriptName <> 'mm.ItemReader.exe' Then
    MsgBox (0, "Incorrect script name", "mm.ItemReader is the real name of this script.")
    Exit
    EndIf

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

    ; Not compatible with Old OS.
    ; ===========================
    If @OSTYPE == 'WIN32_WINDOWS' Then
    MsgBox (0, "Incorrect operating system", "mm.BOT is not compatible with windows 95/98/Me. Sorry.")
    Exit
    EndIf

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

    $BotProcessPriority = IniRead (@SCRIPTDIR & "\mm.ItemReader.ini", "mm.ItemReader", "BotProcessPriority", "High")
    Select
    Case StringInStr ($BotProcessPriority, "ormal")
    $BotProcessPriority = "Normal speed"
    ProcessSetPriority (@ScriptName, 2)
    Case StringInStr ($BotProcessPriority, "edium")
    $BotProcessPriority = "Medium speed"
    ProcessSetPriority (@ScriptName, 3)
    Case StringInStr ($BotProcessPriority, "igh")
    $BotProcessPriority = "High speed"
    ProcessSetPriority (@ScriptName, 4)
    EndSelect

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

    $ACT = IniRead (@SCRIPTDIR & "\mm.ItemReader.ini", "mm.ItemReader", "ACT", 1)
    $WName = IniRead (@SCRIPTDIR & "\mm.ItemReader.ini", "mm.ItemReader", "WName", 'Diablo II')
    $ItemFocusDelay = IniRead (@SCRIPTDIR & "\mm.ItemReader.ini", "mm.ItemReader", "ItemFocusDelay", 150)
    $IdingMouseSpeed = IniRead (@SCRIPTDIR & "\mm.ItemReader.ini", "mm.ItemReader", "IdingMouseSpeed", 2)
    $HotKey = IniRead (@SCRIPTDIR & "\mm.ItemReader.ini", "mm.ItemReader", "HotKey", 'SPACE')
    $ClipPush = IniRead (@SCRIPTDIR & "\mm.ItemReader.ini", "mm.ItemReader", "ClipPush", 0)

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

    ; Set up HotKeys to pause or stop the bot.
    ; ========================================
    HotKeySet("{end}", "ExitIW")
    Func ExitIW()
    WinActivate($WName,"")
    Exit
    EndFunc

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

    HotKeySet("{" & $HotKey & "}", "ItemWriter")
    Func ItemWriter()
    ToolTip('==> ...DONT MOVE MOUSE: READING STATS... <==',0,0)
    $Name = ItemDescBox(1)
    LogItem ($Name)
    $Stats = ItemDescBox(2)
    If StringLen($Stats) > 7 Then
    LogItem ($Stats)
    EndIf
    If $ClipPush == 1 Then
    ClipPut ( $Name & @CRLF & $Stats)
    EndIf
    LogItem ("=====================================")
    ToolTip("")
    EndFunc

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

    ; Colors definition
    ; =================
    ;Act1
    $XUNIQUES_Color = 6521492
    $SETS_Color = 65304
    $XRARES_Color = 6535902
    $MAGICS_Color = 11358546
    $GRAYS_Color = 5394770
    $WHITES_Color = 13027270
    $UNID_RED_Color = 3229109
    $XUNIQUES_Color_A2 = 5933724
    $SETS_Color_A5 = 1623816

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

    ; Options
    ;======================================
    AutoItSetOption ( "ColorMode", 1 )
    AutoItSetOption("WinTitleMatchMode", 3)
    AutoItSetOption("WinWaitDelay", 250)
    AutoItSetOption ("PixelCoordMode", 0)
    AutoItSetOption ("MouseCoordMode", 0)
    ;======================================

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

    $XDiff = 0
    $YDiff = 0

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

    ; ************************* M A I N *********************************

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

    WinActivate($WName)
    Winmove($WName,'',0,0)
    WinWaitActive($WName)
    Sleep (500)
    GetCalibrate()
    While 1
    sleep (200)
    Wend
    ; ************************* M A I N *********************************

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

    Func GetCalibrate()
    $CPoint = PixelSearch ( 15, 565, 35, 585, 9750503 )
    If @error == 1 Then
    MsgBox (0,"error","error")
    Exit
    EndIf
    $Xbase = 23
    $Ybase = 574
    $XDiff = $CPoint[0] - $Xbase
    $YDiff = $CPoint[1] - $Ybase
    EndFunc

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

    ;===========================================================================
    ; Scan the whole screen and read item description with mode option:
    ; $Mode = 1 : return itemQual, name, identified or not (fast), and Ethereal status
    ; $Mode = 2 : return all text for string validation purpose (slow)
    ; requirement: cursor must be on the item to show item description box.
    ; requirement: Y box of the item ([6] item Y top pos in inv (item token...)
    ; $ITIndex = index of current working on item. (item token)
    ;===========================================================================
    Func ItemDescBox($Mode)
    $X_Start = 3 + $XDiff ; Left side of searching area
    $X_Stop = 795 + $XDiff ; Right side of searching area
    $Y_Start = 25 + $YDiff ; Up side of searching area
    $Y_Stop = 615 + $YDiff ; Bottom side of searching area
    $X = 0 ; Base X while searching
    $Y = 0 ; Base Y while searching
    $Xleft = 0 ; Left X side of an item box
    $Xright = 0 ; Right X side of an item box
    $Ytop = 0 ; Top Y side of an item box
    $Apix = 0 ; Elementary pixel color value
    For $Y = $Y_Start to $Y_Stop Step 12
    For $X = $X_Start to $X_Stop Step 49
    $Apix = PixelGetColor($X, $Y)
    If (($Apix == $XUNIQUES_Color) OR ($Apix == $XRARES_Color)OR ($Apix == $MAGICS_Color) OR ($Apix == $SETS_Color) OR ($Apix == $GRAYS_Color) OR ($Apix == $WHITES_Color) OR ($Apix == $SETS_Color_A5) OR ($Apix == $XUNIQUES_Color_A2)) Then
    $Xleft = $X
    Do
    $Xleft = $Xleft - 1
    $BlockTest = PixelGetColor($Xleft, $Y)
    Until ($BlockTest <> $Apix)
    $Xright = $X
    Do
    $Xright = $Xright + 1
    $BlockTest = PixelGetColor($Xright, $Y)
    Until ($BlockTest <> $Apix)
    If $Xright - $Xleft > 45 Then
    $Ytop = $Y
    Do
    $Ytop = $Ytop - 1
    $BlockTest = PixelGetColor($X, $Ytop)
    Until ($BlockTest <> $Apix)
    $XSStart = $Xleft - 250
    If $XSStart < 0 Then
    $XSStart = 0
    EndIf
    $XSStop = $Xleft + 350
    If $XSStop > 800 Then
    $XSStop = 800
    EndIf
    Dim $Ys_DB[700]
    For $YSearch = ($Ytop + 30) To (625 + $YDiff) Step 2
    $Apix1 = PixelGetColor ($Xright - 52, $YSearch)
    $Apix2 = PixelGetColor ($Xright + 2, $YSearch)
    $Apix3 = PixelGetColor ($Xright + 20, $YSearch)
    $Ys_DB[$YSearch] = ($Apix1 & $Apix2 & $Apix3)
    Next
    ; Shot the screen with the box description
    ; X axe shot
    Dim $Xs_DB[805]
    For $XSearch = $XSStart To $XSStop Step 2
    $Apix1 = PixelGetColor ($XSearch, $Ytop - 15)
    $Apix2 = PixelGetColor ($XSearch, $Ytop + 8)
    $Apix3 = PixelGetColor ($XSearch, $Ytop + 30)
    $Xs_DB[$XSearch] = ($Apix1 & $Apix2 & $Apix3)
    Next
    ; Analyse the scren without the item box description
    $OldMousePos = MouseGetPos()
    HideMouse()
    Sleep ($ItemFocusDelay)
    ; found left box side
    For $XSearch = $XSStart To $XSStop Step 2
    $Apix1 = PixelGetColor ($XSearch, $Ytop - 15)
    $Apix2 = PixelGetColor ($XSearch, $Ytop + 8)
    $Apix3 = PixelGetColor ($XSearch, $Ytop + 30)
    If $Xs_DB[$XSearch] <> ($Apix1 & $Apix2 & $Apix3) Then
    ExitLoop
    EndIf
    Next
    $LeftBox = $XSearch + 1
    ; found right box side
    For $XSearch = ($Xleft + 80 ) To $XSStop Step 2
    $Apix1 = PixelGetColor ($XSearch, $Ytop - 15)
    $Apix2 = PixelGetColor ($XSearch, $Ytop + 8)
    $Apix3 = PixelGetColor ($XSearch, $Ytop + 30)
    If $Xs_DB[$XSearch] == ($Apix1 & $Apix2 & $Apix3) Then
    ExitLoop
    EndIf
    Next
    $RightBox = $XSearch - 2
    ; found bottom side
    For $YSearch = ($Ytop + 30) To (625 + $YDiff) Step 2
    $Apix1 = PixelGetColor ($Xright - 52, $YSearch)
    $Apix2 = PixelGetColor ($Xright + 2, $YSearch)
    $Apix3 = PixelGetColor ($Xright + 20, $YSearch)
    If $Ys_DB[$YSearch] == ($Apix1 & $Apix2 & $Apix3) Then
    ExitLoop
    EndIf
    Next
    $BottomBox = $YSearch - 2

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

    MouseMove ($OldMousePos[0] + Random(-1,1),$OldMousePos[1] + Random(-1,1) , $IdingMouseSpeed)
    Sleep ($ItemFocusDelay)
    $DownLines = Int(($BottomBox - ($Ytop + 12)) / 16) ; number of text lines under item NAME
    $Ytop = $Ytop + 1

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

    If ($Mode == 1) Then
    Select
    Case $Apix == $XUNIQUES_Color OR $Apix == $XUNIQUES_Color_A2
    $Qualname = "Unique "
    Case $Apix == $SETS_Color OR $Apix == $SETS_Color_A5
    $Qualname = "Set "
    Case $Apix == $XRARES_Color
    $Qualname = "Rare "
    Case $Apix == $MAGICS_Color
    $Qualname = "Magic "
    Case $Apix == $GRAYS_Color
    $Qualname = "Gray "
    Case $Apix == $WHITES_Color
    $Qualname = "White "
    Case Else
    $Qualname = "Unknow quality "
    EndSelect
    $ItemName = ReadLine(1, $Apix, $Ytop, $Xright, $RightBox)
    If StringInStr ($ItemName, " Rune", 1) Then
    $Qualname = ""
    EndIf
    Return $Qualname & $ItemName
    EndIf
    If ($Mode == 2) Then
    $LineInc = 1
    $Stats = ""
    Do
    $LineText = ReadLine(2, $MAGICS_Color, $Ytop + (16 * ($LineInc)), $LeftBox, $RightBox)
    If $LineText <> "" AND StringLen($LineText) > 7 Then
    $Stats = $Stats & $LineText & @CRLF
    EndIf
    $LineInc = $LineInc + 1
    Until ($LineInc > $DownLines)
    Return $Stats
    EndIf
    EndIf
    EndIf
    Next
    $X = $X_Start
    Next
    Return "Unidentifiable"
    EndFunc

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

    Func HideMouse()
    MouseMove (790,610,$IdingMouseSpeed)
    Sleep ($ItemFocusDelay)
    MouseMove (790,610,$IdingMouseSpeed)
    Sleep ($ItemFocusDelay)
    EndFunc

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

    ;**********************************************************************************************
    ; Using the modified fonts will transmute codes into characters and characters into strings.
    ; Mode 1 is dedicated for Item name reading (remove some "?" and " " in string) and avoid
    ; the white line Check throught a pixel search. $MAGICS_Color is the Blue Color Code (var passed)
    ;**********************************************************************************************
    Func Readline($mode, $ColorFont, $YTOP_STR, $Xleft, $Xright)
    ; Avoid White lines
    If $mode > 1 Then
    $Apix = PixelSearch($Xleft + 20, $YTOP_STR + 11, $Xright - 20, $YTOP_STR + 11, $WHITES_Color)
    If NOT @error Then
    Return ""
    EndIf
    EndIf

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

    ; Avoid loosed space front of strings in item description box
    $Apix = PixelSearch($Xleft, $YTOP_STR + 11, $Xleft + 280, $YTOP_STR + 11, $ColorFont)
    If NOT @error Then
    $Xleft = $Apix[0]
    Else
    Return ""
    EndIF

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

    Dim $Char[200]
    $Yread = $YTOP_STR + 11
    $Yreadsub = $YTOP_STR + 12
    $Xread = $Xleft
    $CharIndex = 1
    While 1
    $Space = 0
    $CodeA = ""
    $CodeB = ""
    $Xreadstart = $Xread
    While 1
    $Apix = PixelGetColor($Xread, $Yread)
    $Xread = $Xread + 1
    If $Apix <> $ColorFont Then
    $CodeA = $CodeA & "0"
    $Space = $Space + 1
    If $Space > 1 Then
    While StringRight($CodeA,1) == "0"
    $CodeA = StringTrimRight($CodeA,1)
    Wend
    If StringLen($CodeA) < 5 Then
    $Space = 0
    While 1
    $Apix = PixelGetColor($Xreadstart, $Yreadsub)
    $Xreadstart = $Xreadstart + 1
    If $Apix <> $ColorFont Then
    $CodeB = $CodeB & "0"
    $Space = $Space + 1
    If $Space > 1 Then
    While StringRight($CodeB,1) == "0"
    $CodeB = StringTrimRight($CodeB,1)
    Wend
    If $CodeB == "" Then
    $CodeB = "0"
    EndIf
    ExitLoop 2
    EndIf
    Else
    $CodeB = $CodeB & "1"
    $Space = 0
    EndIf
    Wend
    EndIf
    ExitLoop
    EndIf
    Else
    $CodeA = $CodeA & "1"
    $Space = 0
    EndIf
    Wend
    $Char[$CharIndex] = CodeToChar($CodeA, $CodeB)
    $CharIndex = $CharIndex + 1

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

    While 1
    $Apix = PixelGetColor($Xread, $Yread)
    If $Apix <> $ColorFont Then ;AND $Apix <> $WHITES_Color Then
    $Xread = $Xread + 1
    $Space = $Space + 1
    If $Xread >= $Xright Then
    ExitLoop 2
    EndIf
    If $Space > 4 Then
    $Char[$CharIndex] = " "
    $CharIndex = $CharIndex + 1
    $Apix = PixelSearch($Xread, $Yread, $Xread + 20, $Yread, $ColorFont)
    If NOT @error Then
    If $Apix[0] >= $Xright Then
    ExitLoop 2
    Else
    $Xread = $Apix[0]
    ExitLoop
    EndIf
    Else
    ExitLoop 2
    EndIf
    EndIf
    Else
    ExitLoop
    EndIf
    Wend
    Wend

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

    $TheString = ""
    For $i = 1 To $CharIndex - 1
    $TheString = $TheString & $Char[$i]
    Next
    If $mode > 1 Then
    While (StringRight($TheString ,1) == " ")
    $TheString = StringTrimRight($TheString ,1)
    Wend
    Else
    While (StringRight($TheString ,1) == " " OR StringRight($TheString ,1) == "?")
    $TheString = StringTrimRight($TheString ,1)
    Wend
    While (StringLeft($TheString ,1) == " " OR StringLeft($TheString ,1) == "?")
    $TheString = StringTrimLeft($TheString ,1)
    Wend
    EndIf
    Return $TheString
    EndFunc

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

    ;************************************************************
    ; Using the modified fonts will transmute code into character
    ;************************************************************
    Func CodeToChar($CodeA, $CodeB)
    If $CodeB <> "" Then
    If $CodeA == "11" Then
    Select
    Case $CodeB == "0"
    Return "i"
    Case $CodeB == "1"
    Return "'"
    Case $CodeB == "11"
    Return "j"
    Case $CodeB == "111"
    Return ":"
    EndSelect
    EndIf

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

    If $CodeA == "1011" Then
    Select
    Case $CodeB == "0"
    Return "s"
    Case $CodeB == "1"
    Return "h"
    Case $CodeB == "1101"
    Return "3"
    Case $CodeB == "111"
    Return "6"
    Case $CodeB == "11"
    Return "7"
    Case $CodeB == "101"
    Return "8"
    Case $CodeB == "1111"
    Return "9"
    Case $CodeB == "11"
    Return "7"
    Case $CodeB == "1011"
    Return "z"
    EndSelect
    EndIf

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

    If $CodeA == "111" Then
    Select
    Case $CodeB == "1"
    Return "1"
    Case $CodeB == "111"
    Return "("
    Case $CodeB == "11"
    Return "J"
    EndSelect
    EndIf
    If $CodeA == "101" Then
    Select
    Case $CodeB == "101"
    Return "-"
    Case $CodeB == "1"
    Return ")"
    Case $CodeB == "11"
    Return "I"
    EndSelect
    EndIf
    If $CodeA == "1111" Then
    Return "S"
    EndIf
    If $CodeA == "1101" Then
    Select
    Case $CodeB == "0"
    Return "B"
    Case $CodeB == "1"
    Return "F"
    EndSelect
    EndIf
    Return "?"
    EndIf

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

    Select
    Case $CodeA == "11101"
    Return "e"
    Case $CodeA == "10101011"
    Return "a"
    Case $CodeA == "1101101"
    Return "t"
    Case $CodeA == "1010111"
    Return "n"
    Case $CodeA == "10101111"
    Return "o"
    Case $CodeA == "111101"
    Return "d"
    Case $CodeA == "101101"
    Return "+"
    Case $CodeA == "1011111"
    Return "g"
    Case $CodeA == "111011"
    Return "c"
    Case $CodeA == "10110101"
    Return "m"
    Case $CodeA == "1010101"
    Return "r"
    Case $CodeA == "10101"
    Return "l"
    Case $CodeA == "11101011"
    Return "%"
    Case $CodeA == "11010111"
    Return "R"
    Case $CodeA == "10110111"
    Return "D"
    Case $CodeA == "1011011"
    Return "2"
    Case $CodeA == "101010101"
    Return "A"
    Case $CodeA == "101011"
    Return "k"
    Case $CodeA == "10111101"
    Return "u"
    Case $CodeA == "110111"
    Return "5"
    Case $CodeA == "101011011"
    Return "0"
    Case $CodeA == "1101111"
    Return "4"
    Case $CodeA == "11011"
    Return "f"
    Case $CodeA == "101011101"
    Return "M"
    Case $CodeA == "110101"
    Return "L"
    Case $CodeA == "11111"
    Return "p"
    Case $CodeA == "101111"
    Return "E"
    Case $CodeA == "11011011"
    Return "v"
    Case $CodeA == "1110101"
    Return "C"
    Case $CodeA == "11011101"
    Return "y"
    Case $CodeA == "10111111"
    Return "x"
    Case $CodeA == "10111"
    Return "b"
    Case $CodeA == "1011101"
    Return "P"
    Case $CodeA == "101011111"
    Return "O"
    Case $CodeA == "101111011"
    Return "U"
    Case $CodeA == "1110111"
    Return "H"
    Case $CodeA == "101110111"
    Return "w"
    Case $CodeA == "1101011"
    Return "/"
    Case $CodeA == "11011111"
    Return "N"
    Case $CodeA == "101101101"
    Return "T"
    Case $CodeA == "1111011"
    Return "K"
    Case $CodeA == "10111011"
    Return "q"
    Case $CodeA == "11010101"
    Return "G"
    Case $CodeA == "101111101011"
    Return "W"
    Case $CodeA == "101101111"
    Return "V"
    Case $CodeA == "10101101"
    Return "Z"
    Case $CodeA == "101101011"
    Return "Q"
    Case $CodeA == "101010111"
    Return "X"
    Case $CodeA == "11010111"
    Return "R"
    Case $CodeA == "101110101"
    Return "Y"
    EndSelect
    Return "?"
    EndFunc

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

    ;=================================
    ; Provide the bot events log
    ;=================================
    Func LogItem($String)
    $LogFile = FileOpen (@SCRIPTDIR & "\mm.ItemReader.txt", 1)
    If $LogFile = -1 Then
    Return
    EndIf
    FileWriteLine ($LogFile, $String)
    FileClose ($LogFile)
    EndFunc

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

    Edit Mega: Spoiler!


    //edit... colormode wird in zeile 76 verwendet.

  • error in line -1?

    • Mar Bobley
    • 12. Januar 2008 um 15:23

    ich dachte jetzt wird die ganze zeit die zeilennummer unten angezeigt :D

    wird aber wie ich jetzt getestet habe wohl nur nach einem fehler.

    vielen dank das hilft mir schon mal weiter denk ich.
    oder kann es sein dass dort auch wieder line -1 auftaucht?

  • error in line -1?

    • Mar Bobley
    • 12. Januar 2008 um 15:07

    ich finde keine option names debug... in der hilfe kommt nach ColorMode ExpandEnvStrings.

    in der compiler gui habe ich auch nichts gefunden.

    und wenn ich eine version mit log baue muss ich dann hinter jede moegliche fehlerquelle eine if @error msgbox "fehler in zeile xxx" einbauen?

  • error in line -1?

    • Mar Bobley
    • 12. Januar 2008 um 05:26

    hallo

    ich habe ein programm dessen quelltext ich nicht weitergeben moechte und das andere leute mit mir testen.

    diese haben jetzt schon oefters den fehler "error in line -1" erhalten. damit kann ich als "bugfixmuessender" leider nicht viel anfangen.

    liegt das daran dass das prog mit upx gepackt ist? gibt es compile optionen die den quelltext in der binary beinhalten?

    oder habt ihr sonst irgendwelche vorschlaege?

    freue mich auf antworten, mar bobley

  • Ini-Eintrag

    • Mar Bobley
    • 12. Januar 2008 um 05:16

    wenn es kein java spiel ist dann nimm einfach die gute alte ie.au3

    es gibt eine funktion die heisst _ieloadwait($oIE) die sollte dir weiterhelfen.

  • Browsergame

    • Mar Bobley
    • 12. Januar 2008 um 05:12

    ich wuerde den bot mit der IE.au3 realisieren.

    der vorteil ist dass der bot dann im hintergrund laufen kann und du kannst die formulare oder images ausfuellen/anklicken ohne dass der layer(so nennt man dein "popup") da stoert.

  • "Use GUICtrlDelete to delete item" Fehlermeldung

    • Mar Bobley
    • 8. Januar 2008 um 09:23

    hey danke!

    diese loesung gefaellt mir noch viel besser...

    mit item und subitem wird das adden von grossen datensaetzen zur qual :(

  • "Use GUICtrlDelete to delete item" Fehlermeldung

    • Mar Bobley
    • 6. Januar 2008 um 22:24

    sehr schoen danke!


    wenn mans mit befehlen aus der udf hinzufuegt kann mans auch damit entfernen?!?!?

    naja hauptsache es funktioniert... man muss ja nicht immer wissen warum ^^

  • "Use GUICtrlDelete to delete item" Fehlermeldung

    • Mar Bobley
    • 6. Januar 2008 um 21:53
    [autoit]

    #include <GUIConstants.au3>

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

    #include <GUIListView.au3>

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

    $blubb = GUICreate("blubb",300,300)

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

    $button = GUICtrlCreateButton("TEXT",5,5,290,25)

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

    $listview = GUICtrlCreateListView("1|2|3",5,35,290,265)

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

    GUISetState(@SW_SHOW)

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

    GUICtrlCreateListViewItem("1|2|3",$listview)

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

    GUICtrlCreateListViewItem("1|2|3",$listview)

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

    GUICtrlCreateListViewItem("1|2|3",$listview)

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

    While 1

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

    Switch GUIGetMsg()

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

    Case $GUI_EVENT_CLOSE

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

    ExitLoop

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

    Case $button

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

    _GUICtrlListView_DeleteAllItems($listview)

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

    EndSwitch

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

    Wend

    [/autoit][autoit][/autoit][autoit][/autoit][autoit][/autoit][autoit][/autoit]
  • "Use GUICtrlDelete to delete item" Fehlermeldung

    • Mar Bobley
    • 6. Januar 2008 um 21:38

    ich bekomme eine fehlermeldung wenn ich mit _GUICtrlListView_DeleteAllItems mein listview control loeschen will.

    die fehlermeldung ist:

    Error
    Use GUICtrlDelete to delete item
    Or if item was created with UDF functions MAKE sure to pass in handle to control NOT the controlid

    werd daraus leider nicht schlau und auch google hatte nur 2 threads die mir leider auch nicht weiterhalfen.


    hat irgendjemand damit erfahrung?

    mfg mar bobley

    //edit:

    guictrldelete kann ich nicht benutzen da ich die listview items nicht in variablen hab

  • in einer list automatisch nach unten scrollen

    • Mar Bobley
    • 6. Januar 2008 um 15:35

    vielen dank

    hab heute zum ersten mal realisiert dass man udfs auch mal aufmachen kann ;P

    sehr schoen kommentiert die dinger!

    [autoit]

    Func _addtoconsole($consoletext)

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

    GUICtrlSetData($console,"<"&@HOUR&":"&@MIN&":"&@SEC&"> "&$consoletext&"|")

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

    $listcount = _GUICtrlListBox_GetCount($console)

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

    _GUICtrlListBox_SetCaretIndex($console,$listcount)

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

    EndFunc

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

    so funktionierts sehr gut...

    mfg mar bobley

  • in einer list automatisch nach unten scrollen

    • Mar Bobley
    • 6. Januar 2008 um 14:41

    tjo.. erstes problem geloest schon folgt das naechste:

    frueher ging es noch mit den list udfs aber mit der neuen version wurde viel geaendert finde ich.

    wie kann ich in einer list den zuletzt eingefuegten text sichtbar machen?

    wenn die list "voll" ist werden die neuen eintraege natuerlich weiterhin unten angefuegt aber der scrollbalken bleibt leider oben :(

  • list als ausgabeconsole verwenden (wie fuege ich text hinzu?)

    • Mar Bobley
    • 6. Januar 2008 um 14:27

    vielen dank fuer die schnelle hilfe.

    es geht wirklich wunderbar mit guictrlsetdata.

    mein fehler war es den list eintrag zu machen bevor die gui geladen war :-/

    mfg mar bobley

  • list als ausgabeconsole verwenden (wie fuege ich text hinzu?)

    • Mar Bobley
    • 6. Januar 2008 um 14:14

    so ist jetzt kein spoiler mehr...

    mit guictrlsetdata hab ich es versucht aber es passiert rein garnichts dann.

  • list als ausgabeconsole verwenden (wie fuege ich text hinzu?)

    • Mar Bobley
    • 6. Januar 2008 um 13:52

    hi leute


    ich kriege es einfach nicht hin meiner list text hinzuzufuegen.

    vll kann mir ja jemand helfen.
    <GUIConstants .au3="">

    [autoit]


    #include <GUIConstants .au3="">
    <GUIConstants .au3="">$blubb = GUICreate("blubb",300,300)
    $addtext = GUICtrlCreateButton("TEXT",5,5,290,25)
    $console = GUICtrlCreateList("",5,35,290,265,$WS_VSCROLL)
    GUISetState(@SW_SHOW)

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

    While 1
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE
    ExitLoop
    Case $addtext
    ;~ hier ist das problem ;P
    EndSwitch
    Wend

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


    hmmm mit dem include kommt er irgendwie nicht klar... aber ihr wisst ja wie es sein sollte

  • problem mit undeclared variable

    • Mar Bobley
    • 21. Januar 2007 um 13:42

    ok vielen dank!

    mein fehler war dass ich die deklararation zu weit unten hatte.


    jetzt funktionierts aber.

    mfg mar bobley

  • problem mit undeclared variable

    • Mar Bobley
    • 21. Januar 2007 um 13:00

    sry fehlalarm... bitte loeschen

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™