Leaderboard
Popular Content
Showing content with the highest reputation on 04/22/2017 in all areas
-
WHAT : is .NET Common Language Runtime (CLR) Framework The Common Language Runtime (CLR) is a an Execution Environment . Common Language Runtime (CLR)'s main tasks are to convert the .NET Managed Code to native code, manage running code like a Virtual Machine, and also controls the interaction with the Operating System. As part of Microsoft's .NET Framework, the Common Language Runtime (CLR) is managing the execution of programs written in any of several supported languages. Allowing them to share common object-oriented classes written in any of the languages. HOW : To access the CLR environment you need to create an Appdomain Object - _CLR_GetDefaultDomain() An AppDomain provides an isolated region in which code runs inside of an existing process. Application domains provide an isolation boundary for security, reliability, and versioning, and for unloading assemblies. Application domains are typically created by runtime hosts, which are responsible for bootstrapping the common language runtime before an application is run. WHEN : Would you use CLR Runtime Hosts 1. To access .NET Class Libraries : System System.Collections System.Data System.Drawing System.IO System.Text System.Threading System.Timers System.Web System.Web.Services System.Windows.Forms System.Xml 2. Accessing custom build .Net Assemblies : Some Examples (but there are a ton out there) AutoItX3 - The .NET Assembly for using AutoItX JSonToXML libr. XMLRPC Libr. .NETPDF libr. .NETOCR Libr WInSCP Libr. ... 3. To Compile .Net Code into an Assembly 4. To Run C# or VB.net Code 5. To Mix AU3 and .Net functionality in your Application WHERE : To find documentation about CLR First of all you can find a lot on MSDN and here : Post 4 & Post 6 EXAMPLES : Multiple examples included in Zip !! Example : “System.Text.UTF8Encoding” Example : “System.IO.FileInfo” Example : “System.Windows.Forms” Example : AutoItX3 Custom .NET Assembly AutoItX Example : Compile Code C# and Code VB Example : Compile Code C# at Runtime WHO : Created the CLR.au3 UDF All credits go to : Danyfirex / Larsj / Trancexx / Junkew TO DO : The library is still Work in Process … (Some of the GUI Controls are not yet working as expected...) Anyone is free to participate in contributing to get the bugs resolved and to expand the CLR.au3 functionality ... Enjoy !! DOWNLOADS : (Last updated) - added CLR Constants.au3 - Danyfirex - Global Constants added (Magic numbers) - added .NET CLR CreateObject vs ObjCreate Example.au3 - Junkew • 2 approaches give the same result (only valid for COM Visible Assembly) • Includes a function that shows you which Assembly Classes are COM Visible - added .Net Conventional COM Objects Examples - ptrex - added .NET CLR CreateComInstanceFrom Example - Danyfirex - You can use it for Regfree COM Assembly Access - System.Activator has 4 methods : • CreateComInstanceFrom : Used to create instances of COM objects. • CreateInstanceFrom : Used to create a reference to an object from a particular assembly and type name. • GetObject : Used when marshaling objects. • CreateInstance : Used to create local or remote instances of an object. - added .NET Access SafeArrays Using AccVarsUtilities Example - LarsJ - added SafeArray Utilities functions in Includes - LarsJ - added .NET Access Native MSCorLib Classes - System - ptrex Multiple System Class Examples : • System.Random • System.DateTime • System.Diagnostics.PerformanceCounter • System.IO.FileInfo • System.Int32 • System.Double • System.Speech • System.Web - added Third Party Assembly Access - ptrex • WinSCP : https://winscp.net/eng/download.php • IonicZip : http://dotnetzip.codeplex.com/ - added more Examples using PowerShell GUI Assembly Access - ptrex • GUI Ribbon .NET Assembly using CLR Library • GUI Report Designer .NET Assembly using CLR Library • GUI SSRS Reporting .NET Assembly using CLR Library CLRv3a.zip .NET CLR Framework for AutoIT.pdf3 points
-
AutoIt GUI Creators (Designers)
nguyentoannta3 reacted to TheSaint for a topic
As many of you may not be aware, of much about AutoIt's humble beginnings, and aspects related to the first GUI version of AutoIt, I thought it might be nice to create a historical reference here for all the many GUI creators that have been created by various people over the years. NOTE - While one could argue, that this topic might be better placed in one of the Chat forums, I would argue, that it links to heaps of good code. While much may be redundant in that code, it is still interesting and forms a great perspective. Many are bound to find useful elements at the very least. Koda, is no doubt the most well-known GUI creator now, but there was a time, when CyberSlug's legendary GUIBuilder (first known as AutoBuilder) ruled the roost, and AutoIt coder's saw it as a Godsend. AutoIt coding was much simpler back then of course. Below, will be a timeline, of any AutoIt GUI creators listed in forum pages. It will be added to by myself as I find them or as others here find them and place a link in a subsequent post ... PLEASE HELP! Comments welcome too. (Also note, that this is also intended to include updates, branches etc by others) Apr 20 2004 - AutoBuilder by CyberSlug. Sep 27 2004 - An interesting topic, where CyberSlug talks about the future of AutoBuilder (etc) and renaming to GUIBuilder and you see the first mentions and links to updates by others (including myself & livewire). Nov 05 2004 - A topic where lookfar is working on a SciTE replacement, talks about starting a Form Designer. Aug 10 2005 - GuiBuilder first update by TheSaint. Sep 26 2005 - GUIBuilder updates by livewire (he also talks about transferring his efforts to Koda). Nov 02 2005 - KODA FormDesigner v1.3 by lookfar Nov 03 2005 - Seemingly interesting topic about forms by tonedeaf Dec 26 2005 - AutoIt Studio(beta) by BillLuvsU Jan 09 2006 - AutoBuilder update (or branch) by _^__darkbytez (livewire also posts). Feb 19 2006 - Koda v1.5 by lookfar Sep 07 2006 - Koda v1.7.3.0 by Lazycat Jan 07 2007 - Form/GUI Builder by FlintBrenick Jun 10 2007 - Gorganizer by _Kurt (more of an assister than actual GUI maker) Jun 27 2007 - Basic GUI Designer by Mast3rpyr0 May 03 2008 - Autoit Programmer's Desktop (APD) by Ealric Jul 11 2008 - Gui Designer by Alek Aug 11 2008 - Gorganizer update by _Kurt Jun 19 2009 - Easy GUI by Mat Aug 13 2009 - GUI Script Creator by Pandemic (not sure this qualifies, but it made me think of templates) Aug 16 2010 - Creation Gui by AZJIO Jan 22 2012 - ISN AutoIt Studio by ISI360 (includes ISN Form Studio 2, a GUI editor) Mar 19 2012 - Arduino GUI Programmer by nikosliapis (creates a specific type of GUI) Aug 01 2012 - GuiBuilder Resurrected update/branch to GUIBuilder by baroquebob Dec 01 2012 - Form Builder beta (v1.0.6) by BuckMaster Jan 12 2015 - GUIBuilderNxt update by jaberwacky of GUIBuilder v0.8 (as a new prototype, modified to work with latest AutoIt) (not a update to the Resurrected version) Aug 12 2016 - The GuiBuilder Return by DFerrato as an update to GUIBuilder, Jan 17 2017 - GUIBuilder Project by TheSaint (a work in progress based on CyberSlug's original ... and later versions, updated by Roy, TheSaint & others). May 29 2019 - The GuiBuilder Return by DFerrato as an update to GUIBuilder, His new and improved version. May 9 2022 - GuiBuilderPlus by kurtykurtyboy as an update to GUIBuilder. A new an improved version with more to come. There are a significant number of creators/designers that have been started and never completed. +++++ STILL UNDER CONSTRUCTION +++++ P.S. Well that's it from me tonight. I know of at least one other major creator, but cannot recall it's name or the name of the coder, though I think it starts with 'L'. Bound to be a few I've missed, and some I cannot seem to find their first appearance here (Koda, Form Builder, etc), but there may be an obvious reason for that. Will probably rely on feedback from others now that I've got the ball rolling. NOTE - If anyone wants to discuss any of these programs above or give some background history, then by all means do so. I will cross-reference (link to) any important comments.1 point -
Some of you might find this little program I whipped up yesterday, to be useful. I had a need and it was filled. It is pretty basic and I admit was pretty much slapped together speedily and then fine tuned some time later, and could certainly do with more improving, if you care to do so. Thanks to Jefrey for his 'parse.au3' for the PHP elements. Source found here. I also used my Dropbox code, found here. Gutenberg Project page I used for the screenshot - http://www.gutenberg.org/ebooks/1965 One of their links looks like - http://www.gutenberg.org/ebooks/1965.epub.images?session_id=5932cd1d25afee6150a958323abd8a32d68249a7 V1.3 v1.6 v2.0 Basically, the Download Dropbox program aims to simplify and speed up downloading of files, with Batch and easy sub-folder creation. Everything in the program is done by either Drag & Drop or clicking a button. Window floats on top of others, naturally. 1. Drag a folder to the Destination input field to set the destination path. 2. Highlight some text, then drag that text to the drop zone (top edit field), to create the first sub-folder (if you want one). Click the SUB FOLDER button to assign it. 3. Do the same for the next sub-folder (if you want one or instead of the other sub folder). Click the TITLE button to assign it. 4. Select and drag a link (URL) to the drop zone. Click the ADD button to have it added to the Download list (last field). 5. Repeat for more files, that you wish to send to the same destination. 6. Click the DOWNLOAD button to have them start downloading. If size of each download can be determined, you will see the Progress bar working. All the buttons & List have a CTRL key feature, some also have a SHIFT key one. See the Program Information dialog for details. Drop zone and other inputs, can also be typed or pasted into. Some settings are saved to INI file and recalled on subsequent executions or the click of a button with CTRL held down. NOTE - I particularly like the Text Drag ability, as that simplifies things when doing lots of sub-folders. No browsing required. ADVICE - Clicking an entry in the list field, will momentarily display its full link text in the drop zone. Entries on the List are not sorted, so they appear in the order added. Obviously I wanted the program to take up as least desktop space as feasible, so that means truncated list entries etc. WARNING - Before doing a bunch of links from a site, where the links are not straight forward, do a test run of one. Especially as there is currently no STOP button. Downloads Dropbox v2.1.zip (see Post #11 for detail) (see Post #7 for a GOG example) OLDER DOWNLOADS IMPROVEMENTS & LIMITATIONS I have tailored certain elements for Gutenberg Project downloads and another site or two, so things will not work out-of-the-box for all possible download sites. That means you will have to tweak the code for some sites. Straight forward download links (no tricky php) seem to work fine. In particular, while what you might want to get downloads fine, it may be missing the file extension and not have the desired name. Sometimes, if you drag & drop an image onto the drop zone, the image will display there, and you cannot grab its URL. In those cases, I just right click the original image, grab its URL and paste that into the drop zone. You can clear the displayed image (and any other entry in the drop zone) by holding down CTRL while clicking the DOWNLOAD button. At this stage, you can only batch download files that you want, to the same destination. I am considering adding a multiple destination ability. Need to add a STOP button. P.S. This is my first second full program with the latest AutoIt.1 point
-
Hi @LerN. Doesn't IniWrite fulfill your problem? $readCaseFile = IniRead("Names.txt","name2","Case","") IniWrite("Names.txt", "name2", "Case", "Replaced") If not, _ReplaceStringInFile is troublesome, if you do not first find the precise point of the match, in case of multiple matches.1 point
-
You can ignore this error. It is caused by the Excel UDF function _Excel_Open() which by default tries to open an existing instance of Excel before creating a new Excel instance. The error is raised when _Excel_Open() tries to open an instance of Excel that does not exist before opeing a new instance. Since you want a new instance you could change Local $oAppl = _Excel_Open() to Local $oAppl = _Excel_Open(True,False,True,True,True)1 point
-
help with a software array
232showtime reacted to Subz for a topic
What about something like: #include <Misc.au3> Local $sRegUninstall32 = "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\" Local $sRegUninstall64 = "HKLM64\Software\Microsoft\Windows\CurrentVersion\Uninstall\" _RegSearch($sRegUninstall32, "AutoIt v3.3.14.2", "3.3.14.2") _RegSearch($sRegUninstall64, "AutoIt v3.3.14.2", "3.3.14.2") Func _RegSearch($sRegHive, $sDisplayName, $sDisplayVersion) Local $i = 1, $sRegKey While 1 $sRegKey = RegEnumKey($sRegHive, $i) If @error Then ExitLoop If RegRead($sRegHive & $sRegKey, "DisplayName") = $sDisplayName Then If _VersionCompare(RegRead($sRegHive & $sRegKey, "DisplayVersion"), $sDisplayVersion) = 0 Then MsgBox(48,'Equal Version', $sDisplayName & " " & $sDisplayVersion & " is up-to-date.") ElseIf _VersionCompare(RegRead($sRegHive & $sRegKey, "DisplayVersion"), $sDisplayVersion) = 1 Then MsgBox(48,'Greater Version', "You have a later version then " & $sDisplayName & " " & $sDisplayVersion) ElseIf _VersionCompare(RegRead($sRegHive & $sRegKey, "DisplayVersion"), $sDisplayVersion) = -1 Then MsgBox(48,'Lesser Version', "Your version of " & $sDisplayName & " " & $sDisplayVersion & " is out of date.") EndIf EndIf $i += 1 WEnd EndFunc1 point -
Listview search
LerN reacted to InunoTaishou for a topic
Instead of searching through the text store all of the data from the listview in an array and populate the listview with the array. Then you just search for the array, not the listview. This will help with the performance since it doesn't have to access the listview data and instead will use the array. It's not a huge deal when you're only dealing with a few hundred items but when you get into the thousands, trying to use _FindText is going to be noticeably slow. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <WindowsConstants.au3> #include <Guilistview.au3> Global $aDatabase[0] For $i = 1 to 30 _ArrayAdd($aDatabase, "Name" & $i) Next $Form1 = GUICreate("Form1", 615, 352, 192, 124) $ListView1 = GUICtrlCreateListView("Names", 0, 40, 610, 310) $Input1 = GUICtrlCreateInput("", 224, 8, 177, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER)) $Button1 = GUICtrlCreateButton("Search", 409, 8, 111, 25) GUISetState(@SW_SHOW) _GUICtrlListView_SetColumnWidth($ListView1,0,200) _Load() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 _Search(GUICtrlRead($Input1)) EndSwitch WEnd Func _Load() For $i = 0 to UBound($aDatabase) - 1 _GUICtrlListView_AddItem($ListView1, $aDatabase[$i]) Next EndFunc Func _Search($sValue) If ($sValue = "") Then Return For $i = 0 to UBound($aDatabase) - 1 If ($aDatabase[$i] = $sValue) Then ; $i + 1 because the array is 0 based but the listview rows are 1 based ConsoleWrite("Found '" & $sValue & "' on row & " & ($i + 1) & @LF) EndIf Next EndFunc1 point -
Please note haven't tested this but it should work, at the top of your script add something like: Global $Search = -1 In your _Search() function use: $Search = _GUICtrlListView_FindText($ListView1, Guictrlread($Input1), $Search) This should now iterate through each search starting at the last Search index You should probably Add a button "New Search" or a "Reset" button to reset the $Search back to -1 when searching for something different. Hopefully that makes sense.1 point
-
Opencv UDF
232showtime reacted to Jos for a topic
Seems I wan't clear enough. Thread split of and done with the insults. *Click* Jos1 point -
Stuck in BackupPC script
KickStarter15 reacted to benners for a topic
I have re wrote the code and it is a lot cleaner and simpler now. The above faults are fixed and the files are no longer written to the ini file which has improved the programs speed considerably. Test it against the code that does use ini and you'll see The check box for av files works and these are not copied if selected. You can select multiple extra folders by clicking the browse again and selecting another folder Let me know how you get on. Benners.au31 point -
How Server can connect to client over the internet with tcp
AlexFing17 reacted to spudw2k for a topic
Well, you mentioned No-Ip, so you would/could use that to tie your external IP to a Domain Name (URL). Then it's just a matter of configuring your home router/firewall to do either port forwarding or triggering. Instead of the period "." (denotes local), you should be able to replace it with an IP or resolvable hostname (Domain Name).1 point -
SleepUntil - Sleep until condition is met
InunoTaishou reacted to TheSaint for a topic
After looking at that same topic, I was almost inspired to do my own SleepUntil function, but figured it was hardly worth it really, as it would have just been milliseconds based. Many of us I am sure, have such things in some of our scripts/programs, as it is pretty simple to whip it up on the fly. Your script though is something else altogether, so kudos to you for all that work and ingenuity. Thanks for sharing.1 point -
Search Autoit help file for IE functions and look at the examples provided for each function, some examples you may be interested in: https://www.autoitscript.com/autoit3/docs/libfunctions/_IEBodyReadText.htm https://www.autoitscript.com/autoit3/docs/libfunctions/_IEBodyReadHTML.htm https://www.autoitscript.com/autoit3/docs/libfunctions/_IEBodyWriteHTML.htm1 point
-
GUI CREATION RELATED I think it is worth adding some elements that have an impact on how GUI's are created. I am not specifically looking for these tools or addons etc, so please advise if you think something belongs here, as I will just add what attracts my notice. NOTE - I'm getting the notion, that it could become hard to draw a line with these, and we might end up with an awful lot. Definitely a handy reference though. Sep 24 2004 - GUI Dev Stuff by Jon (back where it all started to happen in earnestness) Sep 10 2006 - XSkin.au3... Skin your GUI by Valuater Oct 24 2006 - ShapedGUI Creator by Ed_Maximized Feb 19 2007 - EzSkin_1-2-3 by Valuater Mar 02 2007 - _GuiCreateGrid() by MrCreatoR Jun 14 2007 - PNG as GUI, drop shadows, curved edges, you name it by lod3n (think this qualifies) May 10 2008 - How to convert GUI scripts to v3.2.12.0 by Jon Jun 10 2008 - PNG as GUI, drop shadows, curved edges etc UDF by goldenix Sep 08 2008 - _GUIFrame UDF by kip Dec 31 2008 - Perforated image in GUI by GreenCan Mar 08 2009 - Add a drop shadow to native AutoIt GUI Forms and Dialogs by rover Jun 21 2009 - A runtime control move/re-size utility by Malkey Sep 25 2009 - Multiple PNG images as GUI elements by JRowe (seemingly qualifies) Aug 01 2010 - GUIExtender - Original version by Melba23 Sep 10 2010 - GUIFrame UDF update by Melba23 Mar 09 2011 - _GUIDisable UDF by guinness Dec 19 2011 - Tab control example: Tabs and subtabs on demand by LarsJ Sep 09 2012 - GUISpoiler UDF by MrCreatoR Oct 19 2012 - GUIExtender - New Version by Melba23 Dec 25 2012 - GUI design concepts by guinness Jan 15 2014 - GUI Fun! by Ascend4nt Apr 24 2014 - Spotlight + Focus GUI by Ascend4nt (think this qualifies) May 7 2014 - MetroGUI UDF v4 by BBs19 Oct 09 2015 - Borderless GUI without WS_POPUP, with Drag, Resize & AeroSnap by BBs19 June 10 2023 - Glance - GUI library for AutoIt, based on Windows api by kcvinu +++++ STILL UNDER CONSTRUCTION +++++ Please Help!1 point
-
Hi All, I'm trying to create a function to do threaded pinging. I have some code I've been playing with just to see if I could get anything to work but I'm stuck and wondering if there's a guru out there who can look at this and point me in the right direction. Sorry for the sloppy code, it's very beta right now and I'm n00b to this style. I think one of my main questions here is, if I wish to call a method of a class, like Ping.Send from system.dll, how do I construct this? For now I have just been trying to GetProcAddress of Ping.Send but I have a feeling this is not how it works. I suspect I need to instantiate the Ping class first and then somehow call the method of .Send??? #Include <WindowsConstants.au3> ;Props to w0uter for this... $v_ASM = DllStructCreate( _ 'byte;int;' _ ;01~02 00401000 > 68 00000000 PUSH 64 ; TTL = 64 & 'byte;int;' _ ;03~04 00401005 . 68 00000001 PUSH Protect.00402007 ; DF Flag = true & 'byte;int;' _ ;05~06 00444448 > B8 EA04D577 MOV EAX,SYSTEM.PingOptions & 'byte;byte;' _ ;07~08 0044444D FFD0 CALL NEAR EAX ;& 'byte;int;' _ ;09~10 00401019 A2 44332211 MOV BYTE PTR DS:[11223344],AL & 'byte' _ ;09~09 0040101E C3 RETN ) DllStructSetData($v_ASM, 01, 0x68) DllStructSetData($v_ASM, 02, 64) DllStructSetData($v_ASM, 03, 0x68) DllStructSetData($v_ASM, 04, 1) DllStructSetData($v_ASM, 05, 0xB8) $hDll = DllCall('kernel32.dll', 'int', 'LoadLibrary', 'str', 'system.dll') $hProc_PingOptions = DllCall('kernel32.dll', 'int', 'GetProcAddress', 'int', $hDll[0], 'str', "PingOptions") DllStructSetData($v_ASM, 06, $hProc_PingOptions[0]) DllStructSetData($v_ASM, 07, 0xFF) DllStructSetData($v_ASM, 08, 0xD0) DllStructSetData($v_ASM, 09, 0xC3) $res = DllCall('kernel32.dll', 'int', 'CreateThread', 'int', 0, 'int', 0, 'int', DllStructGetPtr($v_ASM), 'int', 0, 'int', 0, 'int', 0) ConsoleWrite(1 & " " & $res[0] & @CRLF) $ipaddr = "74.125.53.106" $ip = DllStructCreate("char[" & StringLen($ipaddr) & "]") DllStructSetData($ip,1,$ipaddr) $data = _UnicodeStruct("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") $timeout = DllStructCreate("int") DllStructSetData($timeout,1,2000) $code = DllStructCreate("int",$res[0]) $v2_ASM = DllStructCreate( _ 'byte;int;' _ ;01~02 00401000 > 68 00000000 PUSH ... ; IP & 'byte;int;' _ ;03~04 00401005 . 68 00000001 PUSH Protect.00402007 ; Timeout & 'byte;int;' _ ;05~06 00401005 . 68 00000001 PUSH Protect.00402007 ; Data & 'byte;int;' _ ;07~08 00401005 . 68 00000001 PUSH Protect.00402007 ; Code & 'byte;int;' _ ;09~10 00444448 > B8 EA04D577 MOV EAX,SYSTEM.Ping.Send & 'byte;byte;' _ ;11~12 0044444D FFD0 CALL NEAR EAX ;& 'byte;int;' & 'byte' _ ;13~13 0040101E C3 RETN ) DllStructSetData($v2_ASM, 01, 0x68) DllStructSetData($v2_ASM, 02, DllStructGetPtr($ip,1)) DllStructSetData($v2_ASM, 03, 0x68) DllStructSetData($v2_ASM, 04, DllStructGetPtr($timeout,1)) DllStructSetData($v2_ASM, 05, 0x68) DllStructSetData($v2_ASM, 06, DllStructGetPtr($data,1)) DllStructSetData($v2_ASM, 07, 0x68) DllStructSetData($v2_ASM, 08, DllStructGetPtr($code,1)) DllStructSetData($v2_ASM, 09, 0xB8) $hProc_PingSend = DllCall('kernel32.dll', 'int', 'GetProcAddress', 'int', $hDll[0], 'str', "Ping.Send") DllStructSetData($v2_ASM, 10, $hProc_PingSend[0]) DllStructSetData($v2_ASM, 11, 0xFF) DllStructSetData($v2_ASM, 12, 0xD0) DllStructSetData($v2_ASM, 13, 0xC3) $res2 = DllCall('kernel32.dll', 'int', 'CreateThread', 'int', 0, 'int', 0, 'int', DllStructGetPtr($v2_ASM), 'int', 0, 'int', 0, 'int', 0) DllCall('kernel32.dll', 'int', 'FreeLibrary', 'int', $hDll[0]) ConsoleWrite(1 & " " & $res2[0] & @CRLF) Exit ; creates a struct for an Unicode-String Func _UnicodeStruct($text) ; Prog@ndy Local $s = DllStructCreate("wchar[" & StringLen($text)+1 & "]") DllStructSetData($s,1,$text) Return $s EndFuncAt this point I'm just watching my firewall logs to see if anything is going out. Thanks in advance for any help, FrozT References: MSDN Ping Class1 point