Jump to content

Function is not working on different computer


Recommended Posts

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 by lordsocke
Link to comment
Share on other sites

  • Moderators

@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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...