Aarstad Posted January 4, 2019 Posted January 4, 2019 #include <ScreenCapture.au3> _ScreenCapture_Capture("img.jpg") if @error Then ConsoleWrite("Capture desktop image failed with error " & @error & @crlf) EndIf $hBitMap = _ScreenCapture_Capture() if @error Then ConsoleWrite("Screencap to memory failed with error " & @error & @crlf) EndIf Both of these function calls prints with @error value being -2. I have tested the script on another machine, and it works there. (same OS and hardware specs) Have tried disabling antivirus. Have tried running script as administrator. Specs: Windows 10 Pro x64 Intel Core i5-6400 @ 2.70ghz 8,00 GB RAM
Moderators Melba23 Posted January 4, 2019 Moderators Posted January 4, 2019 Aarstad, Which AutoIt release are you running (and which was running on the other machine you tried)? There were some bugs within 3.3.14.3 which affected the ScreenCapture UDF among others - so please make sure you are running the latest 3.3.14.5 release. M23 Aarstad 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Aarstad Posted January 4, 2019 Author Posted January 4, 2019 3 hours ago, Melba23 said: Aarstad, Which AutoIt release are you running (and which was running on the other machine you tried)? There were some bugs within 3.3.14.3 which affected the ScreenCapture UDF among others - so please make sure you are running the latest 3.3.14.5 release. M23 That was it! I had version 3.3.14.3 on both systems. Thanks!
Moderators Melba23 Posted January 4, 2019 Moderators Posted January 4, 2019 Aarstad, Glad I could help. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now