Leaderboard
Popular Content
Showing content with the highest reputation on 01/17/2016 in all areas
-
Simple snowfall using GDI+ & ASM. Thanks to Eukalyptus for the ASM codes. If the script runs too slow reduce the amount of flakes in line 115. You can switch now between local MP3 stream and internet stream. Further you can also set the scrolling text. Command line options: -local "<path to local MP3 file>" -url "<URL to a MP3 file>" -text "<your individual text>" Max. text length are 500 chars. Don't forget the double quotes after the parameters! Download: click me Happy snowing and romantic moments...2 points
-
here you can find nice free music... http://incompetech.com/ for those who like classic christmas music here is a link to go: http://incompetech.com/music/royalty-free/mp3-royaltyfree/We%20Wish%20You.mp3 i like this as background... http://incompetech.com/music/royalty-free/mp3-royaltyfree/OctoBlues.mp32 points
-
Hello Community, here's the latest update on... SMF - Search my Files Current Version: v17 (2024-Oct-20) SMF - Search my Files features A good looking GUI, Search files by location, Search files and / or folders, Poll [-]File names and Locations in Long and Short (8.3) format, [-]File Extensions, [-]File Times (modified, created, accessed), [-]File size, [-]File Attributes, [-]File Extended Attributes, Filter by [-]Extension, [-]Attribute, [-]File size, [-]File time, Free Name filtering by usage of RegEx, GUI designed to fit to 800x600 desktops with Tab-Design Nice looking Icon Minimize to Tray (also while searching) Export Result to CSV-file Export Result to XML-file Save & Load search runs Build Tree for local Computer on StartUp, add NetworkDrives optional A separate Report-GUI [-]Pre-Select output columns [-]SQLite driven [-]Dynamically generated statements, fully user adjustable [-]Dynamically sub filtering of results on the fly [-]Results can be executed directly, starting with the default associated program (ShellExcecute) [-]Select Results by drag, copy selected URIs to clipboard [-]Copy, move, delete or Erase results or subset of results md5 driven Duplicate file finder [-]High-Performance [-]added trimmed md5 short calculation (false md5, but sufficient for dup-search and a great speed improvement!) [-]Search 30.000 pics for dups in 1min 30secs Added many other ideas (some not activated / implemented yet) Limitations / Bugs / ToDos Lots and lots of unnecessary Global Variables Ugly code PLUS violations of any coding principal known to man... But hey, thats why I release the source, so that YOU help me to further improve SMF... SMF works fine at least on the 32bit XP SP3 and 64bit Win7/Win8/Win10 machines and I've tested it on. If you find bugs please let me know. Thanks to my sweet girlfriend for reviewing, giving new ideas and having so much patience with me :-*. Thanks to Jon, Larry, Jos, Valik, Jpm, Melba23 and Trancexx and for creating AutoIt and maintaining the forum. And finally thanks to all these great guys from the forum, providing excellent UDFs, snippets of code I use in SMF or help and feedback: Achilles, Ascend4nt, Ed_Maximized, Elgabionline, Erik Pilsits (Wraithdu), Eukalyptus, Gafrost, Holger Kotsch, Jarvis J. Stubblefield (JSThePatriot), Jos, Lahire Biette, Lazycat, Lod3n, Prog@ndy, Ptrex, Rasim, RazorM, RobSaunders, Sean Hart, Siao, Simucal, Smashly, SmOke_N, Teh_hahn, Valik, Ward, WideBoyDixon, Yann Perrin, Yashied & Zedna. Please let me know if you found some piece of code in the source for which I forgot to mention a credit. The executable and the source can be downloaded from my site: https://funk.eu Enjoy, let me know what you think of SMF and with Best Regards1 point
-
Introduction JSON (Javascript Object Notation) is a popular data-interchange format and supported by a lot of script languages. On AutoIt, there is already a >JSON UDF written by Gabriel Boehme. It is good but too slow, and not supports unicode and control characters very well. So I write a new one (and of course, fast one as usual). I use a machine code version of JSON parser called "jsmn". jsmn not only supports standard JSON, but also accepts some non-strict JSON string. See below for example. Important Update!! I rename the library from jsmn.au3 to json.au3. All function names are changed, too. Decoding Function Json_Decode($Json) $Json can be a standard or non-standard JSON string. For example, it accepts: { server: example.com port: 80 message: "this looks like a config file" } The most JSON data type will be decoded into corresponding AutoIt variable, including 1D array, string, number, true, false, and null. JSON object will be decoded into "Windows Scripting Dictionary Object" retuned from ObjCreate("Scripting.Dictionary"). AutoIt build-in functions like IsArray, IsBool, etc. can be used to check the returned data type. But for Object and Null, Json_IsObject() and Json_IsNull() should be used. If the input JSON string is invalid, @Error will be set to $JSMN_ERROR_INVAL. And if the input JSON string is not finish (maybe read from stream?), @Error will be set to $JSMN_ERROR_PART. Encoding Function Json_Encode($Data, $Option = 0, $Indent = "\t", $ArraySep = ",\r\n", $ObjectSep = ",\r\n", $ColonSep = ": ") $Data can be a string, number, bool, keyword(default or null), 1D arrry, or "Scripting.Dictionary" COM object. Ptr will be converted to number, Binary will be converted to string in UTF8 encoding. Other unsupported types like 2D array, dllstruct or object will be encoded into null. $Option is bitmask consisting following constant: $JSON_UNESCAPED_ASCII ; Don't escape ascii charcters between chr(1) ~ chr(0x1f) $JSON_UNESCAPED_UNICODE ; Encode multibyte Unicode characters literally $JSON_UNESCAPED_SLASHES ; Don't escape / $JSON_HEX_TAG ; All < and > are converted to \u003C and \u003E $JSON_HEX_AMP ; All &amp;amp;amp;s are converted to \u0026 $JSON_HEX_APOS ; All ' are converted to \u0027 $JSON_HEX_QUOT ; All " are converted to \u0022 $JSON_PRETTY_PRINT ; Use whitespace in returned data to format it $JSON_STRICT_PRINT ; Make sure returned JSON string is RFC4627 compliant $JSON_UNQUOTED_STRING ; Output unquoted string if possible (conflicting with $JSMN_STRICT_PRINT) Most encoding option have the same means like PHP's json_enocde() function. When $JSON_PRETTY_PRINT is set, output format can be change by other 4 parameters ($Indent, $ArraySep, $ObjectSep, and $ColonSep). Because these 4 output format parameters will be checked inside Jsmn_Encode() function, returned string will be always accepted by Jsmn_Decode(). $JSON_UNQUOTED_STRING can be used to output unquoted string that also accetped by Jsmn_Decode(). $JSON_STRICT_PRINT is used to check output format setting and avoid non-standard JSON output. So this option is conflicting with $JSON_UNQUOTED_STRING. Get and Put Functions Json_Put(ByRef $Var, $Notation, $Data, $CheckExists = False) Json_Get(ByRef $Var, $Notation) These functions helps user to access object or array more easily. Both dot notation and square bracket notation can be supported. Json_Put() by default will create non-exists objects and arrays. For example: Local $Obj Json_Put($Obj, ".foo", "foo") Json_Put($Obj, ".bar[0]", "bar") Json_Put($Obj, ".test[1].foo.bar[2].foo.bar", "Test") Local $Test = Json_Get($Obj, '["test"][1]["foo"]["bar"][2]["foo"]["bar"]') ; "Test" Object Help Functions Json_ObjCreate() Json_ObjPut(ByRef $Object, $Key, $Value) Json_ObjGet(ByRef $Object, $Key) Json_ObjDelete(ByRef $Object, $Key) Json_ObjExists(ByRef $Object, $Key) Json_ObjGetCount(ByRef $Object) Json_ObjGetKeys(ByRef $Object) Json_ObjClear(ByRef $Object) These functions are just warps of "Scripting.Dictionary" COM object. You can use these functions if you are not already familiar with it. == Update 2013/05/19 == * Add Jsmn_Encode() option "$JSMN_UNESCAPED_ASCII". Now the default output of Json_Encode() is exactly the same as PHP's json_encode() function (for example, chr(1) will be encoded into u0001). $JSON_UNESCAPED_ASCII ; Don't escape ascii charcters between chr(1) ~ chr(0x1f) == Update 2015/01/08 == * Rename the library from jsmn.au3 to json.au3. All function names are changed, too. * Add Json_Put() and Json_Get() * Add Null support * Using BinaryCall.au3 to loading the machine code. == Update 2018/01/13== (Jos) * Add JsonDump() to list all Json Keys and their values to easily figure out what they are. == Update 2018/10/01== (Jos) * Fixed JsonDump() some fields and values were not showing as discussed here - tnx @TheXman . == Update 2018/10/01b== (Jos) * Added Json_ObjGetItems, Tidied source and fixed au3check warnings - tnx @TheXman . == Update 2018/10/28== (Jos) * Added declaration for $value to avoid au3check warning - tnx @DerPensionist == Update 2018/12/16== (Jos) * Added another declaration for $value to avoid au3check warning and updated the version at the top - tnx @maniootek == Update 2018/12/29== (Jos) * Changed Json_ObjGet() and Json_ObjExists() to allow for multilevel object in string. == Update 2019/01/17== (Jos) * Added support for DOT notation in JSON functions. == Update 2019/07/15== (Jos) * Added support for reading keys with a dot inside when using a dot as separator (updated) == Update 2021/11/18== (TheXman) * Update details in below post: == Update 2021/11/20== (TheXman) * Minor RegEx update, no change to the functionality or result._Json(2021.11.20).zip1 point
-
error471, As I explained above, I will not be adding such functionality to the UDF itself (it is already complex enough) but I believe it will be possible to use it along with some custom code to let you produce something along the lines of the above. I will start looking into how it might be done tomorrow. And as mentioned I will split off these posts into a separate thread as they will not be concerned with the UDF proper, so do not be surprised if this thread suddenly appears a little empty! M231 point
-
Buzbee, If you are using a recent version of AutoIt you need to add the following directive to allow a compiled exe to run an external script: #pragma compile(AutoItExecuteAllowed, True) By default this functionality is now disabled. M231 point
-
Thank you BrewManNH, BetaLeaf, and jdelaney for the help. Func LoadPID() SplashTextOn($app_name & " Monitor", $app_name & " not running!" & @CRLF & "Please wait for it to reload!", 250, 75, -1, -1, $DLG_TEXTVCENTER, "", 12) Global $iPID = Run($app_path) Sleep($tick*1000) If ProcessExists($proc_name) Then Sleep($tick*1000) SplashOff() EndIf EndFunc Func MonPID() Global $proc_list = ProcessList($proc_name) For $i = 1 To $proc_list[0][0] If Not ($proc_list[$i][1] = $iPID) Then ProcessClose($proc_list[$i][1]) Next EndFunc Im currently using these functions to run and monitor the process. Had a problem properly getting the PID of the process if it was running before the script executes, to work around that I check for the process at script launch and if its running it will close the process and then run LoadPID() Everything I am trying to accomplish has been working, with the exception of calling to execute "script2.au3" script from "script1.au3". It works in the editor just fine but it will not run "script2.au3" from a compiled "script1.exe". For now I compile both scripts and call to the exe and not the au3.1 point
-
#Include <Array.au3> $delim = "?" Local $sDays = "Mon?Tues?Wed?Thur?Fri.Sat?Sun" Local $aDays = StringRegExp($sDays, '\w+(?=\Q' & $delim & '\E|$)', 3) _ArrayDisplay($aDays)1 point
-
May I say, you also can do it with AutoIt And using a SQLite db instead of a .ini is a really nice idea1 point
-
Program doesn't write to files
Wicked_Caty reacted to water for a topic
The default mode for FileOpen is $FO_READ. To write to a file you need to set the mode: #include <FileConstants.au3> $f = FileOpen("Your filename goes here", $FO_APPEND) ; Or $FO_OVERWRITE if you always want to overwrite an existing file1 point -
Program doesn't write to files
Wicked_Caty reacted to water for a topic
The help file explains what is returned by a function in case of an error. Example: $f = FileOpen(...) $If $F = -1 Then ... ; An error has occurred $fw = FileWrite(...) If $fw = 0 Then .. ; An error has occurred1 point -
Like most people before you who have asked @Jon or the AutoIt core team when something is done, it's done when it's done. Is that a good enough answer?1 point
-
In the following case the script isn't flagged as a virus but the problem is caused by an AV software: You run Trend Micro AV software.You get an AutoIt error message when running the script telling you "Unable to open the script file".The size of this exe is a few kilobyte smaller then that of a working exe.You do not get any error messages when compiling the script. Neither from Aut2xe nor from Trend Micro.The problem - in my case - was caused by Trend Micro's Behavior Monitoring. To solve the problem you simply have to disable this feature for Aut2Exe.exe. Seemed that logging was disabled for the Behavior Monitoring as well (by default?) so we didn't find anything in the TM logs. Details can be found in the following thread:1 point