Jump to content

ripdad

Active Members
  • Posts

    1,091
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by ripdad

  1. Is this your function call when you initially start the script? StartScript()
  2. You're not calling any functions. Also, did you intend to use a main loop?
  3. 1. ObjEvent() needs to be before the line ObjGet(). 2. Replace $oObjectErrorCheck with $oMyError. 3. StartMod is not a valid class property. Just remove that line and you should be good to go.
  4. You only need to declare the variable once. This is how I would do it inside the function. Your script might need more work afterwards... Main() Func Main() Local $data1, $data2, $pants = 1 While 1 $data1 = PixelSearch(356, 247, 726, 594, 0x6B29A5) If IsArray($data1) Then Send("{ALTDOWN}") Sleep(60) Send("{0 down}") Sleep(60) Send("{0 up}") Sleep(60) Send("{ALTUP}") Sleep(50) MouseClick("primary", $data1[0] + 5, $data1[1] + 5, 1, 0) Sleep(900) $pants = 0 Else $data2 = PixelSearch(356, 247, 726, 594, 0x6B29A5) If IsArray($data2) Then MouseClick("primary", $data2[0] + 5, $data2[1] + 5, 1, 0) Sleep(500) Else If $pants = 0 Then Send("{ALTDOWN}") Sleep(60) Send("{9 down}") Sleep(60) Send("{9 up}") Sleep(60) Send("{ALTUP}") Sleep(50) $pants = 1 Else $pants = 1 Sleep(100) EndIf EndIf EndIf WEnd EndFunc
  5. https://www.autoitscript.com/forum/topic/34658-are-my-autoit-exes-really-infected/
  6. Hmm... doesn't seem to be a way with just "send". How about: Sleep(3000) For $i = 1 To 4 Send("test ") Sleep(10) Next ; - or in a function - Func _SendText($text = "test", $n = 4) For $i = 1 To $n Send($text) Sleep(10) Next EndFunc
  7. Your answer is in the helpfile. Click here
  8. Flax - you should be good to go. Good luck!
  9. This should help you debug the error... $hCurlHandle = DllCall($hDll_LibCurl, "ptr:cdecl", "curl_easy_init") If @error Or Not IsArray($hCurlHandle) Then Return SetError(1, 0, 0) $hCurlHandle = $hCurlHandle[0] EDIT I just noticed that you're using 64bit dll's. Did you change the required lines in the UDF to use them?
  10. Good catch. I must be slipping not to notice that.
  11. Does your string work from a Windows command window?
  12. You can also try this, if the one above doesn't work... $startLine = 'e:\ffprobe.exe "-v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1" t:\111.mp4'
  13. okay, so it's telling you that you have a "missing argument" in your string. I'm not familiar with what should be in the string and what should not.
  14. Your AutoIt3 folder should be located under C:\Programs. If not, then it's possible your anti-virus program removed it, or some other thing happened. Be patient. Eventually, you'll figure it out.
  15. Try this... $startLine = 'e:\ffprobe.exe "-v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 t:\111.mp4"' Not tested, but should work.
  16. Instead of force closing an AutoIt app, you could use: Inter-Process Communication (IPC) I have several apps that use it for various things including sending a shutdown message. That way, you have full control of the way each app closes. Not to mention, much more graceful. And, it won't matter if it's an au3 or exe.
  17. Try #RequireAdmin at the top of your script.
  18. You will need to separate the header from the body. You can split it like this most of the time: $array = StringSplit($sRecv, @CRLF & @CRLF, 1) $array[1] holds the header. $array[2] holds the body. Also, you need to detect if the incoming data is a header or is receiving continuing data before the split. A header always starts with HTTP/1.1 (or in some cases HTTP/1.0) and then the response code. For instance: HTTP/1.1 200 OK That's the best this script can provide. I hope it works out for you -- and you're welcome.
  19. The majority of websites these days are https (ssl). The Local Proxy Server does not have the ability to decode these sites, as I hinted in my last post. If you are just trying to grab normal http headers from the remote server, then you can get them from "Section 6" of the script. ;*** Now Under Active Loop ****************************************************** Section 6 ; ; we sent data from client to remote in previous sections --> ; <-- and now we will send data from remote to client. ; ; If $a[$i][$RemoteSocket] > 0 Then; make sure the remote socket is good (4) $sRecv = _WSA_TCPRecv($a[$i][$RemoteSocket], 32768, 1, 10); <- 10 second time-out $nError = @error $nBytesReceived = @extended ; Switch $nError Case 0 Case 10053, 10054, 10060; client disconnected, remote disconnected, timed-out CloseSocket($i); <- these are common errors, so bypass displaying them, but close socket Case Else CloseSocket($i, '[E108] Remote/' & $a[$i][$RemoteHost] & '/' & _WSA_FormatMessage($nError), 1) EndSwitch ; If $nBytesReceived > 0 Then; remote data received $nTotalBytesReceived += $nBytesReceived; add to total bytes received $Active = 1; reset ; $sRecv = BinaryToString($sRecv); <============== HERE ====== _WSA_TCPSend($a[$i][$ClientSocket], $sRecv, 1) $nError = @error ; If $nError Then CloseSocket($i, '[E109] Client/' & $a[$i][$RemoteHost] & '/' & _WSA_FormatMessage($nError)) EndIf EndIf EndIf
  20. jcpetu, You can grab the headers at PrecisionModify() in the script, just before it's processed. Be aware that you cannot get the secure https headers -- because they are encrypted. Only the local browser and remote website have that access. -- edit If you are trying to get headers for some other script, then that will be a bit more complex. If so, then I need to know some details about it. Is it just a query or is it more than that? If more, then I need to know in what way. .
  21. It's taken some time to go through various test. Thanks for your patience. The primary purpose for this function was to be able to get the final output volume of a stream, after DSP processing. This includes VST's. On a recording stream, this doesn't seem to be an issue. But on a playing stream, it's quite a different thing. When _BASS_ChannelGetLevel() is used to get levels on a play stream, it's not doing it at the final output of the stream. It's doing it at some hardcoded FX Pin earlier in it. Not really sure why the BASS developers did this, but there is a way to get that reading at the final output according to this post: http://www.un4seen.com/forum/?topic=18949.0 So, I tested various ways to accomplish getting that reading. I found that setting a Volume FX at low priority works. Afterwards, I needed to work out a few things in the main script to accommodate the new function. It turned out very well. I'm very happy with it. Okay, let's talk about what works and what doesn't. Nine, I couldn't get your code to work on a 32bit machine, using AutoIt 3.3.8.1 (32bit). I needed it to be compatible back to that version. It probably works fine on a 64bit machine using a more up-to-date version of AutoIt. I was having other problems in 32bit mode, with obtaining the levels using the object method. It would soft crash saying: "variable must be of type object" After I changed the Danyfirex code and UEZ code to DllStructGetData() -- they both worked. I used code lines from both of them to put together what was suitable for me on the project I'm working on, and added some of my own. Here is the result: ; #CUSTOM FUNCTION# =================================================================================================== ; .......Name.: _BASS_ChannelGetLevelEx($hStream, $fLength, $iFlag) ; Description.: Gets the volume level on a play or record stream and is more flexible than _BASS_ChannelGetLevel(). ; DLL Version.: BASS.DLL v2.4.15.0 ; ............: ; .Parameters.: $hStream - The handle returned by _BASS_RecordStart, _BASS_StreamCreateFile, RecordStart from BASS_CB.dll ; ............: $fLength - The amount of data to inspect to calculate the level, in seconds. Default = 20ms, Maximum = 1sec. ; ............: $iFlag - BASS_LEVEL_MONO = 1, BASS_LEVEL_STEREO = 2 (Default), BASS_LEVEL_RMS = 4, BASS_LEVEL_VOLPAN = 8 ; ............: ; ....Returns.: Success - Returns the volume level 0 to 100+ (this level is not clipped, so it could exceed 100 easily) ; ............: Failure - sets @error ; ............: ; .....Author.: ripdad (June 30, 2020) Thanks to Danyfirex and UEZ for their help in the making of this function. ; ...Modified.: ; ............: ; ....Remarks.: To get final output volume level for a stream, you must place an FX with priority = 0 on the stream. ; ............: See: _BASS_ChannelSetVolumeFX() and _BASS_FXSetVolumeParameters() ; ............: ; .......Link.: http://www.un4seen.com/doc/#bass/BASS_ChannelGetLevelEx.html ; ....Related.: _BASS_ChannelGetLevel ;====================================================================================================================== Func _BASS_ChannelGetLevelEx($hStream, $fLength = 0.02, $iFlag = 2) Local $tLevels = DllStructCreate('float fLeftLevel;float fRightLevel') Local $aResult = DllCall($_ghBassDll, 'bool', 'BASS_ChannelGetLevelEx', 'dword', $hStream, 'struct*', $tLevels, 'float', $fLength, 'dword', $iFlag) If @error Then Return SetError(1, 1, 0) If $aResult[0] = 0 Then Return SetError(_BASS_ErrorGetCode(), 0, 0) Local $nLeftLevel = Round(DllStructGetData($tLevels, 'fLeftLevel') * 100) Local $nRightLevel = Round(DllStructGetData($tLevels, 'fRightLevel') * 100) If $iFlag = 1 Then $nRightLevel = $nLeftLevel Return StringFormat('%02i%02i', $nLeftLevel, $nRightLevel) EndFunc To access the return from this function: $LeftCH = StringLeft($iLevels, 2) and $RightCH = StringRight($iLevels, 2) I want to thank everyone who pitched in on this effort. I appreciate it very much.
  22. Thanks everyone for your time and skills. I need to test these across versions AutoIt -- to see where each of them stands. Will get back to this in a day or two. Thanks again.
  23. Geeze guys, I started to do a struct* --- but I said NO... it's expecting an array ! So much for logic. Okay, I will test here shortly. Thanks.
×
×
  • Create New...