Skip to content

Commit 82f812b

Browse files
feat: add left_click script for automated mouse clicks and logging
1 parent c749993 commit 82f812b

File tree

5 files changed

+39
-16
lines changed

5 files changed

+39
-16
lines changed

dependencies/quickjs-ng.lua

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,24 @@ package("quickjs-ng")
3737

3838
local configs = {}
3939
table.insert(configs, "-DCMAKE_BUILD_TYPE=Release")
40-
if package:is_plat("windows") then
41-
if package:is_debug() then
42-
-- add /debug to link flags
43-
table.insert(configs, "-DCMAKE_EXE_LINKER_FLAGS_RELEASE=\"/DEBUG\"")
44-
table.insert(configs, "-DCMAKE_SHARED_LINKER_FLAGS_RELEASE=\"/DEBUG\"")
40+
-- if package:is_plat("windows") then
41+
-- if package:is_debug() then
42+
-- -- add /debug to link flags
43+
-- table.insert(configs, "-DCMAKE_EXE_LINKER_FLAGS_RELEASE=\"/DEBUG\"")
44+
-- table.insert(configs, "-DCMAKE_SHARED_LINKER_FLAGS_RELEASE=\"/DEBUG\"")
4545

46-
-- also add /DEBUG to cflags, and /Zi to cxxflags
47-
table.insert(configs, "-DCMAKE_C_FLAGS_RELEASE=/Zi /DEBUG")
48-
table.insert(configs, "-DCMAKE_CXX_FLAGS_RELEASE=/Zi /DEBUG")
49-
end
50-
end
46+
-- -- also add /DEBUG to cflags, and /Zi to cxxflags
47+
-- table.insert(configs, "-DCMAKE_C_FLAGS_RELEASE=/Zi /DEBUG")
48+
-- table.insert(configs, "-DCMAKE_CXX_FLAGS_RELEASE=/Zi /DEBUG")
49+
-- end
50+
-- end
5151

5252
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
5353
table.insert(configs, "-DQJS_CONFIG_ASAN=" .. (package:config("asan") and "ON" or "OFF"))
5454
table.insert(configs, "-DQJS_CONFIG_MSAN=" .. (package:config("msan") and "ON" or "OFF"))
5555
table.insert(configs, "-DQJS_CONFIG_UBSAN=" .. (package:config("ubsan") and "ON" or "OFF"))
5656
table.insert(configs, "-DQJS_BUILD_LIBC=" .. (package:config("libc") and "ON" or "OFF"))
57-
57+
5858
if package:config("shared") and package:is_plat("windows") then
5959
table.insert(configs, "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON")
6060
end

scripts/left_click.ahk

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Sleep, 1000
2+
counter := 0
3+
#SingleInstance force
4+
5+
Gui, Add, Edit, vLog w400 h400,
6+
Gui, Show, w400 h400
7+
stop := false
8+
9+
Loop
10+
{
11+
Send {LButton}
12+
Sleep, 100
13+
Send {Esc}
14+
Sleep, 100
15+
counter := counter + 1
16+
GuiControl,, Log, %counter%
17+
18+
if (stop)
19+
{
20+
break
21+
}
22+
}
23+
24+
F10::
25+
stop := true

scripts/rebuild.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ foreach ($pidx in $pids) {
33
Stop-Process -Id $pidx -Force
44
}
55

6-
xmake f --toolchain=clang-cl -m releasedbg -y
6+
xmake f --toolchain=clang-cl -m releasedbg -y -c
77
xmake b --yes inject
88
xmake b --yes shell
99
if ($LASTEXITCODE -ne 0) {

scripts/rebuild_asan.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ foreach ($pidx in $pids) {
33
Stop-Process -Id $pidx -Force
44
}
55

6-
xmake f --toolchain=clang-cl -m releasedbg -y --asan=y
6+
xmake f --toolchain=clang-cl -m releasedbg -y --asan=y -c
77
if ($LASTEXITCODE -ne 0) {
88
exit $LASTEXITCODE
99
}

xmake.lua

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@ add_requires("blook 3524a931af49be471840e5312fb0c18e888706fd",
2525

2626
if has_config("asan") then
2727
add_requires("quickjs-ng", {
28-
configs = {asan = true},
29-
debug = true
28+
configs = {asan = true}
3029
})
3130
add_defines("_DISABLE_VECTOR_ANNOTATION", "_DISABLE_STRING_ANNOTATION", "_ASAN_")
32-
set_optimize("none")
3331
-- set_policy("build.sanitizer.undefined", true)
3432
-- set_toolset("ld", "lld-link")
3533
-- set_toolset("sh", "lld-link")

0 commit comments

Comments
 (0)