-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By ghetek
Hi everybody!
Apache Solr is an awesome search server that allows you to search through petabytes of data in milliseconds. It is used by many large organizations. It's kind of like MySQL with search in mind.
If you would like to get started, download Apache Solr and run the example command, "bin/solr start -e techproducts"
Now the example in the UDF should work. I am looking for any advice at all before I post this into the examples area.
here is a walkthrough of what is happening in the example
Func Example() Local $sHost = '127.0.0.1', $sPort = 8983, $sContainer = 'techproducts', $sWow64 = "" If @AutoItX64 Then $sWow64 = "\Wow6432Node" Local $dir_autoit = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE" & $sWow64 & "\AutoIt v3\AutoIt", "InstallDir") Local $st_URL = 'http://' & $sHost & ':' & $sPort & '/solr/' & $sContainer ;First lets see if its running, start if it is not If _solr_Webping($st_URL) = -1 Then _solr_cmdstart($SOLR_HOME, $sContainer) ;Enable stream overlay so that we can send commands via URL _solr_enablestreamoverlay($st_URL) ;delete the example data _solr_Webdelall($st_URL, True) ;Lets define some values for a document Local $aPairs[5][2] = [ _ [4, Default], _ ['literal.id', 5], _ ['literal.value_s', 'anything'], _ ['literal.resourcename', 'API Errors Constants'], _ ['literal.indextime_dt',_solr_tnow()]] ;now package up the document with the values _Solr_uploadPkg($dir_autoit & '\Include\APIErrorsConstants.au3', $st_URL, $aPairs, Null, 'commit=true&overrideLiterals=true') ;whoops, lets make a change to a single field _solr_Webupdate($st_URL, '[{"id":"' & 5 & '","value_s" : {"set":"something"}}]') ;and commit that change _solr_Webcommit($st_URL) ;we can also upload files from the SimplePostTool _solr_jarpost($SOLR_HOME & '\example\exampledocs\post.jar', $sContainer, $dir_autoit & '\Include\GuiListView.au3', 'literal.id=6&literal.cat=Help Files&commit=true') ;now we can query for something Local $qry_response = _solr_Webselect($st_URL, 'q=$ERROR_VOLSNAP_PREPARE_HIBERNATE') Local $json_response = Json_Encode($qry_response) json_dump($json_response) ConsoleWrite(json_get($qry_response, '.response.docs[0].content[0]') & @CRLF) EndFunc ;==>Example
Thank you for your time!
solr.au3 Json.au3 BinaryCall.au3
-
By abberration
Hello, all!
Today I present to you an updated version of Easy Mp3. After releasing version 1.0, I found several bugs that I fixed and added a few new features. Details can be found in the Changelog (check the Help menu).
What makes Easy Mp3 special? Ease of use. I started this project because I love FLAC, but my car stereo does not and the transcoding programs out there are tedious to work with, have confusing settings, you cannot drop multiple folders into it and get a good result and finally, the nagging to buy it or check for updates.
When you drag & drop a folder full of music, this program adds every supported file into the list of things to encode. All you have to do is select an output folder (personally, I have one folder called Mp3s). By default, it will create the same folder structure of the one that you dropped into it and it will place all of the encoded files in the respective folders. You also have the option to create folders from the metadata contained in the media. Here's what will convince you that this is the best Mp3 transcoder: download an entire discography by your favorite band and drop it into the program, select your output folder and click Encode. It's so simple, you will be amazed. By default, it uses the highest quality settings possible. It makes use of FFMpeg's built-in LAME codec. The download links are at the bottom of the screen.
This package includes 32 & 64 bit executables, a user guide, a changelog and source code. I use this program all the time and I hope you love it as much as I had fun scripting it!
Enjoy!
Download from MEGA:
Full package (includes FFMpeg): https://mega.nz/file/SXwUBK7L#aAN_6rDKi1tauQ0ngA4L0pUtD7S7rg66a9IUsl1say0
Lite Package (no FFMpeg): https://mega.nz/file/WLhynA5I#jEg-hnXCTEiWwM21vID9jUgZjaIKihl4pwEe4eQ2FV8
Download from FileFactory:
Full package: http://www.filefactory.com/file/5gen99g7hsr6/Easy_Mp3_v1.1_Full.zip
Lite package: http://www.filefactory.com/file/74xq8b69gso/Easy_Mp3_v1.1_Lite.zip
-
By Mr_Microphone
Alright, I may be an idiot.
Three years ago, I wrote a program that pushed component information to a secure site via their API. I went back to add some attributes and (here's the idiot part) ended up losing the source code and my modified code does not quite work. I have the compiled version that works minus the new attributes, so I know that their system has not changed. I stripped the larger program down from 3,000 lines to the part that is broken, but I am stumped. This was one of my first scripts, so it heavily leverages examples and isn't as pretty as I'd like it to be.
Be gentle.
The program / script creates a new records as expected, but for some reason, I cannot access information in the response, which I need for a later step.
I use Charles, a web debugging proxy tool so I can see the request and the response and both are as expected. Also, when I write to log file, the JSON reply is exactly what I expect and need, but when I try to do anything with the http body, it seems to be blank.
Here is the script minus the URL and token:
#include <Array.au3> #include <Curl.au3> #include <MsgBoxConstants.au3> #include <json.au3> ; this was added as an alternate way to read the data Global $WM_serial_number = "WM20745001" Global $wm_component_status_id = "10" Global $wm_manufacturer ="Multi-Tech" Global $wm_model = "MTR-LAT1-B07" Global $cellular_carrier_id = "3" Global $iccid_esn = "89010303300012345678" Global $ip_address = "192.168.2.11" Global $NewIDNumber Local $Curl = Curl_Easy_Init() Local $Html = $Curl ; any number as identify Local $Header = $Curl + 1 ; any number as identify Local $HtmlFile = "cURL_Request.html" Local $File = FileOpen($HtmlFile, 2 + 16) Local $Slist = Curl_Slist_Append(0, "content-type: multipart/form-data; boundary=---011000010111000001101001") $Slist = Curl_Slist_Append($Slist, "authorization: Token token=" & $Token) Curl_Easy_Setopt($Curl, $CURLOPT_PROXY, "127.0.0.1") ; needed to use Charles web debugging proxy Curl_Easy_Setopt($Curl, $CURLOPT_PROXYPORT, 8888) ; needed to use Charles Curl_Easy_Setopt($Curl, $CURLOPT_HTTPHEADER, $Slist) ; Curl_Easy_Setopt($Curl, $CURLOPT_URL, $Server & "wireless_module" & "s") Curl_Easy_Setopt($Curl, $CURLOPT_SSL_VERIFYPEER, 0) Curl_Easy_Setopt($Curl, $CURLOPT_TIMEOUT, 30) Curl_Easy_Setopt($Curl, $CURLOPT_WRITEDATA, $Html) Curl_Easy_Setopt($Curl, $CURLOPT_WRITEFUNCTION, Curl_FileWriteCallback()) Curl_Easy_Setopt($Curl, $CURLOPT_WRITEDATA, $File) Local $HttpPost = "" Local $LastItem = "" Curl_FormAdd($HttpPost, $LastItem, $CURLFORM_COPYNAME, "wireless_module" & "[serial_number]", $CURLFORM_COPYCONTENTS, $WM_serial_number, $CURLFORM_END) Curl_FormAdd($HttpPost, $LastItem, $CURLFORM_COPYNAME, "wireless_module" & "[component_status_id]", $CURLFORM_COPYCONTENTS, $wm_component_status_id, $CURLFORM_END) Curl_FormAdd($HttpPost, $LastItem, $CURLFORM_COPYNAME, "wireless_module" & "[manufacturer]", $CURLFORM_COPYCONTENTS, $wm_manufacturer, $CURLFORM_END) Curl_FormAdd($HttpPost, $LastItem, $CURLFORM_COPYNAME, "wireless_module" & "[model]", $CURLFORM_COPYCONTENTS, $wm_model, $CURLFORM_END) Curl_FormAdd($HttpPost, $LastItem, $CURLFORM_COPYNAME, "wireless_module" & "[cellular_carrier_id]", $CURLFORM_COPYCONTENTS, $cellular_carrier_id, $CURLFORM_END) Curl_FormAdd($HttpPost, $LastItem, $CURLFORM_COPYNAME, "wireless_module" & "[iccid_esn]", $CURLFORM_COPYCONTENTS, $iccid_esn, $CURLFORM_END) Curl_FormAdd($HttpPost, $LastItem, $CURLFORM_COPYNAME, "wireless_module" & "[ip_address]", $CURLFORM_COPYCONTENTS, $ip_address, $CURLFORM_END) ; submit Curl_Easy_Setopt($Curl, $CURLOPT_HTTPPOST, $HttpPost) Local $Code = Curl_Easy_Perform($Curl) If $Code = $CURLE_OK Then ConsoleWrite("Content Type: " & Curl_Easy_GetInfo($Curl, $CURLINFO_CONTENT_TYPE) & @LF) ConsoleWrite("Download Size: " & Curl_Easy_GetInfo($Curl, $CURLINFO_SIZE_DOWNLOAD) & @LF) MsgBox(0, 'Html', BinaryToString(Curl_Data_Get($Html))) ; this is something I threw in for debugging, expecting to see SOMETHING. Returns nothing MsgBox(0, 'Header', BinaryToString(Curl_Data_Get($Header))) ; this is something I threw in for debugging, expecting to see SOMETHING. Returns nothing Local $response = Curl_Easy_GetInfo($Curl, $CURLINFO_RESPONSE_CODE) If $response = "409" Then $response = "Failed due to a conflict." If $response = "200" Then $response = "Was NOT created." If $response = "201" Then $response = "Was created." ; read the ID that was assigned and store it $NewIDNumber = StringRight(StringLeft(BinaryToString(Curl_Data_Get($Html)), 10), 4) ; this DID work, but now it doesn't. An old compiled version still works ;~ Global $JsonObject = json_decode($Html); another debugging attempt. Did not use json functions previously and the program worked without it. ;~ Global $NewIDNumber = json_get($JsonObject, '.id') ConsoleWrite(@CRLF &'! id:' & $NewIDNumber & @CRLF & @CRLF) ; debugging feedback MsgBox(0, $response, $wm_serial_number & " new ID = " & $NewIDNumber); debugging feedback If $Code <> $CURLE_OK Then ConsoleWrite(Curl_Easy_StrError($Code) & @LF) Local $Data = BinaryToString(Curl_Data_Get($Curl)) Curl_Easy_Cleanup($Curl) Curl_Data_Cleanup($Curl) Curl_Data_Cleanup($Header) Curl_Data_Cleanup($Html) Curl_FormFree($HttpPost) Curl_slist_free_all($Slist) curl_easy_reset($Curl) FileClose($File) ConsoleWrite(@LF) EndIf This is the captured request (minus the host and token)
POST /api/v2/wireless_modules HTTP/1.1 Host: api. Accept: */* authorization: Token token= Content-Length: 942 Expect: 100-continue content-type: multipart/form-data; boundary=---011000010111000001101001; boundary=------------------------9adb0d87c7ea5061 --------------------------9adb0d87c7ea5061 Content-Disposition: form-data; name="wireless_module[serial_number]" WM20745001 --------------------------9adb0d87c7ea5061 Content-Disposition: form-data; name="wireless_module[component_status_id]" 10 --------------------------9adb0d87c7ea5061 Content-Disposition: form-data; name="wireless_module[manufacturer]" Multi-Tech --------------------------9adb0d87c7ea5061 Content-Disposition: form-data; name="wireless_module[model]" MTR-LAT1-B07 --------------------------9adb0d87c7ea5061 Content-Disposition: form-data; name="wireless_module[cellular_carrier_id]" 3 --------------------------9adb0d87c7ea5061 Content-Disposition: form-data; name="wireless_module[iccid_esn]" 89010303300012345678 --------------------------9adb0d87c7ea5061 Content-Disposition: form-data; name="wireless_module[ip_address]" 192.168.2.11 --------------------------9adb0d87c7ea5061-- and the captured response
HTTP/1.1 201 Created Date: Sun, 04 Apr 2021 00:12:18 GMT Server: Apache Cache-Control: max-age=0, private, must-revalidate Access-Control-Allow-Origin: not-allowed Vary: Accept-Encoding Access-Control-Max-Age: 1728000 X-XSS-Protection: 1; mode=block X-Request-Id: 71cfcf36-6020-48a6-a822-d2b393a27b69 Access-Control-Allow-Credentials: true Access-Control-Allow-Methods: PUT, OPTIONS, GET, POST ETag: W/"25d97fe8a9387cb4b9029a9e62b0bfa2" X-Frame-Options: SAMEORIGIN, SAMEORIGIN X-Runtime: 0.344005 X-Content-Type-Options: nosniff Access-Control-Request-Method: * X-Powered-By: Phusion Passenger 5.2.1 Strict-Transport-Security: max-age=63072000; includeSubDomains; preload Location: /wireless_modules/3195 Status: 201 Created Connection: close Transfer-Encoding: chunked Content-Type: application/json; charset=utf-8 X-Charles-Received-Continue: HTTP/1.1 100 Continue {"id":3195,"model":"MTR-LAT1-B07","serial_number":"WM20745001","manufacturer":"Multi-Tech","mfg_date":null,"iccid_esn":"89010303300012345678","ip_address":"192.168.2.11","purchase_order":null,"supplier":null,"cellular_carrier_id":3,"component_status_id":10,"component_status":{"id":10,"name":"Hold","description":"Available- Held for specific use"},"custom_attributes":[{"name":"Deactivated","type":"Boolean","value":false},{"name":"Port 3001","type":"Boolean","value":false}],"comments":[]}
Also attached is the log file. I need to read the id value. Clearly, it is arriving back to cURL, since it is being written out to the log, but I cannot seem to get to it within the code.
It is established that I may be an idiot, but this idiot has wasted days in non-billable hours trying to figure out what should be a simple glitch.
Help???
cURL_Request.html
-
By nacerbaaziz
goodmorning; autoit team
please their are any youtube search way working?
because i was using the get source and split it to get the result but know it does not working any way.
is the youtube disabled that? and is their any other simple way to do that?
i tested all examples found in this post but also it don't work
https://www.autoitscript.com/forum/topic/123945-youtube-search/
and here is the example that i use to and it don't work any more
local $hSearchOpenHNDL, $hSearchConnect, $sSearchGet local $a_UrlsArray[1][5] local $b_ButtonsDisabled = false, $b_SearchBTNFocus = false, $b_SearchListFocus, $h_SearchFocusHND local $Return = "0" local $s_OpenStringY = "/feed/trending" local $ChannelUrl = "", $channelName = "" if Not ($a_YoutubeSearchArray[0][0] = 0) then GUICtrlSetData($searchInp, $s_youtubeSearchLastSearch) $s_OpenStringY = "/results?search_query=" & StringReplace(GUICtrlRead($searchInp), " ", "+") $a_UrlsArray = $a_YoutubeSearchArray for $i = 1 to $a_UrlsArray[0][0] _GUICtrlListBox_AddString($SearchList, $a_UrlsArray[$i][0] & $a_UrlsArray[$i][2] & $a_UrlsArray[$i][3]) next _GUICtrlListBox_SetCurSel($SearchList, $I_youtubeSearchLastIndex-1) GUICtrlSetState($SearchList, $GUI_focus) else if Ping("youtube.com", 1000) > 1 then $hSearchOpenHNDL = _WinHttpOpen('') if not (@Error) then $hSearchConnect = _WinHttpConnect($hSearchOpenHNDL, "youtube.com") if Not (@Error) then $sSearchGet = _WinHttpSimpleRequest($hSearchConnect, "get", $s_OpenStringY) if not (@Error) then local $a_strings = _StringBetween($sSearchGet, '<a href="/watch', "<ul") local $title = "" local $url = "" local $length = "" local $result = "" GUICtrlSetData($SearchList, "") ReDim $a_UrlsArray[1][5] for $i = 0 to UBound($a_strings)-1 $url = _StringBetween($a_strings[$i], "?", '"') if @error then ContinueLoop $url = "https://www.youtube.com/watch?" & $url[0] $title = _StringBetween($a_strings[$i], 'dir="', '</a>') if @error then ContinueLoop $title = $title[0] $title = StringRegExpReplace($title, '(.*\"\>)', "") if StringRegExp($a_strings[$i], '[0-9]{1,2}\:[0-9]{1,2}\:[0-9]{1,2}', 0) = 1 then $length = StringRegExp($a_strings[$i], '[0-9]{1,2}\:[0-9]{1,2}\:[0-9]{1,2}', 2) elseIf StringRegExp($a_strings[$i], '[0-9]{1,2}\:[0-9]{1,2}', 0) = 1 then $length = StringRegExp($a_strings[$i], '[0-9]{1,2}\:[0-9]{1,2}', 2) else $length = "" endIf if IsArray($length) then $length = ": (" & $length[0] & ")" else $length = "" endIf $ChannelUrl = stringRegexpReplace($a_strings[$i], '(^.*?<a.*?\"(\/user|\/channel))+', "$2") $channelName = stringRegexpReplace($ChannelUrl, '(.*?\".*?>)(.*</a>)+', "$2") $ChannelUrl = stringRegexpReplace($ChannelUrl, '(\".*)+', "") $channelName = stringRegexpReplace($channelName, '(</a>.*)+', "") $result &= $title & @crlf & $url & @crlf ReDim $a_UrlsArray[UBound($a_UrlsArray)+1][5] $a_UrlsArray[UBound($a_UrlsArray)-1][0] = $title $a_UrlsArray[UBound($a_UrlsArray)-1][1] = $url $a_UrlsArray[UBound($a_UrlsArray)-1][2] = $length if not ($channelName = "") then $a_UrlsArray[UBound($a_UrlsArray)-1][3] = ", (" & $channelName & ")" if not ($channelUrl = "") then $a_UrlsArray[UBound($a_UrlsArray)-1][4] = "https://www.youtube.com" & $channelUrl $a_UrlsArray[0][0] = UBound($a_UrlsArray)-1 _GUICtrlListBox_AddString($SearchList, $a_UrlsArray[UBound($a_UrlsArray)-1][0] & $length & $a_UrlsArray[UBound($a_UrlsArray)-1][3]) next endIf endIf endIf endIf endIf
i hope any one can help me
thanks in advance
-
By ripdad
This is a project that I have been working on for several months off and on.
It's a simple "What You Hear" MP3 @ 320Kbps and WAV audio recorder.
Features:
- LoudMax, a Gain Controller and Look-Ahead Limiter
- Auto Shut-Off after one minute of silence
- Side-by-Side Simulated LED Meter
- Running Time Counter
It started off being a large project, but I eventually stripped it down to its
bare essentials because I came to realize that it would be very difficult to
deal with every sound card and every way a PC is set up for audio. It would
have been a nightmare that I was not willing to go through.
This project contains the most up-to-date BASS.dll v.2.4.15.0 - December 17, 2019.
All BASS Dll's are 32bit. Those and the needed UDF's are included in the zip file.
I will try to explain how it works in the next post.
Download:
BASS VST Recorder v1.1.zip
-
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now