Leaderboard
Popular Content
Showing content with the highest reputation on 06/04/2020 in all areas
-
You should be assigning the result of this function to $oIE or some other variable. Otherwise, it's pointless to make this call AFAICS.2 points
-
AutoIt Loader
Professor_Bernd reacted to MrCreatoR for a file
Version 1.1
998 downloads
AutoIt Loader is basically an AutoIt environment loader that allows you to fully use AutoIt as a portable development environment. The idea is to load all the necessary AutoIt resources into the system while you work with it (there is an option to add it to autorun), allowing you to use AutoIt as if it was installed in the system, without conflict with another installed AutoIt version. The main ability is to change AutoIt version in a few clicks, and after changing the version, the whole environment adjusts to work with this version. It is also possible to “download” (update) new versions to the development environment, either from an official source or from another source on your PC. After unloading (exit from loader from system tray), all resources and registry entries are cleared completely, leaving no traces. The loader includes 4 of the most popular and critical versions of AutoIt, which were published by the largest number of changes. Also, the loader has a module called AutoIt Tools (see screenshots), which has a number of tools and utilities that are necessary for development in my opinion. AutoIt Tools loaded with the loader (can be disabled), and appears when the mouse cursor is in the lower left corner of the screen. The menu of this module is dynamic, and it can be very easily changed using built-in editor, which is called from the context menu of the module (RMB). As a base code editor was used SciTE assembly by Yashied, in my opinion the most functional and portable of those that I have seen.1 point -
In AutoIt regexp implementation \R means @CR or @LF or @CRLF. Thus we can just do: StringRegExpReplace($s, "\R{2,}", @CRLF)1 point
-
Zip27z conversion using AutoIt3
Musashi reacted to obiwanceleri for a topic
So today I decided to consider calling 7z.dll instead of calling the command line. I've been reading about it and it looks quite daunting. It does, however, give more control over how compression / extraction is going. I don't want to simply cut-and-paste. I want to understand how it's done. So there's going to be a lot of testing and poking in my future ...1 point -
[BUGFIX VERSION] - 4 Jun 20 Fixed: A couple of small edge case bugs - thanks to those who reported them. New zip containing new UDF and several example scripts in first post. M231 point
-
fixed code: #include <IE.au3> Global $hIE Global $oIE _IEErrorHandlerRegister(_IE_Error_Handler) _Example() Func _Example() ; Step 1 : Creating RAW IE browser $oIE = _IECreate("about:blank", 0, 1, 1, 1) Do Until IsObj($oIE) $hIE = _IEPropertyGet($oIE, "hwnd") If IsHWnd($hIE) Then Do WinActivate($hIE) Until WinActive($hIE) EndIf ConsoleWrite("IE created successfully" & @CRLF) ; Step 2 : Waiting SSO web authentication ConsoleWrite("Runing SSO authentication" & @CRLF) _IENavigate($oIE, "https://myurl.com", 1) While 1 Local $Location_URL = $oIE.LocationURL() ; _IEPropertyGet ( $oIE, "locationurl" ) ConsoleWrite($Location_URL & @CRLF) Sleep(100) WEnd EndFunc ;==>_Example Func _IE_Error_Handler(ByRef $oError) Local $sHexNumber = Hex($oError.Number, 8) ConsoleWrite("COM Error : " & $sHexNumber & " Desc : " & $oError.WinDescription) If $sHexNumber == "80010108" Or "800706BA" Then Do Sleep(200) $oIE = _IEAttach($hIE, "hwnd") Until Not @error EndIf EndFunc ;==>_IE_Error_Handler and please read this:1 point
-
If you can browse the web, that means DNS, HTTP and HTTPS traffic is working. I suspect it is some firewall blocking ICMP; could be the router (0.1), or perhaps firewall software on your computer. Can you ping any other local computers, including your own IP? Is this a personal computer, company computer?1 point
-
Same thing, I'm not adding another function. The point of the post was to show what the BitAND was doing, which was what @Soil_Person was having trouble understanding.1 point
-
Hello. did you mean this? https://docs.microsoft.com/en-us/graph/api/channel-post-messages?view=graph-rest-beta&tabs=http Saludos1 point
-
[Solved] Create borders around excel range
Rskm reacted to JoHanatCent for a topic
You can try $oExcel.ActiveSheet.range("F2:G3").BorderAround(1)1 point -
Zip27z conversion using AutoIt3
obiwanceleri reacted to Musashi for a topic
As you certainly know, the parameter -w 5 stands for "local var declared but not used". During development I usually disable this parameter. It is not uncommon for more complex functions, that someone first declare the local variables without using them immediately. I activate -w 5 only for a final check to find and remove the unneeded ones.1 point -
Zip27z conversion using AutoIt3
obiwanceleri reacted to mLipok for a topic
This important note/remark could be bold or even RED..... so I do this for you Thanks for script I will check it carefully. btw. to the forum1 point -
You could use ftp batch text file instead which would be more reliable method: Example (untested): #include <File.au3> Local $sFTPTemp = _TempFile(@TempDir) FileWrite($sFTPTemp, "Open 127.0.0.1" & @CRLF) FileWrite($sFTPTemp, "Command1" & @CRLF) FileWrite($sFTPTemp, "Command2" & @CRLF & "Quit" & @CRLF) ;~ Use @ComSpec & ' /c ...' to [C]lose the command prompt window ;~ Use @ComSpec & ' /k ...' to [K]eep the command prompt window open RunWait(@ComSpec & ' /k ftp -n -s:"' & $sFTPTemp & '"') FileDelete($sFTPTemp)1 point
-
https://perevoznyk.wordpress.com/2011/11/29/quricol-qr-code-generator-library/ That is the author's site and is where I downloaded the binaries that I used when helping BugFix with his QR Code Creator. If you need to make some QR tags, then @BugFix's QR Code Tools should be able to do the job quite well.1 point
-
_FileGetShortcutEx
Letraindusoir reacted to seadoggie01 for a topic
@Letraindusoir This is unrelated to this topic that is 10 years old. A ".url" shortcut is just an Ini file though, open it in Notepad. Get it like IniRead($sFilePath, "InternetShortcut", "URL", "")1 point -
Link to pages with general resources description MSDN - Resources OverView & Reference You can embed any binary data into your AutoIt compiled EXE files in it's resources at compile time. As opposite to FileInstall() with resources you can use your embedded data directly without any temporary files on disk. If you wish you can save resources to disk with _ResourceSaveToFile() however. Adding data to resources can be done simply by AutoIt3Wrapper directive: #AutoIt3Wrapper_Res_File_Add=FileName, ResType, ResName As data can be used for example images,cursors,texts,sounds,videos,binary files etc. For loading/using data from resources at run time I made this tiny helper Resources UDF. Functions inside UDF: _ResourceGet($ResName, $ResType = $RT_RCDATA, $ResLang = 0, $DLL = -1) _ResourceGetAsString($ResName, $ResType = $RT_RCDATA, $ResLang = 0, $DLL = -1) _ResourceGetAsStringW($ResName, $ResType = $RT_RCDATA, $ResLang = 0, $DLL = -1) _ResourceGetAsBytes($ResName, $ResType = $RT_RCDATA, $ResLang = 0, $DLL = -1) _ResourceGetAsImage($ResName, $ResType = $RT_RCDATA, $DLL = -1) _ResourceGetAsBitmap($ResName, $ResType = $RT_RCDATA, $DLL = -1) _ResourceSaveToFile($FileName, $ResName, $ResType = $RT_RCDATA, $ResLang = 0, $CreatePath = 0, $DLL = -1) _ResourceSetImageToCtrl($CtrlId, $ResName, $ResType = $RT_RCDATA, $DLL = -1) _SetBitmapToCtrl($CtrlId, $hBitmap) _ResourcePlaySound($ResName, $Flag = 0, $DLL = -1) Notes: * to compile all script examples you must have installed Scite4AutoIt3 --> you must compile script by F7 from full Scite * for using #AutoIt3Wrapper_Res_File_Add directive you must have AutoIt3Wrapper at least version 2.0.1.22 (it's part of latest Scite4AutoIt3) * to compile all script examples must be apropriate resource data files in script directory (from resource_data.zip) * _ResourceGet() always returns pointer to data (for RT_BITMAP returns hBitmap), returning other types can be done by additional wrapper functions like _ResourceGetAsString() or _ResourceGetAsBytes() * _ResourceGetAsStringW() is for Unicode strings (Widechar) * you can use also #number instead of resource name, see examples * general supported resource types are listed in UDF as constants ($RT_BITMAP, $RT_RCDATA, ...) * information about playing video files (AVI) from resources is here thanks matrixnz * information/examples about using animated GIFs from resources is here and here thanks smashly/ProgAndy * information about running EXE files/DLL functions directly from resources is here thanks trancexx/Ward Known problems/limitations: * _ResourceGet() returns resource size (in bytes) in @extended macro but not for resource type RT_BITMAP * _ResourceSetImageToCtrl() works with "static/button" type of controls (picture,label,icon,button,checkbox,radiobutton,groupbox) * _ResourcePlaySound() plays only WAV files (not MP3 files) * _ResourceGetAsBytes() doesn't work for RT_BITMAP type because _ResourceGet() returns hBitmap instead of memory pointer in this case there could be used _ResourceGetAsImage() as workaround * _ResourceGet() has potential memory leak releasing of resources UnlockResource,FreeResource (opposite of LoadResource,LockResource) is not done because it must be done after using of resources at the end and not inside UDF * _GDIPlus_Startup() is called once at start of whole include --> no _GDIPlus_Shutdown() is called History: 2011-06-20 - fixed x64 compatibility (type: int->ptr) - internal change: FindResourceA -> FindResourceW (& type: str->wstr) - _SetBitmapToCtrl() --> $CtrlId parameter now supports also -1 (thanks guinness) - _WinAPI_LoadLibraryEx($DLL, $LOAD_LIBRARY_AS_DATAFILE) instead of _WinAPI_LoadLibrary($DLL) (thanks arcker) - added au3.user.calltips.api, au3.userudfs.properties (thanks guinness) - merged resource_au3.zip + resource_data.zip to one file resources.zip 2010-02-12 - all examples now use fixed #AutoIt3Wrapper_Res_File_Add directive from latest Scite4Autoit3 (no need for ResHacker.exe) - added support for buttons (also checkboxes,radiobuttons,groupboxes) in _ResourceSetImageToCtrl()/_SetBitmapToCtrl() thanks Melba 2009-08-25 - fixed corrupted topic (appeared after forum upgrade) - removed some AU3 tags from topic, note: all AU3 code is untouched inside attached ZIP 2008-11-27 - added _ResourceGetAsStringW() --> for Unicode strings (Widechar) 2008-11-10 - added two very simple examples 2008-08-14 - change: _GDIPlus_Startup() is called once at start of whole include--> no _GDIPlus_Shutdown() is called - fixed support for animated GIFs in _ResourceGetAsImage() --> removed_MemGlobalFree($hData) - used simpler UDF syntax (from WinAPI) instead of DllCall() where possible - added new example for animated GIF image 2008-07-08 - just corrected some typos in this topic (no code changes) 2008-06-25 - big thanks to ProgAndy for ideas,improvements! - added _ResourceGetAsImage(), _ResourceGetAsBitmap() - added optional $DLL parameter to all functions - for loading resources from external EXE,DLL files - fixed previous limitation in _ResourceSaveToFile() - now supports also RT_BITMAP type - new examples in resource_test.au3 2008-05-02 - added new RT,SND constants - fixed bad order of parameters ResName x ResType in FindResourceExA (thanks SmOke_N) - added DeleteObject of oldBmp from STM_SETIMAGE in _SetBitmapToCtrl (thanks ProgAndy) - added settinng SS_BITMAP style to control before STM_SETIMAGE in_SetBitmapToCtrl (support for labels) 2008-04-24 - added support for JPG,GIF,PNG in _ResourceSetImageToCtrl() using GDI+ - thanks ProgAndy - reverted all examples back from #AutoIt3Wrapper_Res_File_Add= to#AutoIt3Wrapper_run_after=ResHacker.exe -add - updated both ZIP archives 2007-10-16 - added _ResourcePlaySound() - thanks Larry - corrected local declaration of $struxt - was problem when Opt("MustDeclareVars",1) - updated resource_test.au3 and resource.au3 in resource_au3.zip 2007-09-14 - added optional parameter $CreatePath in _ResourceSaveToFile() - updated resource_test.au3 and resource.au3 in resource_au3.zip 2007-09-11 - in examples used new AutoIt3Wrapper directive#AutoIt3Wrapper_Res_File_Add from latest Scite4AutoIt3 (instead of #AutoIt3Wrapper_run_after=ResHacker.exe -add ...) - updated resource_test.au3 and resource_test_ie.au3 in resource_au3.zip 2007-09-05 - in #AutoIt3Wrapper_run_after=ResHacker.exe -add ... directive can be resource type in text form -->rcdata instead of 10, bitmap instead of 2 and so on (note: but for htmlmust be used 23 still) - updated only resource_test.au3 in resource_au3.zip 2007-09-04 - added description at top of this topic - added _ResourceSaveToFile() - source is also example for using _ResourceGetAsBytes() - more error checking in UDF and error codes are now differrent todistinguish possible problem - default ResType = 10 ($RT_RCDATA) in all functions - updated both ZIP archives 2007-08-29 - added TODO list - removed not used local variables in _ResourceSetImageToCtrl() - ziparchive not updated yet - revisited WWW links and TODO list and added list of functions 2007-08-10 - first version resource_test_min1.au3 - very simple example script of using UDF #AutoIt3Wrapper_Res_File_Add=image3.jpg, rt_rcdata, TEST_JPG_1 #include "resources.au3" $gui = GUICreate("Data from resources simple example 1",400,150) $pic1 = GUICtrlCreatePic("",0,0,400,150) _ResourceSetImageToCtrl($pic1, "TEST_JPG_1") ; set JPG image to picture control from resource GUISetState(@SW_SHOW) While 1 If GUIGetMsg() = -3 Then Exit WEnd resource_test.au3 - complex example script of using UDF #AutoIt3Wrapper_Res_File_Add=test_1.txt, rt_rcdata, TEST_TXT_1 #AutoIt3Wrapper_Res_File_Add=image1.bmp, rt_bitmap, TEST_BMP_1 #AutoIt3Wrapper_Res_File_Add=image2.bmp, rt_bitmap, TEST_BMP_2 #AutoIt3Wrapper_Res_File_Add=image3.jpg, rt_rcdata, TEST_JPG_3 #AutoIt3Wrapper_Res_File_Add=binary1.dat, rt_rcdata, TEST_BIN_1 #AutoIt3Wrapper_Res_File_Add=C:\WINDOWS\Media\tada.wav, sound, TEST_WAV_1 #include "resources.au3" $gui = GUICreate("Data from resources example",820,400) $pic1 = GUICtrlCreatePic("",0,0,400,300) $pic2 = GUICtrlCreatePic("",400,0,400,150) $pic3 = GUICtrlCreatePic("",400,150,400,150) $pic4 = GUICtrlCreatePic("",600,320,400,100) $label1 = GUICtrlCreateLabel("",20,320,380,100) $label2 = GUICtrlCreateLabel("",400,320,200,100) GUISetState(@SW_SHOW) ; get string from resource $string = _ResourceGetAsString("TEST_TXT_1") GUICtrlSetData($label1, $string) ; set BMP image to picture control from resource bitmap _ResourceSetImageToCtrl($pic1, "TEST_BMP_1", $RT_BITMAP) ; get bitmap from resource (as pointer) $hBmp = _ResourceGet("TEST_BMP_2", $RT_BITMAP) ; and use it for whatever you like _SetBitmapToCtrl($pic2, $hBmp) ; set JPG image to picture control from resource _ResourceSetImageToCtrl($pic3, "TEST_JPG_3") ; set image to picture control from external DLL resource _ResourceSetImageToCtrl($pic4, "#14355", $RT_BITMAP, @SystemDir & "\shell32.dll") ; get/use picture from resources as hImage type $size1 = _ResourceGetImageSize("TEST_BMP_1", $RT_BITMAP) $size2 = _ResourceGetImageSize("TEST_JPG_3") GUICtrlSetData($label2, $size1 & @CRLF & $size2) ; save binary data or another type (image) from resource to file and get its size in bytes $size1 = _ResourceSaveToFile(@ScriptDir & "\binary_data1.dat", "TEST_BIN_1") $size2 = _ResourceSaveToFile(@ScriptDir & "\binary_data2.bmp", "TEST_BMP_1", $RT_BITMAP) ; save binary data from resource to file (create not existing directory) _ResourceSaveToFile("C:\Dir1\SubDir2\binary_data1.dat", "TEST_BIN_1", $RT_RCDATA, 0, 1) _ResourceSaveToFile("C:\Dir1\SubDir2\binary_data2.bmp", "TEST_BMP_1", $RT_BITMAP, 0, 1) ; play WAV from resource (sync/async) _ResourcePlaySound("TEST_WAV_1") _ResourcePlaySound("TEST_WAV_1", $SND_ASYNC) While 1 If GUIGetMsg() = -3 Then Exit WEnd Func _ResourceGetImageSize($ResName, $ResType = 10) ; $RT_RCDATA = 10 ; get/use picture from resources as hImage type $hImage = _ResourceGetAsImage($ResName, $ResType) $width = _GDIPlus_ImageGetWidth ($hImage) $height = _GDIPlus_ImageGetHeight($hImage) Return "Size of " & $ResName & " is: " & $width & "x" & $height EndFunc resources.zip - UDF + examples + sample resource data for examples Previous downloads: 7195 resources.zip1 point
-
Calling 7z.dll
obiwanceleri reacted to Biatu for a topic
Yea, i know it's been a while but I finally took a moment to knock this one out for good... I rewrote the script into a single include that can extract files to disk in a folder of choice or into an array for diskless extraction. I also implemented trancexx's Subrogation so that this can be run from memory entirely. Examples provided as well, it's a bit too big for forums so, here is a MEGA link... https://mega.nz/#!MBQhDaQS!VzKgH9P6QhhAv2tQykIRWmUDyi0GVxZZA9pSIGu130c Edit: the only catch is that I cant get LZMA, Base64, and SHA1 to work on x64, however if you remove the MemDll and subrogation bits, it will function fine on x64.1 point