14 posts in this topic
Hello, I recently opened a bug report without reading the Helpfile... My bad . After @Melba23's gentle reminder, I was curious about why it was like that.
It is about SetError's behaviour. This is the example from the bug report:
Example() If @error Then ConsoleWrite("Error" & @CRLF) Else ConsoleWrite("No Error" & @CRLF) EndIf Func Example() SetError(1) Sleep(1000) EndFunc What I tried to do is set Example's (my user defined function's) @error value to 1... but the value set by SetError is cleared after calling a function, I wonder why? Why should calling to an external function effect my function's @error which is set when my function returns.
Setting the error of a UDF in advance by using SetError makes sense... but I cannot find a reason why calling a function should clear it? Please note that I am not talking about @error, I am talking about the @error set by my function when it ends/returns!
I hope someone can enlighten me, thanks for the answers in advance!
P.S I tried to explain my best but my English is not very good and I didn't feel like I did a good job explaining today, so please pardon any mistakes that I have made
May be some of you know Songr .
This script do the same job, it can find more mp3 files but is not as fast as Songr.
Sites used are music search engine Websites designed for LEGAL entertainment purposes only.
Thanks to Brett Francis, Prog@ndy and Eukalyptus for >Bass Udf, trancex for >WinHttp Udf and the AutoIt Community for his help.
Changes of v126.96.36.199
Three websites replaced cause they are dead or use now js.
All search engines updated ( not without difficulties for audiodump)
I use RAGrid.dll for the first listview (more fast and stable, but with some inconvenients to manage the no-edit of cells)
Input queries are saved ( the twenty latest)
I use now an mp3 pre-Load management before playing and a double progressbar for visualize pre-load and play, where you can click for directly go play in the loaded part.
Most includes needed are embedded and all external files are embedded in script with >BinaryToAu3Kompressor .
Multi downloads available with embedded downloader.exe
Changes of v188.8.131.52
Search on audiodump and myfreemp3 fixed.
Added Gui Menu.
Titles are no more editable.
New "About" with >TaskDialog (Thanks Prog@andy)
Query button permit now to check / uncheck all checkboxes
And some few fixes and cleaning.
Really more stable now.
Changes of v184.108.40.206
Dilandau is replaced by mp3chief and mp3ili by mp3clan
Search on mp3juices, baseofmp3 and soundcloud fixed.
Soso now provide m4a (aac) instead of mp3 ( m4a can be played by MSE)
Added possibility to encode automaticaly to mp3, aac or ogg ( at the end of download) using bassenc.dll and command line tools : lame, faac and oggenc.
Changes of v220.127.116.11 mp3skull fixed mp3chief fixed myfreemp3 fixed mp3clan changed to tusmp3 mp3juices changed to emp3world baseofmp3 changed to imp3 and some minor improvements.
Most previous websites used are dead or have changed the way to get links,
so instead of try to repair the previous version, i have created a complete new version.
The main tendency is the simplification :
Only one website : audiodump (Up to 500 results by request)
Script use now the little pearl created by Ward : curl.au3
It permit to create tasks (get source and get multi mp3) in asynchronous mode.
So now, no need to use several executables and no more gui who do not respond in case of connection problems.
Script use Bass.dll X86 loaded in memory for play songs.
Result is light and fast, but don't abuse of audiodump servers who are not beasts of race.
Warning : For avoid errors with curl.au3, you'll need to comment the line 63 : ;~ #Include <BinaryCall.au3>
@AutoItX64 not supported and only tested on Win7X64 and Win8.1X64.
As your browser, use Ctrl+w for remove the current Tab.(if there is no search or download running from it)
And also Ctrl+q for set/remove Gridlines.
Events are displayed to the bottom of the Gui.
Added a Paste Button.
Querry list is now correctly saved.
Querry Combo is now sorted in alphabetical order
After a 'No match', the next search will use the previous empty listview.
Bug when removing tabs is corrected.
Added string correction for the request that, in the previous version, was not always able to return a correct result.
A big thanks to Ward for his great UDF, and Nina my favorite tester, (who between us is also my third daughter), for his precious advices .
previous downloads : 1703
As there is no more script downloads count, source and executable are available in the downloads section
July 2017 Project Discontinued due to website changes
#cs ---------------------------------------------------------------------------- AutoIt Version: 18.104.22.168 Author: usmiv4o Script Function: AutoIt script to check if files in directory are changed. It is usefull for security contra-inteligense measures. Function Name: LoadTripwireDB() Description: Loads database (text file tripwire.txt) and compare files in /test folder for changes. compares Hash (MD5) checksums. If they are not the same starts Initial() Function Name: Initial() Description: Checks directory and makes index of files and their MD5 checksums in text file (tripwire.txt) Function Name: Hush() Description: Checks file and returns its MD5 checksum. Requirement(s): Windows XP Return Value(s): On Success - Returns true. Files are the same as before. On Failure - return false. Example: LoadTripwireDB() #ce ---------------------------------------------------------------------------- #include <Crypt.au3> #include <File.au3> #include <Array.au3> $sDir = @ScriptDir & "\Test" $sFilePath = @ScriptDir & "\tripwire.txt" Func Hush(ByRef $sFile) $sRead = FileOpen( $sFile) $dHash = _Crypt_HashData($sRead, $CALG_MD5) ; Create a hash of the text entered. ConsoleWrite("Hash of file " & $sFile & " is " & $dHash & @CRLF) EndFunc ;ConsoleWrite("Files in Dir are " & $aScriptDir & @CRLF) ;$sFilePath = @ScriptDir & "\Examples.txt" ;_FileWriteFromArray($sFilePath, $aScriptDir, 1) ;_ArrayDisplay($aScriptDir, "1D display") Func Initial() $aScriptDir = _FileListToArray($sDir) for $i = 1 To UBound($aScriptDir) - 1 $dHash = _Crypt_HashData($i, $CALG_MD5) ;ConsoleWrite("File " & $aScriptDir[$i] & " is " & $dHash & @CRLF) ConsoleWrite($aScriptDir[$i] & ":" & $dHash & @CRLF) ;Hush($aScriptDir[$i]) ;FileWrite $hFileOpen = FileOpen($sFilePath, $FO_APPEND) If $hFileOpen = -1 Then MsgBox($MB_SYSTEMMODAL, "", "An error occurred when reading the file.") EndIf FileWrite($hFileOpen, $aScriptDir[$i] & ":" & $dHash & @CRLF) Next EndFunc Func Monitor() $aScriptDir = _FileListToArray($sDir) for $i = 1 To UBound($aScriptDir) - 1 Next EndFunc Func LoadTripwireDB() $comparison_ok = false $dArray = _FileListToArray($sDir) ;directory $dArray0 = UBound($dArray) - 1 $fArray = FileReadToArray($sFilePath) ;file $fArray0 = UBound($fArray) ;_ArrayDisplay($dArray, "files array") if $dArray0 = $fArray0 Then ; are file same as recorded in txt file? ;ConsoleWrite("files in monitoring dir: " & $dArray & " = file recorded: " & $fArray0 & @CRLF & $fArray& @CRLF) for $i = 1 To UBound($dArray) - 1 ;ConsoleWrite("i = " & $i & @CRLF) $dHash = _Crypt_HashData($i, $CALG_MD5) ;binary ;$dHash = BinaryToString($dHash) $ffhash = StringSplit( $fArray[$i-1],":") $fhash = $ffhash ;ConsoleWrite("IsBinary $dHash " & IsBinary($dHash) & @CRLF) if $dHash = $fhash Then ;if compared hashes are equal ;ConsoleWrite($fhash & ":" & $dHash & " equal" & @CRLF) ;ConsoleWrite("File: " & $fhash & @CRLF & "Directory: " & $dHash & @CRLF & "equal: yes " & @CRLF) Else ;if compared hashes are not equal ;ConsoleWrite("File: " & $fhash & @CRLF & "Directory: " & $dHash & @CRLF & "equal: not " & @CRLF) ;MsgBox(0,"hash md5",$fhash & ":" & $dHash & " not equal") EndIf Next ;ConsoleWrite("hashes are equal" & @CRLF) $comparison_ok = true Else ConsoleWrite("number of files in monitoring dir are not same as recorded" & @CRLF) ConsoleWrite("directory: " & $dArray &":"& "files: " & UBound($fArray) - 1 & @CRLF) EndIf Return $comparison_ok EndFunc #main if LoadTripwireDB() = true Then ConsoleWrite(" hashes are equal " & @CRLF) ElseIf LoadTripwireDB() <> true Then ConsoleWrite(" hashes are not equal " & @CRLF) ConsoleWrite(" hashes are not equal " & @CRLF) Initial() EndIf
In this publication I will share with you a function i have written it
This function enables you to get names of days in three languages
English, French and Arabic
It automatically recognizes the language of your system
If you want, you can customize the display language you want
English = 0
Arabic = 1
French = 2
I am looking for a way to retrieve filtered messages from the ‘system debug channel.' also known as ‘kernel-mode debug output.'
AutoIt must do the capture in real time. The following AutoIt UDF almost does what is required but it only captures application level, or Win32 debug output.
The utility DebugView by Sysinternals captures the information as required by turning on Capture Kernal and in my case using the Filter include:
The use of DebugView to do this is covered in the following tech note;
However to make to make the information from DebugView available to my AutoIt script required DebugView capture to a text file and then my AutoIt script monitor that file for changes. The use of DebugView to capture the system debug channel could be made to work, but it was less than reliable and difficult to get started. The startup wasn’t something that could be easily automated not even with AutoIt.
If you understood what I am talking about and made it this far, I think an explanation of the application is in order. Lots of details here sorry trying to answer questions in advance.
I support a large installation of General Electric MUSE application. MUSE is a Windows-based medical application that processes and archives ECGs (electrocardiograms) taken on dedicated hardware (ECG Carts). Several methods exist on the cart to get the ECG from the Carts to the MUSE system; they range from floppies (on old obsolete hardware), memory cards, RS232 serial ports, and hardwired network connections.
In our installation, we choose not to use the vendor-supplied network solution due to a variety of reasons I won’t get into here. Instead, we have designed our own connection solution.
We use a wireless serial server mounted on the ECG carts connecting to a server running a Serial/IP COM Port Redirector. The ECG cart and MUSE application think they are talking to each other via an RS232 port and as far as they are concerned, they are. However, this RS232 cable happens to run through our province (think State) wide Health Care WAN. The hardware and software used can be seen on these two sites;
This setup works well we have over 130 ECG carts connecting using this setup. However, the end users are not technical, and there is a lot that can go wrong with wireless connections. So we do get complaints, often after the fact, that the ECG cart would not connect. A log of what ECG carts connected and when would be very helpful.
The Serial redirector software can be configured to log all activity to the Kernal-mode Debug output. The serial redirector software itself being kernel level software. For configuration of the Wireless modules, we have custom written software (written in AutoIt) that amongst other things can display relevant configuration information for a Wireless module given it’s IP address.
By extracting messages like the ones below from the Kernal-Mode Debug channel;
COM56 : ½ Incoming connection from 10.158.188.172:51562
COM18 : ½ Incoming connection from 10.158.188.200:50896
COM19 : ½ Incoming connection from 10.158.188.180:59074
COM68 : ½ Incoming connection from 22.214.171.124:34322
We can have the module configuration program retrieve the configuration. The retrieved configuration contains more information such as the module ID number and wireless signal strength. This information is then logged to a file which is later loaded into a database. We can then query the database for connections made by a particular module within a specified time frame. The results of these Queries help us determine if the module was connected or is having problems connecting. Problems are usually indicated by poor signal strength and frequent re-connecting.
So what I am looking for is a way for our module configuration program (written in AutoIt) to retrieve filtered Kernal-Level debug messages directly without using the DebugView application.
The Forum post listed at the first of this message includes the source code for the DLL. So if you are versed in these matters and Visual Studio this may be an easy task. I looked at what needed to be done but, I was way over my head. If you look up the price of the serial IP redirector software, you can see that there is some money in our project for such things however, I do have a spending limit for purchases such as this.