Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Image Issues and Restrict sharing
#1
Code:
Copy      Help
str fBmp="$temp$\qm_modi.bmp"
fBmp.expandpath
if(scan("resource:<Macro1>image:h1B7A5E0B" win() r 16|128 100))
    if(!CaptureImageOnScreen(r.left r.top r.right-r.left r.bottom-r.top(fBmp))) ret
I tried adding your code into this but it gave me a syntax. But I can't seem to find out where is the error.

This was the original code
Code:
Copy      Help
str fBmp="$temp$\qm_modi.bmp"
fBmp.expandpath
if(!CaptureImageOnScreen(655 340 85 35(fBmp))) ret

And just wondering it it's possible to restrict running my .exe macro on a single computer only? Don't need it to be professional just don't want it to proliferate after giving it to 1 or 2 person.
#2
Code:
Copy      Help
r.top(fBmp)
r.top is not a function. Did you mean
Code:
Copy      Help
r.top fBmp
?

If you know computer name or user name, use function GetUserInfo to get it and exit macro if the name does not match.
#3
Code:
Copy      Help
    if(scan("image:h1B7A5E0B" w 0 16))
        fBmp.expandpath
        if(!CaptureImageOnScreen(655 340 85 35(fBmp))) ret
        typelib MODI {A5EDEDF4-2BBC-45F3-822B-E60C278A1A79} 12.0
        MODI.Document doc._create
        doc.Create(fBmp)
        doc.OCR(MODI.miLANG_ENGLISH -1 0)
        MODI.Image im=doc.Images.Item(0)
        s1=im.Layout.Text
        'BBBBBBBBBB
        key (s1)

Code:
Copy      Help
    if(scan("image:h1B7A5E0B" win() 0 16))
        fBmp.expandpath
        if(scan("image:h841C7961" win() r 16|128 100))
            if(!CaptureImageOnScreen(r.left r.top r.right-r.left r.bottom-r.top fBmp)) ret
        typelib MODI {A5EDEDF4-2BBC-45F3-822B-E60C278A1A79} 12.0
        MODI.Document doc._create
        doc.Create(fBmp)
        doc.OCR(MODI.miLANG_ENGLISH -1 0)
        MODI.Image im=doc.Images.Item(0)
        s1=im.Layout.Text
        'BBBBBBBBBB
        key (s1)

Changed it but I have a problem with MODI instead. Any clue what is happening?

What do you mean by getuserinfo? I can't seem to find much information in QM Help.
#4
Nevermind. Found the problem. Still need some tips on GetUserInfo though. Not sure how to use it. Don't really understand QM help
#5
Macro Macro2749
Code:
Copy      Help
str pcName userName
GetUserInfo userName
GetUserInfo pcName 1
out userName
out pcName
#6
I tried adding in IP address too but can't seem to work cause my country uses dynamic IP and the last 2 numbers of the ip keeps changing. Is to possible to change my code to only compare the first part of the ip but not the last 2 characters?
Code:
Copy      Help
if ip="x.x.x.48"


Forum Jump:


Users browsing this thread: 1 Guest(s)