lordsocke Posted March 15, 2018 Share Posted March 15, 2018 (edited) hey there, this part of my program: ;Base64func _ScreenCapture_Capture(@DesktopDir&"\OCR.png",1241, 226,1619, 348) $FN = ("C:\Users\Username\Desktop\OCR.png") $dat=FileRead(FileOpen($FN,16)) $objXML=ObjCreate("MSXML2.DOMDocument") $objNode=$objXML.createElement("b64") $objNode.dataType="bin.base64" $objNode.nodeTypedValue=$dat $sImage = ($objNode.Text) is changing a screenshot into a base64 string. On my computer (win7 desktop pc) it is working totaly fine. On the computer of a friend (win10) it is delivering a empty string. For sure noone can actually solve the problem because I think the code is right but maybe someone got the same thing happen Edited March 15, 2018 by lordsocke Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 15, 2018 Moderators Share Posted March 15, 2018 @lordsocke perhaps start with some error checking, so you can narrow down where it is failing. Confirm your ScreenCapture results in the expected file, then confirm that your ObjCreate works. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Zedna Posted March 16, 2018 Share Posted March 16, 2018 (edited) Try to change this _ScreenCapture_Capture(@DesktopDir&"\OCR.png",1241, 226,1619, 348) $FN = ("C:\Users\Username\Desktop\OCR.png") to this _ScreenCapture_Capture(@DesktopDir&"\OCR.png",1241, 226,1619, 348) $FN = @DesktopDir&"\OCR.png" Edited March 16, 2018 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Juvigy Posted March 16, 2018 Share Posted March 16, 2018 Desktop DIR is security restricted DIR so users on the same PC doesnt have access to other users Desktop. I guess this is the root cause of your issue. For a quick test change the path to C:\temp and try again. Link to comment Share on other sites More sharing options...
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