hm hab ich irgendwo schonmal gsehen...
woher hast des?
hm hab ich irgendwo schonmal gsehen...
woher hast des?
hey
also ich habe eben mal die autoitX3.dll eingebunden in mein Vc++ projekt da ein paar funktionen ja ziemlich bequem sind
allerdings frag ich mich welche funcs man so benutzen kann o0 und hab bisher keine documentation dazu gefunden
gibt es evtl ne art "hilfe datei" so wie für normale au3 syntax in scite ? nur hier eben für die autoitX dll ?
mfg azu
hey,
ich habe nen chat gebastelt, der auch stabil und einwandfrei funzt
allerdings gibt mir die SocketToIP function immer 0 zurück o0
win xp sp 3
weiß jemand warum ?
Func SocketToIP($SHOCKET)
Local $sockaddr, $aRet
$sockaddr = DllStructCreate("short;ushort;uint;char[8]")
$aRet = DllCall("Ws2_32.dll", "int", "getpeername", "int", $SHOCKET, _
"ptr", DllStructGetPtr($sockaddr), "ptr", DllStructGetSize($sockaddr))
If Not @error And $aRet[0] = 0 Then
$aRet = DllCall("Ws2_32.dll", "str", "inet_ntoa", "int", DllStructGetData($sockaddr, 3))
If Not @error Then $aRet = $aRet[0]
Else
$aRet = 0
EndIf
$sockaddr = 0
[/autoit] [autoit][/autoit] [autoit]Return $aRet
EndFunc ;==>SocketToIP
kommt bestimmt noch mehr an fragen
das ja dein handle für das main object
wenn dann müsstest du $b nehmen was du ja glaub ich für die balken hattest
edit: xd hab ne crazy idee
mach tooltips als balken xDDD
die kannste mit minmove verschieben *gg*
edit2: der ball -.-
[autoit]func _drawball()
_GDIPlus_GraphicsDrawArc($hGraphic,@DesktopWidth/2,@DesktopHeight/2,10,10,0,360,$hpen)
EndFunc
und ich rechne erst jedes pixel mit pi aus xD
hats auch, aber bei dem spiel macht das nicht wirklich was xD
dafür brauchen wir auch die start func zb , warum hast die rausgelöscht?
mal meins gestartet ? was steht in der msgbox
#Include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>
HotKeySet ( "{ESC}", "_ende" )
Global $Strichpos1=@DesktopHeight/2-70
Global $Strichpos2=@DesktopHeight/2+70
Global $Titel="Pong"
Global $Rahmenbreite = 10
Global $dll = DllOpen("user32.dll")
_GDIPlus_Startup()
$WS_EX_COMPOSITED = 0x2000000
Global $hGUI = GUICreate( $Titel , @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, BitOR($WS_EX_TOPMOST,$WS_EX_COMPOSITED))
Global $hwnd = WinGetHandle($Titel)
GUISetBkColor(0x0)
$Willkommen=GUICtrlCreateLabel ( "Willkommen bei Pong made by Greek", @DesktopWidth/4, @DesktopHeight/2-150, 1000, 200 )
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 40)
GUISetState(@SW_SHOW)
Do
Sleep ( 100 )
Until _IsPressed ( "0D", $dll ) Or _IsPressed ( "20", $dll )
GUICtrlSetState ( $Willkommen, $GUI_HIDE )
[/autoit] [autoit][/autoit] [autoit]$hGraphic = _GDIPlus_GraphicsCreateFromHWND ($hWnd)
$hPenRahmen = _GDIPlus_PenCreate (0xFF0000FF, 15, 2)
$hPen = _GDIPlus_PenCreate (0xFFFFFFFF, 15, 2)
$hpen_Del = _GDIPlus_PenCreate (0xFF000000, 15, 2)
$b=_GDIPlus_GraphicsDrawLine ($hGraphic, 100, $Strichpos1, 100, $Strichpos2, $hPen)
_GDIPlus_GraphicsDrawLine ($hGraphic, @DesktopWidth-100, $Strichpos1, @DesktopWidth-100, $Strichpos2, $hPen)
_DrawRahmen()
$Spielstand=GUICtrlCreateLabel ( "0:0", @DesktopWidth/2, @DesktopHeight/15, 100, 100 )
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 40)
HotKeySet( "w", "_hoch" )
HotKeySet( "s", "_runter" )
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func _ende()
_GDIPlus_Shutdown()
Exit
EndFunc
Func _DrawRahmen()
_GDIPlus_GraphicsDrawLine($hGraphic, $Rahmenbreite / 2, 0, $Rahmenbreite / 2, @DesktopHeight, $hPenRahmen)
_GDIPlus_GraphicsDrawLine($hGraphic, 0, $Rahmenbreite / 2, @DesktopWidth, $Rahmenbreite / 2, $hPenRahmen)
_GDIPlus_GraphicsDrawLine($hGraphic, @DesktopWidth - $Rahmenbreite / 2, 0, @DesktopWidth - $Rahmenbreite / 2, @DesktopHeight, $hPenRahmen)
_GDIPlus_GraphicsDrawLine($hGraphic, 0, @DesktopHeight - $Rahmenbreite / 2, @DesktopWidth, @DesktopHeight - $Rahmenbreite / 2, $hPenRahmen)
EndFunc ;==>_DrawRahmen
Func _hoch()
While _IsPressed ( "57", $dll )
_GDIPlus_Graphicsdrawline($hGraphic,100,$strichpos1,100,$strichpos2,$hpen_del)
if $Strichpos1 >= 25 then
$strichpos1=$strichpos1-10
$strichpos2=$strichpos2-10
EndIf
_GDIPlus_GraphicsDrawLine ($hGraphic, 100, $Strichpos1, 100, $Strichpos2, $hPen)
sleep(50)
WEnd
EndFunc
Func _runter()
While _IsPressed ( "53", $dll )
_GDIPlus_Graphicsdrawline($hGraphic,100,$strichpos1,100,$strichpos2,$hpen_del)
if $Strichpos2 <= @DesktopHeight-25 then
$strichpos2=$strichpos2+10
$strichpos1=$strichpos1+10
EndIf
_GDIPlus_GraphicsDrawLine ($hGraphic, 100, $Strichpos1, 100, $Strichpos2, $hPen)
sleep(50)
WEnd
EndFunc
die unfeine lösung
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
HotKeySet ("{F5}","test")
Dim $mainsocket1 = -1
$ipadresse ="182.168.178.23"
$port = "9300"
TCPStartup()
while 1
sleep (99)
wend
Func test()
$mainsocket1 = TCPConnect($ipadresse, $port)
msgbox(0,"Socket = "&$mainsocket1,"Error = "&@error)
if $mainsocket1 <> -1 then
TCPSend($mainsocket1, "")
Else
MsgBox(0,"jdflkj","kjfdlj")
endif
EndFunc
na das ist ja mal ne richtig nette idee!
da muss ich mich auchmal dran versuchen
ps: respekt an euch und den urheber
edit:
also da mir das echt zu lange dauert 10 minuten auf das bild zu warten
hier bissle geändert
dauert jetzt bei mir nurnoch 5 min bei gleicher scalierung
#cs ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]AutoIt Version: 3.2.12.1
Author: myName
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]; Script Start - Add your code below here
[/autoit] [autoit][/autoit] [autoit]#include <GUIConstants.au3>
#include <Array.au3>
Opt("GUIOnEventMode", 1)
[/autoit] [autoit][/autoit] [autoit]$Form1 = GUICreate("lokster's Mandelbrot Set example", 1280, 900)
$graphic = GUICtrlCreateGraphic ( 0, 0 , 1280 , 900)
;GUICtrlSetBkColor(-1, 0xa0ffa0)
;GUISetState(@SW_SHOW)
GUISetOnEvent($GUI_EVENT_CLOSE, "Bye")
$user32 = DllOpen("user32.dll")
$gdi32 = DllOpen("gdi32.dll")
#cs
$scale = 60 ; x-fache Vergrößerung
$startx = 2220 ; [optional] Start des Ausschnitt auf der X-Achse (in Pixeln)
$endx = 3600 ; [optional] Ende des Ausschnitt auf der X-Achse (in Pixeln)
$starty = 1000 ; [optional] Start des Ausschnitt auf der Y-Achse (in Pixeln)
$endy = 1900 ; [optional] Ende des Ausschnitt auf der Y-Achse (in Pixeln)
#ce
$scale = 100 ; x-fache Vergrößerung
$startx = 4000 ; [optional] Start des Ausschnitt auf der X-Achse (in Pixeln)
$endx = 5280 ; [optional] Ende des Ausschnitt auf der X-Achse (in Pixeln)
$starty = 2170 ; [optional] Start des Ausschnitt auf der Y-Achse (in Pixeln)
$endy = 3070 ; [optional] Ende des Ausschnitt auf der Y-Achse (in Pixeln)
$i = 0
Global $colourr[100]
$colourr[0] = 'lala'
Mandelbrot($scale, $startx, $endx, $starty, $endy)
; Mandelbrot($scale)
While 1
Sleep(100)
WEnd
Func Bye()
Exit
EndFunc ;==>Bye
Func pix($dc, $x, $y, $color)
GUICtrlSetGraphic($graphic, $GUI_GR_COLOR, $color)
GUICtrlSetGraphic($graphic, $GUI_GR_DOT, $x, $y)
#cs
For $y1 = $y To $y + 9 Step 1
For $x1 = $x To $x + 9 Step 1
GUICtrlSetGraphic($graphic, $GUI_GR_DOT, $x1, $y1)
Next
Next
#ce
;DllCall($gdi32, "long", "SetPixel", "long", $dc, "long", $x, "long", $y, "long", $color)
EndFunc ;==>pix
Func GetDC($handle)
$dc = DllCall($user32, "int", "GetDC", "hwnd", $handle)
Return $dc[0]
EndFunc ;==>GetDC
Func Mandelbrot($mscale, $selectionstartx = 0, $selectionendx = Default, $selectionstarty = 0, $selectionendy = Default)
$begin = TimerInit()
$dc = GetDC(WinGetHandle($Form1))
$Zeile = 1
$width = 100*$mscale
$height = 100*$mscale
$maxiteration = 200 ; Die Schärfe
If $selectionendx = Default Then $selectionendx = 100*$mscale
If $selectionendy = Default Then $selectionendy = 100*$mscale
#cs
For $py = $selectionstarty To $selectionendy Step 10
For $px = $selectionstartx To $selectionendx Step 10
#ce
For $py = $selectionstarty To $selectionendy Step 1
For $px = $selectionstartx To $selectionendx Step 1
$x0 = (4 / $width) * $px - 2
$y0 = (4 / $height) * $py - 2
$x = $x0
$y = $y0
$iteration = 0
While (($x * $x + $y * $y) < 4 And $iteration < $maxiteration)
$xtemp = $x * $x - $y * $y + $x0
$y = 2 * $x * $y + $y0
$x = $xtemp
$iteration += 1
WEnd
$spx = $px - $selectionstartx
$spy = $py - $selectionstarty
$colour = ($iteration / $maxiteration) * 0x00ff00
pix($dc, $spx , $spy, $colour) ; I did't had time to implement some fancy colouring
;if $Zeile > 39 AND $spx > 590 AND $spx < 610 Then
; $colourr[$i] = ($iteration / $maxiteration) * 0xFF
; $i = $i + 1
; ;MsgBox(0,"Time Difference",'')
;EndIf
Next
; $Zeile += 1
; if $Zeile > 500 Then
; GUICtrlSetGraphic($graphic, $GUI_GR_REFRESH)
; $Zeile = 1
;EndIf
Next
$dif = TimerDiff($begin)
GUISetState(@SW_SHOW)
GUICtrlSetGraphic($graphic, $GUI_GR_REFRESH)
;_ArrayDisplay($colourr)
MsgBox(0,"Time Difference",$dif)
EndFunc ;==>Mandelbrot
-.-
der string war doch vorher schon klein
und wenn ich nach dem send den string durchjage muss er immernoch gesendet werden ;P
klar p2p, aber mach das mal mit au3
da gibts nicht so einfach pipes wie bei linux ;P
lies einfach die ausgangs DB ein,und trenne die variablen,
anschließend sortierst du in einer loop die globalen, den lokalen hinzu, sollte leicht zu bewerkstelligen sein
$input = fileread("ausgangsdb.csv")
$in_Array = stringsplit($input,";")
for $i = 1 to $in_Array[0]
filewriteline("zielDB.csv")
next
msgbox(0,"Fertig","Erledigt!")
weiß jetzt nicht wie deine ziel DB aufgebaut ist muss du halt anpassen
du kannst au3 TCP leider nicht ohne server nutzen, es sei denn du lässt jeden mit dem du chatten willst über einen anderen port laufen, sehr unschicke lösung
bastel dir doch einfach dein chat programm auf einem fixen port,
und überprüfe beim start ob es bereits einen server gibt , falls nicht wird statt der "client()" einfach die "server()" funktion gestartet
dafür müsstest du in deinem netz allerdings eine liste der rechner ip's erstellen welche dann abgearbeitet wird
sollte nicht all zu schwer sein
hi
also im groben und ganzen habe ich keine idee warum bei mir controlsend manchmal unkontrolliert anfängt shift bzw alt zu rücken...
mein code:
[autoit]
func geth()
return wingethandle("fenstername")
endfunc
while 1
controlsend(geth(),"","","beispielstring1")
sleep(100)
controlsend(geth(),"","","beispielstring2")
sleep(100)
controlsend(geth(),"","","beispielstring3")
sleep(100)
controlsend(geth(),"","","beispielstring4")
sleep(100)
controlsend(geth(),"","","beispielstring5")
sleep(100)
controlsend(geth(),"","","/endwhile")
sleep(100)
wend
normal soltle doe ausgabe ja einfach ein blocktext sein ohne große buchstaben
leider sieht das ganze dann in etwas so aus:
beispielstring1beispieLSTring2beISPIELstring3beispielstrinG$BEispielSTRIng57ENDEhilebeispiELSTring1beISPIELSTRING2beispielstrinG3beIspieLsTring4BeispIELString5/eNdWhilE
ich dachte zuerst es liegt irgendwie an meinem pc, aber als ich freunde gefargt hatte war es bei diesen nicht anders o0
MfG azunai