Jump to content

autoitter

Active Members
  • Posts

    35
  • Joined

  • Last visited

Everything posted by autoitter

  1. Hi MrCreatoR, I used your first suggestion. I use OnEvent mode in my script, but it was easy to convert. Thanks for pointing me in the right direction! Best regards
  2. Hi, I'm writing a piece of software that controls a PTZ camera. One of the things I'm trying to achieve is that the camera moves while the users keeps a button pressed in the GUI. Movement should stop as soon as the user releases the button. I can check if the mouse key is pressed with the _IsPressed() function. But the GuiCtrlSetOnEvent function only gets called when the button is released. Is there any way to get an event as soon as the button is pressed down? Best regards
  3. I"m using AutoIt version 3.3.14.2
  4. Nice job, thanks! Very useful in a project I did recently. One note: in function __Io_Init() which itself is called by _Io_Listen() the the TCP timeout is set to 5 msec. This is somewhat short, even on a busy LAN. My application sometimes would return a error when calling _Io_Listen() at startup (with @extended set to 10060). Raising this value fixed the problem. Just in case someone runs into the same problem.
  5. It looks like this has something to do with the mixed type of elements in your array. It works if you set the $iCompare flag in the call to _ArraySearch to a value of 2.
  6. $strIP = "10.165.5.30" If StringRegExp($strIP, "10\.165\.5\.[0-9]{1,3}") Then ConsoleWrite("Match!" & @CRLF) EndIf
  7. I've once made a clock that would update the display every second. I used sleep this way: While True UpdateDisplay() ; Wait until next second pass Sleep(1000-@MSEC) WEnd
  8. Hi all, As guinness stated, the size of an uncompressed AutoIt program is nothing compared to the size of hard disk drives we're using these days. Also, a compressed program doesn't use less memory when executed. The only gain you have, is used space on the drive. Of course, when distributing programs the size does mather. But I would suggest using an installer like NSIS which compresses your (uncompressed) AutoIt program and adds only about 35 kBytes of overhead. Edit: typo
  9. Hi, I would suggest using CPU-Z: CPU-Z You can start this useful tool from the command line with the option -txt=file or -html=file and it will generate a report in text- or html format. You can simply parse that report to get the information you need. Just my 2 euro cents. Steve
  10. You mean something like this? #include <Array.au3> $sText = "CountDown" $Atext = StringSplit($sText, '', 2) _ArrayDisplay($Atext) For $n = 1 To UBound($Atext) - 1 $Atext[$n] = _Spaces($n) & $Atext[$n] Next _ArrayDisplay($Atext) Func _Spaces($nCount) Local $strResult = "" For $i = 1 To $nCount $strResult &= " " Next Return $strResult EndFunc Edit: removed StringRegExpReplace
  11. Maybe you can use the Bass UDF to get the samples?
  12. The variable $Reigon isn't defined. How is your function GetMouse() defined? Is $Reigon set from there?
  13. Just add the .crypt extension after the original extension. For example: document.doc.crypt. Strip the .crypt of when decrypting and your done.
  14. Like this: If ($pos[0] >= 0 and $pos[0] <= 640) and ($pos[1] >= 0 and $pos[1] <= 512) Then $Mouseregon = 1 ;Top Left Reigon EndIf
  15. Your declaring functions inside the while loop. You have to move them outside of the loop.
  16. It looks like the mailto handler is adding the spaces at the end of each line. If I call this URL from my browser, then the Thunderbird e-mail client opens and the same thing happens. mailto:[email protected]?subject=test&body=line1%0D%0Aline2 Probably nothing you can do about it from AutoIt. Maybe you can put the unlock code on the last line of the e-mail? That way not extra spaces are added.
  17. Right click the script and choose "Compile with options". In the Resource Update tab you can enter the version information, etc.
  18. Use $CBS_DROPDOWNLIST. For example: $Combo = GUICtrlCreateCombo("", 427, 12, 131, 75, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
  19. It should still work. Just tested using the latest release version of AutoIt (v3.3.4.0) and found no problems. Also tested with Windows 7 and it looks like that is working fine also. Are you sure that anything gets written using OutputDebugString?
  20. Get a free account on DynDNS You simply get a hostname that points to your IP. You can download a small program that keeps track of your IP and sends it to the dyndns servers whenever it changes.
  21. Why not use the built-in functions StdoutRead, StderrRead and StdinWrite?
  22. If you start ffmpeg as a child process using Run() you could use StdOutRead() to read and parse the output of ffmpeg.
  23. The problem is that you reuse the variables for the input controls to do the calculation. This works: #include <GUIConstants.au3> GUICreate("test",300,250) GUICtrlCreateLabel("Put in the form of Ax + B = C", 10, 20) GUICtrlCreateLabel("X",40, 46) GUICtrlCreateLabel("+", 57, 44) GUICtrlCreateLabel("=", 110, 44) $exitbutton = GUICtrlCreateButton("Exit", 30, 200) $Avalue = GUICtrlCreateInput("",10,40,30,30) $Bvalue = GUICtrlCreateInput("", 70, 40, 30, 30) $Cvalue = GUICtrlCreateInput("", 130, 40, 30, 30) $okbutton = GUICtrlCreateButton("ok", 2, 200) GUISetState() Do While 1 $msg = GUIGetmsg() Select Case $msg = $okbutton $aVal = GUICtrlRead($Avalue) $bVal = GUICtrlRead($Bvalue) $cVal = GUICtrlRead($Cvalue) $r = $cVal - $bVal $z = $r/$aVal ExitLoop Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $exitbutton Exit EndSelect WEnd MsgBox(0,"The value is", $z) $z = 0 Until $msg = $GUI_EVENT_CLOSE or $msg = $exitbutton Exit
  24. Got it! This is it: $strReceived = StringRegExpReplace($strReceived, "\r([^\n])", @CRLF & "\1") Thanks martin and toonboon!
  25. @CR@LF is actually the same as @CRLF. My problem is that some @CR characters are followed by a @LF. I only want to replace "loose" @CR's. I was trying something like this: $strReceived = StringRegExpReplace($strReceived, "(\r)(^\n)", @CRLF & "\1") But this doesn't work...
×
×
  • Create New...