Jump to content

Vision

Active Members
  • Posts

    69
  • Joined

  • Last visited

Everything posted by Vision

  1. Hello, im useing this tcp udf in one of my main "projects", im currently working towards a new version and i never had problems with this udf, but now the data i want to send has changed in size, so i have changed: Local $sDataBuff = TCPRecv( $hSocket, 1024) in TCP.udf -> line ~200 (server) and -> line ~400 (client) from 1024 to 102400 to recvieve more data (lol how clever) but the data is not increasing, on the same amount of data in sample 8000 characters are send from the server randomly only 1297 to 2601 characters are recieved on the client. hope you can help me to solve this . and sorry for bumping a old thread regards
  2. Hallo guys, i have a control panel, and i want to automate it. <tr> <td align=center style='padding: 0px'><a href="search.php?cat=46"><img border="0" src="pic.gif" alt="Picture" /></a></td> <td align=left border=0><table border=0 width="100%" cellspacing="0" cellpadding="0" border="0" class=embedded><tr border=0 class=embedded><td align=left style="width:100%" cellspacing="0" cellpadding="0" border="0" class=embedded><a title="Customer Number 1" href="details.php?id=292286&amp;hit=1"><b>Customer Number 1</b></a> (<b><font color=red>neu</font></b>) <td align=right class=embedded> <a href="contact/contacts.php"><img src="ddl.png" title="Get" border=0></a></td><tr><td align=right class=embedded></td></tr></tr></table></td> </td> <td align="right"><b><a href="details.php?id=292286&amp;hit=1&amp;filelist=1">7</a></b></td> <td align="right">0</td> <td align=center><nobr>2011-09-21<br />06:03:57</nobr></td> <td align=center>19.32<br>Percent</td> <td align=center>1<br>time</td> <td align=right><b><a href=details.php?id=292286&amp;hit=1&amp;tocontact=1><font color=#000000>2</font></a></b></td> <td align="right">0</td> <td align="center">6</td><td align=center><i>Products</i></td> </tr> how i can get a array that returns me for example: <a title="Customer Number 1" array[1] ="Customer Number 1" and href="details.php?id=292286&amp;hit=1"> array[2]= 292286 ; (ID) and <td align=center>19.32<br>Percent</td> array[3]=19.32 ;Percent the page i want to automate is full of this html elements hope someone can help me br
  3. thank you. everything clear.
  4. thanks much ! works prfect one additional question: is that possible to say that he cant select a value below the "6" just the neartest above 6 ?
  5. Hello, is is possible to search in a array for a specific number ? for exsample: the array has 50 values from 11.5 - 2.0 and i want to find the number of array whats 6.0 or the nearest value in range of 6.0 so if there are only arrays with 5.8 and 6.1 he should pick 6.1 as value? hope u understand my problem^^
  6. thanks alot works perfect ^^
  7. im getting allways 0 / -1 back #include <File.au3> #include <Array.au3> Global $aRecords Global $aiResult Global $oXML = ObjCreate("Microsoft.XMLHTTP") $oXML.Open("GET", "http://maps.google.com/maps/api/directions/xml?origin=48143,Muenster&destination=23560,Luebeck&sensor=false", 0) $oXML.Send Global $sFile = "test.xml" FileWrite($sFile, $oXML.responseText) _FileReadToArray("test.xml",$filetoarray) $result = _ArrayFindAll($filetoarray, "<text>") Msgbox(0,'Results:', $result) MsgBox(0,"Error", @error) the array in $filetoarray is ok but arrayfindall doesnt work?!
  8. Hello!, im trying to work abit with googles map api. Hers the standard code #include <File.au3> Global $oXML = ObjCreate("Microsoft.XMLHTTP") $oXML.Open("GET", "http://maps.google.com/maps/api/directions/xml?origin=48143,Muenster&destination=23560,Luebeck&sensor=false", 0) $oXML.Send Global $sFile = "test.xml" FileWrite($sFile, $oXML.responseText) in the test file are the complete xml answer. but i just want / or need one value at the end of the file is the point "distance" / text = (distance in kilometers) (AT LINE 589) so the value i search is "341 km" but the value can change depending on the adress i put in the post. so how i can get only this value from the hole xml answer? or how i can seperate this value? sorry for my bad english
  9. yes! exactly that thanks much!
  10. hi, how can i check a value if it contains a "." or a ","? i got a for next loop where i do some math and i want to check it. i want to search all values that are round without . or , is this possible? regards
  11. thanks much ! works good. i think that i get problems when i create to much buttons
  12. got it so far working but got still a problem there if i hover over the buttons they are start blinking can you help me fixing this ? attached you find the code + pictures and includes #Include <GDIPlus.au3> #Include <WinAPIEx.au3> #Include <WindowsConstants.au3> #NoTrayIcon _GDIPlus_Startup() $hBackground = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\bg_440x440.png') $hReg = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\big1.png') $hYellow = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\small1.png') $hmail_big = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\big2.png') $hmail_small = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\small2.png') $State = Default $State2 = Default $height = 500 $hForm = GUICreate('', 440 , 440, -1, $height,$WS_POPUPWINDOW, BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST)) _Update(0) ;~ _Update1(1) GUISetState() While 1 $Info = GUIGetCursorInfo($hForm) _WinAPI_BringWindowToTop($hForm) If @error Then _Update(0) Else If ($Info[0] >=10) And ($Info[0] <=210) And ($Info[1] >=10) And ($Info[1] <=210) And (BitAND(_GDIPlus_BitmapGetPixel($hReg, $Info[0] - 10, $Info[1] - 120), 0xFF000000) = 0xFF000000) Then _Update(1) If $Info[2] Then sleep(100) MSGBOX(0,"","clicked button1") EndIf Else _Update(0) EndIf If ($Info[0] >=170) And ($Info[0] <=370) And ($Info[1] >=170) And ($Info[1] <=370) And (BitAND(_GDIPlus_BitmapGetPixel($hmail_big, $Info[0] - 170, $Info[1] - 120), 0xFF000000) = 0xFF000000) Then _Update(2) If $Info[2] Then sleep(100) MSGBOX(0,"","clicked button2") ;~ EndIf Else _Update(0) EndIf EndIf $Msg = GUIGetMsg() Switch $Msg Case -3 ExitLoop ;~ MSGbox(0,"test", $var) EndSwitch WEnd _GDIPlus_Shutdown() ;~ ###################################################################################################### Func _Update($iState) If $iState = $State Then Return EndIf Local $hGraphic, $hImage $hImage = _GDIPlus_ImageClone($hBackground) $hGraphic = _GDIPlus_ImageGetGraphicsContext($hImage) Switch $iState Case 0 _GDIPlus_GraphicsDrawImageRect($hGraphic, $hYellow,10, 120, 154, 154) _GDIPlus_GraphicsDrawImageRect($hGraphic, $hmail_small,170, 120, 154, 154) Case 1 _GDIPlus_GraphicsDrawImageRect($hGraphic, $hReg, 10, 120, 154, 154) Case 2 _GDIPlus_GraphicsDrawImageRect($hGraphic, $hmail_big, 170, 120, 154, 154) EndSwitch _WinAPI_UpdateLayeredWindowEx($hForm, _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage), 255, 1) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_ImageDispose($hImage) $State = $iState EndFunc ;==>_Update ;~ ######################################################################################################### Func _GDIPlus_BitmapGetPixel($hBitmap, $iX, $iY) Local $aResult = DllCall($ghGDIPDll, 'uint', 'GdipBitmapGetPixel', 'ptr', $hBitmap, 'int', $iX, 'int', $iY, 'ptr*', 0) If @error Then Return SetError(1, 0, 0) Else If $aResult[0] Then Return SetError($aResult[0], 0, 0) EndIf EndIf Return $aResult[4] EndFunc ;==>_GDIPlus_BitmapGetPixel ;~ ########################################################################################################### Func _GDIPlus_ImageClone($hImage) Local $aResult = DllCall($ghGDIPDll, 'uint', 'GdipCloneImage', 'ptr', $hImage, 'ptr*', 0) If @error Then Return SetError(1, 0, 0) Else If $aResult[0] Then Return SetError($aResult[0], 0, 0) EndIf EndIf Return $aResult[2] EndFunc ;==>_GDIPlus_ImageClone ;~ #############################################################################################################transparent test.rar
  13. hello i found a thread where already this got solved, but only for one button/image can you guys help me to do this for more buttons / images?
  14. perfect! thanks much (would be good if this "trick" would be in the help file^^) one additional mini question can yo give me a tip how i can fix that the program crashes when i click something outside the program? the array returned from GUIGetCursorInfo() does a critical ERROR
  15. hello! im trying to make my gui transparent but i want just the background transparent not the controls so Winsettrans will not work in my way. i found in the help files _WinAPI_SetLayeredWindowAttributes but it has no effect in my script, in the example it works good anyone knows why? here is my "test" script #include <GUIConstantsEx.au3> #include <ButtonConstants.au3> #include <StaticConstants.au3> #include <WINAPI.au3> #include <WindowsConstants.au3> #include <GuiButton.au3> #include <GuiImageList.au3> Global $Cursor1, $Button1 $gui = GUICreate("Test", 300, 200, -1, -1) GUISetStyle($WS_POPUP, -1, $gui) ; NO BORDERS $label = GUICtrlCreateButton("test", 30, 50, 50, 120, $BS_BITMAP) $cursor = GUIGetCursorInfo() _WinAPI_SetLayeredWindowAttributes($gui, 0xABCDEF,255) ; <-- Why this dont make the window transparent? GUISetState() AdlibRegister("_Hover_Label") Func _Hover_Label() $pos = GUIGetCursorInfo() If $pos[4] = $label Then _GUICtrlButton_SetSize($label, 50, 120) Else _GUICtrlButton_SetSize($label, 20, 100) EndIf EndFunc While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 EndSwitch WEnd
  16. cant post my complete code. cause it will not work without my bluetooth PCB/board. but heres the part where i create the graph Func _creategraph() $Graph = _GraphGDIPlus_Create($Form1_1,32,384,449,209,0xFF000000,0xCCCCCCC) _GraphGDIPlus_Set_RangeX($Graph,0,100); ,10,1,1) _GraphGDIPlus_Set_RangeY($Graph,0,16); ,10,1,1) _GraphGDIPlus_Set_GridX($Graph,1,0xFFFFFFFF) _GraphGDIPlus_Set_GridY($Graph,1,0xFFFFFFFF) _gradeline() Endfunc Func _gradeline() _GraphGDIPlus_Set_PenSize($Graph,1) ;----- Set line color and size ----- _GraphGDIPlus_Set_PenColor($Graph,0x96000000) ;black ;----- draw lines ----- _GraphGDIPlus_Plot_Start($Graph,0,3.5) _GraphGDIPlus_Plot_Line($Graph,100,3.5) _GraphGDIPlus_Refresh($Graph) EndFunc so if i get a new measurement result from my PCB, i tryed to delete the graph and recreate it with the func _creategraph() but then the graph is displayed not correctly (glitchy). and if i want to clear it with _GraphGDIPlus_Clear($Graph) just nothing happens.
  17. hi i am using the GraphGDIPlus UDF for my graph but i cant clear the graph (nothing happens) can you help me`?
  18. thank you all for the help
  19. oh wow im stupid ^^ im thinking to complicated divide by ten... yes easy as it could be... but thanks melba23 ! for the script
  20. hi, i got 100 values from 3 digits to 2 digits. i have to add a "." or a "," one digit before the last digit exsample: some values 124-105-90-78..... to: 12,4-10,5-9,0-7,8..... or 12.4-10.5-9.0-7.8..... how i can do this?
  21. hi, can someone explain me why i cant work with bluetooth? im adding the device to COM6 when i try to connect to the COM6 port CommMg says "Port does not exist" how to fix it? (im using the example from first post for testing) regards EDIT: the normal RS232 works good (COM1), but the added ports from bluetooth are doing errors (not exist...)
  22. thanks! i will try it, but looks good so far.
  23. Hi, im usin NETCommOCX.NETComm for my COM scripts/tools works perfect for me but if i try to open a port what exsits but isnt connectet autoit will crash. here my code snip: ; >>STARTING NET COMM $NetComm = ObjCreate("NETCommOCX.NETComm") ; >>NET COMM SETTINGS With $NetComm .CommPort = $portsetting ;Port .Settings = "9600,N,8,1" ;Com Settings .InputLen = 0 ;reads entire buffer .InputMode = 0 ;reads in text mode .HandShaking = 1 ;uses both RTS and Xon/Xoff handshaking .PortOpen = "True" ;opens specified COM port EndWith so the line: .PortOpen = "True" ;opens specified COM port trys to open it but he cant and then autoit do a crit error exsample: im using bluetooth, so the Port is there but not active when the usb-stick isnt connected. when im trying to open the port autoit will crash (just logical cause he cant open the port) So is there a way to check the port if it is usable before he trys to open it? sorry for my bad english BR Vision
  24. the files i try to select are more then 100MB so any opinion what i can do?
  25. Hi guys, i have a problem again :C i try to connect via FileOpenDialog to a ftp server directly it does not work, but if set a network resource on win7 he "connects" to the ftp and i can browse there with FileOpenDialog BUT: if i mark one item and press open autoit freezes. my goal: i need something like FileOpenDialog for a ftp to get from the clicked file the full path anybody have some ideas or can help me? regards
×
×
  • Create New...