Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/05/2013 in all areas

  1. have fun! #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> GUICreate("Form1", 615, 227) $Mainlist = GUICtrlCreateList("", -1, -1, 615, 227) GUISetState() Global $TCPAccept TCPStartup() $MainSocket = TCPListen(@IPAddress1, 1234) _TCPAccept() While 1 $TCPRecv = TCPRecv($TCPAccept, 9) If @error Then GUICtrlSetData($Mainlist, "") _TCPAccept() ContinueLoop EndIf If $TCPRecv <> "" Then GUICtrlSetData($Mainlist, $TCPRecv) Sleep(100) WEnd Func _TCPAccept() GUICtrlSetData($Mainlist, "Off") Do $TCPAccept = TCPAccept($MainSocket) Until $TCPAccept <> -1 GUICtrlSetData($Mainlist, "") EndFunc ;==>_TCPAccept
    1 point
  2. Try #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> GUICreate("Form1", 615, 227) $Mainlist = GUICtrlCreateList("", -1, -1, 615, 227) GUISetState() Global $TCPAccept TCPStartup() $MainSocket = TCPListen(@IPAddress1, 1234) _TCPAccept() While 1 $TCPRecv = TCPRecv($TCPAccept, 9999999) If @error Then GUICtrlSetData($Mainlist, "Off") _TCPAccept() EndIf GUICtrlSetData($Mainlist, $TCPRecv) Sleep(200) WEnd Func _TCPAccept() Do $TCPAccept = TCPAccept($MainSocket) Until Not @error EndFunc ;==>_TCPAccept server TCPStartup() Do $TCPcon = TCPConnect(@IPAddress1, 1234) Until Not @error While 1 TCPSend($TCPcon, "on") Sleep(200) WEnd
    1 point
  3. Maybe this will help.
    1 point
  4. A StringRegExpReplace method. Local $vWord = "AA:BB:CC" Local $vConstantWord = "12345_5678" Local $vOutput = StringRegExpReplace($vConstantWord, "(^[^_]+)(.+)$", "${1}" & StringRegExpReplace($vWord, "^.+(\w):(\w{2})$", "\1\2") & "${2}") ConsoleWrite($vOutput & @LF)
    1 point
  5. How I would do it, most likely not the easiest way as I'm Sure it could be done with StringRegExpReplace $vWord = "AA:BB:CC" $vConstantWord = "12345_5678" $vString = StringRight(StringReplace($vWord,":", ""), 3) ;~ AABBCC $vString2 = StringSplit($vConstantWord, "_", 2) ;~ Split Constant Word Into Array $vOutput = ($vString2[0] & $vString & "_" & $vString2[1]) ;~ 12345, BCC, _, 5678 ConsoleWrite($vOutput)
    1 point
  6. Melba23

    windows application

    veerendra, No-one is going to install the software just to see what happens. Please show us some screenshots of the various elements of the FortiClient installer that do not allow the capture of mouse actions. It might well be that these are security dialogs which cannot be automated - but at the moment we are only guessing. M23
    1 point
  7. BrewManNH

    windows application

    Are you missing the Windows Authentication window clicks? Because that's normal, you can't script those windows, it's a security issue.
    1 point
  8. If you are going to supply a simplistic summary (of essentially what I just said), then you should take care to make sure you don't confuse, by using string function, instead of string functions. Because there is a String function. NOTE - I quite realize you probably didn't see my post until after you did yours.
    1 point
  9. For the novice user, GUICtrlRead(), StringSplit() (splitting at @CRLF) and _ArrayDelete() should give you an idea.
    1 point
  10. Read and store your data in a variable. Remove the useless data, in your case the 5 first lines, using string function and then set the data back to the edit.
    1 point
  11. Being on Linux at the moment, I don't have access to the Help file, and I cannot seem to find an online Link to the UDF's (User Defined Functions). It is possible the Edit UDF has what you need, but I cannot remember. If not, then you can start with the StringSplit function, with the appropriate Carriage Return as divider/separator. Then do a character count on the first 5 array returns (i.e $cnt = StringLen($array[1]) up to $array[5]) With the total of each five counts, use StringTrimLeft from your full read of the Edit text, then write the result back. The only obvious problem you will have, is if you don't have the required Carriage Returns. In that case you are out of luck, though there might be a Function that can just return the string for the width of the Edit (single visible line). Unless of course, you have an idea of what the last few words of line five will be, and they are unique enough to use StringSplit with them. EDIT This is just one of a few approaches that could be used. I'm sure that someone will eventually come along with others before too long, but the above should give you some ideas (and a possible solution) to start with.
    1 point
  12. #include <GuiConstantsEx.au3> Opt("MouseCoordMode", 1) ;1=absolute, 0=relative, 2=client ******* Very Important ******** Global $ycalc = .90 * @DesktopHeight Global $Xcalc = .90 * @DesktopWidth HotKeySet("{ESC}", "Terminate") ; a way out of this While 1 Sleep(50) _MGP() WEnd Func _MGP() $pos = MouseGetPos() If $pos[1] > $ycalc Or $pos[0] > $Xcalc Then Return ToolTip('X: ' & $pos[0] & ', Y: ' & $pos[1], 10, 10) ToolTip('X: ' & $pos[0] & ', Y: ' & $pos[1]) EndFunc ;==>_MGP Func Terminate() Exit 0 EndFunc ;==>Terminate another approach... 8)
    1 point
  13. #include <guiconstants.au3> $main = GUICreate('main', 200, 300) $button = GUICtrlCreateButton('Switch', 70, 245, 50, 30) $tab = GUICtrlCreateTab(10, 10, 180, 230) $tab1 = GUICtrlCreateTabItem('one') $tab2 = GUICtrlCreateTabItem('two') $tab3 = GUICtrlCreateTabItem('three') GUICtrlCreateTabItem('') GUISetState() While 1 $Msg = GUIGetMsg() If $Msg = - 3 Then Exit If $Msg = $button Then GUICtrlSetState($tab2, $GUI_SHOW) EndIf WEnd
    1 point
×
×
  • Create New...