Leaderboard
Popular Content
Showing content with the highest reputation on 03/15/2023 in all areas
-
More updates made to the ZIP (link in first post )2 points
-
Try this, see if it works: #include "..\MPDF_UDF.au3" #include <File.au3> ;set the properties for the pdf _SetTitle("Link to web example") _SetSubject("click link in pdf") _SetKeywords("pdf, AutoIt") _OpenAfter(True) ;open after generation _SetUnit($PDF_UNIT_CM) _SetPaperSize("A4") _SetZoomMode($PDF_ZOOM_CUSTOM, 90) _SetOrientation($PDF_ORIENTATION_PORTRAIT) _SetLayoutMode($PDF_LAYOUT_CONTINOUS) ;initialize the pdf _InitPDF(@ScriptDir & "\link_in_pdf") _LoadFontTT("fontArial", $PDF_FONT_ARIAL, $PDF_FONT_ITALIC) _BeginPage() _InsertLink(2, 28, "https://autoitscript.com/", "fontArial", 10) _EndPage() ;write the buffer to disk _ClosePDFFile() Func _InsertLink($iX, $iY, $sURL, $sFontAlias, $iFontSize) __InitObj() _DrawText($iX, $iY, $sURL, $sFontAlias, $iFontSize) __EndObj() __InitObj() __ToBuffer("<</URI(" & __ToPdfStr($sURL) & ") /Type /Action /S /URI>>") __EndObj() EndFunc ;==>_InsertLink2 points
-
Was just playing a little and sort-off suggesting to show how things should be done by tidying code when posting an answer.2 points
-
There is a simple way using the "__COMPAT_LAYER" environment variable, but it does not work with all programs. Example here, if you want to run regedit without privileges : EnvSet("__COMPAT_LAYER", "RunAsInvoker") Run("regedit.exe") Run application without elevation ('Run As Administrator') (nirsoft.net)2 points
-
RegExpQuickTester 2.5r
CYCho reacted to pixelsearch for a topic
Hi everybody Here is the script I use to test RegEx patterns offline, it's handy. Credits go to Lazycat, who scripted it initially many years ago and thanked "w0uter for ideas and parts of code". I added some modifications (listed in next post) and would like to thank @jchd @mLipok @mikell @Nine @mistersquirrle @taurus905 and @ioa747 for their contribution. Below are the match text & patterns corresponding to the pic above. For a start, you can copy and paste them in their respective edit control. After you choose the corresponding RegExp mode from the ComboBox at the bottom of the screen (mode 3 = return array of global matches) then you'll have the same results as displayed in the pic above. Match Text : blabla...blabla... blabla..."https://media.pic1.jpg"blabla..."https://media.pic2.png"... blabla..."https://media.pic3.jpg"blabla..."https://media.pic4.png"... blabla...blabla... Pattern : (?i)"([^"]+?\.(?:jpg|png))" When you end the script, 2 files will be created in the same directory of the script. Assuming your script is named "RegExpQuickTester 2.5p.au3", the 2 files created will be : * "RegExpQuickTester 2.5p.txt" which contains the saved Match Text that will be reused when you run the script. * "RegExpQuickTester 2.5p.ini" which contains the saved options that will be reused when you run the script. A right click while hovering over the Edit control of the Search Pattern will display a helpful context menu, with possibility to paste something from the menu inside the Search Pattern. Personally I nearly don't paste anything from the context menu but as this feature was created by the original scripter... Instead I like to consult this context menu as a RegExp syntax reminder ! Anyway, just experiment it and choose what's best for you. 99% of the time, the Search Pattern Tab will be on top. If you notice another colored Tab (except the Personal Tab which will never be highlited), then it means that there is something written in this other tab : the color is here only to remind you that there IS something in this other tab, in case you had forgotten. Even a space or a blank line would color the Tab. YJ This particular design (due to original scripter) won't allow you to type "" in the Replace Pattern Tab (mikell frowned, concerning this missing feature). Gladly I found that typing a non existing group, for example $99 will have the same effect as "" so it's a workaround that seems to do the job. The "Code" button allows you to generate the corresponding AutoIt code, which will be copied to the Clipboard Don't hesitate to ask if you have questions. Our RegExp gurus (that's not me) just love RegExp questions Edit: I forgot. You can drag a text file (or htm etc...) inside the Match Text edit control (it's a droppable zone) . There shouldn't be a 32Kb file size limit anymore as I added code to override this limit. There are probably a couple of other functionalities I'm not thinking of now, you'll easily find what you need if you look at the code. And if you want to modify something in the code, don't hesitate. Just share here your modifications in case other users find them useful too, thanks. Updates are detailed in next post Download last version 11 nov 2024 : RegExpQuickTester 2.5r.au31 point -
Your welcome. PS: I have finally fixed a long standing issue where VALUE "VarFileInfo", "$" was always being created in the StringFileInfo block. Updated AutoIt3Wrapper.au3 available in Beta.1 point
-
that's why I asked because your script didn't work for me, and I had to modify it here is calls {ALT}{A}{O} before he goes to all setting Func _Example($mtric,$setting) ; Run gpedit.msc ; Run("c:\Windows\system32\mmc.exe c:\Windows\system32\gpedit.msc /a") ;Run("c:\Windows\system32\mmc.exe C:\Users\" & @USERNAME &"\Desktop\script\gpedit_v1.msc /a") Run("c:\Windows\system32\mmc.exe " & "C:\share\open_close_gpedit\gpedit_v1.msc /a") Sleep(2500) Local $hGPO = WinWaitActive("Local Group Policy Editor") ConsoleWrite("$hGPO=" & $hGPO & @CRLF) Local $hTreeView_1 = ControlGetHandle($hGPO, "", "SysTreeView321") Sleep(500) ControlSend($hGPO, "", $hTreeView_1, "{ALT}{A}{O}") ControlFocus($hGPO, "", "[TITLE:Filter Options]") WinWaitActive("[TITLE:Filter Options]") Sleep(3500)1 point
-
BETA: SciTE v5x & lua Dynamic_include and "Smart" AutoComplete for Vars/UDFs/Abbrevs
Jos reacted to argumentum for a topic
The updated ZIP is at SciTE_changes_Dynamic_Includes.zip .1 point -
@RohanMThis appears to be a timing issue where the webdriver console is closed via ProcessClose() before it has completed its cleanup process. I will open an issue on Github so that this can be reviewed / improved. In the mean time, you should be able to work around the issue by adding a call to Sleep() before _WD_Shutdown().1 point
-
RegExpQuickTester 2.5r
SOLVE-SMART reacted to pixelsearch for a topic
A kind of "reverse engineering" I don't know if it's possible, maybe one of our RegEx gurus will1 point -
in order to function, it also needs the rest what is the $ItemCnt ? what is the $hGPO ? what is the $hListView?1 point
-
For $x = 0 To $ItemCnt - 1 ControlListView($hGPO, "", $hListView, "Select", $x) $SelectedItem = ControlListView($hGPO, "", $hListView, "GetSelected") ConsoleWrite("$SelectedItem=" & $SelectedItem & " ") $ItemTxt = ControlListView($hGPO, "", $hListView, "GetText", $SelectedItem, 3) ConsoleWrite("$ItemTxt=" & $ItemTxt & @CRLF) Sleep(1000) Next1 point
-
1) I need\want to use ControlSend because it will be more stable. Func _selectDisEna($setting) Sleep(200) ; we give some time until the window appears Local $sEditTitle = WinGetTitle("[ACTIVE]") ConsoleWrite("$sEditTitle=" & $sEditTitle & @CRLF) Local $hGPOedit = WinWaitActive($sEditTitle) ControlFocus($hGPOedit, "", "WindowsForms10.Window.8.app.0.297b065_r69_ad16") Switch $setting Case "disable", "Disabled" ControlSend($hGPOedit, "", "WindowsForms10.Window.8.app.0.297b065_r69_ad16", "d") ;~ Send("d") Case "enabled", "Enabled" ControlSend($hGPOedit, "", "WindowsForms10.Window.8.app.0.297b065_r69_ad16", "e") ;~ Send("e") Case "not configured", "Not configured" ControlSend($hGPOedit, "", "WindowsForms10.Window.8.app.0.297b065_r69_ad16", "c") ;~ Send("c") EndSwitch ConsoleWrite("$setting=" & $setting & @CRLF) ControlFocus($hGPOedit, "", "WindowsForms10.Window.8.app.0.297b065_r69_ad112") Sleep(100) ;Apply ;~ Send("a") ControlSend($hGPOedit, "", "WindowsForms10.Window.8.app.0.297b065_r69_ad112", "a") ;~ Send("{n}") ; <----- I didn't understand what he was doing Sleep(100) ; Ok ;~ Send("{ENTER}") ControlSend($hGPOedit, "", "WindowsForms10.Window.8.app.0.297b065_r69_ad112", "{ENTER}") EndFunc ;==>_selectDisEna1 point
-
you have changed it ;~ Run("c:\Windows\system32\mmc.exe " & "C:\share\open_close_gpedit\gpedit_v1.msc /a") ShellExecute("C:\WINDOWS\SYSTEM32\MMC.EXE", "C:\WINDOWS\SYSTEM32\GPEDIT.MSC")1 point
-
BETA: SciTE v5x & lua Dynamic_include and "Smart" AutoComplete for Vars/UDFs/Abbrevs
argumentum reacted to Jos for a topic
Uploaded updated ZIP file:1 point -
I'd like to start by saying that I've experienced pretty much everything that has been mentioned in this thread - quarantined exes for completely innocuous code, compiled exes flagged as infected months or years after they've been sitting idle in an archive folder, the same script being flagged intermittently each time I compile it, you name it. I knew that would be unacceptable if we released our product in that condition so I researched for many days (probably weeks) before our initial release. This is the route we ended up choosing and I honestly couldn't be happier with the results. After we started signing all of our executables using a reputable code signing cert we no longer get flagged by Windows Defender - even using UPX with maximum compression. We've had rare issues with other AV providers but they've been so rare (easily less than 10 total over the past 18 months) it's really been a non-issue. If you already have a corporation setup I highly recommend doing this sooner rather than later. To be upfront, it does have a cost - both in time (generally 1-4 weeks from application to receiving your cert) and money (<$100/year) - but user trust and peace of mind are (very nearly) priceless. Once you have the code signing cert downloaded and installed you can simply add a line to the top of your script to have SciTE automatically sign your newly compiled exe as the final step in the compile process. Something like this: #AutoIt3Wrapper_Run_After=""%ProgramFiles(x86)%\Windows Kits\....\signtool.exe" sign /tr http://timestamp.comodoca.com/?td=sha384 /td SHA384 /a "%out%"" Also, if you have concerns about Windows Defender being reliable and accurate AV software you can let those concerns go. While it's true Windows Defender has had issues in the past, they were in the beginning of Microsoft's attempts at AV and things have improved significantly since then. If you want to check it out for yourself you can Google it or go here: https://www.techspot.com/news/81396-windows-defender-ranked-joint-best-antivirus-program.html (Fyi, up until about 5 years ago I'd been in IT for >20 years doing anywhere from tech support to Windows/Network Admin. In other words, basically dealing with viruses/rootkits/malware/ransomware on a daily basis because of users or customers lacking the wherewithal to not click the link in the email from an unknown source claiming their inheritance is waiting. 🤦♂️) Edit: Btw, in case anyone does want to go this route I can recommend https://www.thesslstore.com/. I'm not affiliated with them in any way except for that's where I purchased our cert from and I can attest that we received it and it works exactly as I've described. We went with the standard Comodo Code Signing cert. The EV certs are more expensive because they require more background evaluation to be done to verify the entity applying for the cert. It may be advantageous in particular circumstances but isn't necessary to simply avoid AV quarantine. Also, the other unmentioned advantage is your exes are now digitally signed. While for most customers this won't make a difference, if you're using your scripts in a corporate environment this may be a major peace-of-mind bonus since it's easy to verify the authenticity of your exes and they have certain assurances the exes haven't been tampered with. 👍1 point
-
Version 1.3
1,730 downloads
Hello Everyone , Are you tired of searching the forum for getting both the exit code & the stdout output? Then your are in the right place! With this UDF you can get the both output & exit code of the command or the console app! Or you can get the exit code of another process without having to use RunWait... Features: 1. Simple & Lightweight (15 KB) 2. Detailed comments & description 3. Flexible functions with many optional parameters A BIG THANKS TO PsaltyDS for the functions! 2 of the (main) functions in the UDF are his work List of functions:1 point -
Unfortunately this wouldn't tell you if it's successful or not, its better to get the exit code. The following UDF by @TheDcoder is great for this, I've used it for cmd, exe, msi installations, it works really well. All credit to TheDcoder.1 point