Skip to content

Instantly share code, notes, and snippets.

@stuncloud
Created June 1, 2020 07:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stuncloud/8f182060413cf7b4f9d43a331765a224 to your computer and use it in GitHub Desktop.
Save stuncloud/8f182060413cf7b4f9d43a331765a224 to your computer and use it in GitHub Desktop.
掲示板No.845調査用
call ChkImgX.uws
startup_chkimgx()
logprint(FALSE)
form.run()
img = "002.bmp"
id = getid(GET_FORM_WIN)
x1 = status(id, ST_X)
y1 = status(id, ST_Y)
x2 = x1 + status(id, ST_WIDTH)
y2 = y1 + status(id, ST_HEIGHT)
btn(LEFT, CLICK, x1 + 100, y1 + 100)
mmv(0, 0)
kbd(VK_F9, CLICK, 200)
print "F9"
while status(id, ST_ISID)
print "searching img..."
// if chkimg(img, 0, x1, y1, x2, y2) then
if chkimgx(img, 0, x1, y1, x2, y2) then
print "found"
msgbox("found")
break
else
print "not found"
kbd(VK_F9, CLICK, 200)
print "F9"
endif
wend
shutdown_chkimgx()
// while status(id, ST_ISID)
// sleep(0.1)
// wend
if status(id, ST_ISID) then
// sleep(10)
form.close()
endif
module Form
dim f
procedure Run()
opt = FOM_NORESIZE and FOM_NOTASKBAR and FOM_BROWSER and FOM_TOPMOST
f = createform("test.html", "", TRUE, opt, 800, 1050)
fend
procedure Close()
f.quit()
fend
endmodule
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<script type="text/javascript">
document.addEventListener('keydown', function(event){
if (event.key === "F9") {
document.all.img.src = getRandomName();
}
})
function getRandomName() {
n = (function(max) {
return Math.floor(Math.random() * Math.floor(max));
})(4) + 1;
return "00" + n + ".bmp";
}
</script>
</head>
<body>
<img id="img" src="001.bmp" alt="">
</body>
</html>
20/06/01 16:37 F9
20/06/01 16:37 searching img...
20/06/01 16:37 not found
20/06/01 16:37 F9
20/06/01 16:37 searching img...
20/06/01 16:37 not found
20/06/01 16:37 F9
20/06/01 16:37 searching img...
20/06/01 16:37 found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment