{$CLEO .cs}
0000: NOP
0662: "PopandauL"
wait 0
1@ = 0
while true
wait 0
if and
1@ == 0
0AB0: 75
then
1@ = 1
0ACD: show_text_highpriority "SpaceBarPress ~g~enabled~w~!" time 500
wait 500
else
if and
1@ == 1
0AB0: 75
then
1@ = 0
0ACD: show_text_highpriority "SpaceBarPress ~r~disabled~w~!" time 500
wait 500
end
end
if 1@ == 1 then
0AB1: call @keyPress 2 key 32 time 250
wait 10000
end
end
:keyPress
if 0AA2: 2@ = load_library "User32.dll"
then
if 0AA4: 2@ = get_proc_address "keybd_event" library 2@
then
0AA5: call 2@ num_params 4 pop 0 0 0 0 0@
wait 1@
0AA5: call 2@ num_params 4 pop 0 0 0x02 0 0@
end
end
0AB2: ret 0
Ok, but it isn't working can you test it out for me ? I press "K", i get the msg but it isn't pressing the Space BarPopandaulX link said:http://ugbase.eu/snippets/send-keypress-5701/ or http://ugbase.eu/snippets/send-keypress/
Code:{$CLEO .cs} 0000: NOP 0662: "PopandauL" wait 0 1@ = 0 while true wait 0 if and 1@ == 0 0AB0: 75 then 1@ = 1 0ACD: show_text_highpriority "SpaceBarPress ~g~enabled~w~!" time 500 wait 500 else if and 1@ == 1 0AB0: 75 then 1@ = 0 0ACD: show_text_highpriority "SpaceBarPress ~r~disabled~w~!" time 500 wait 500 end end if 1@ == 1 then 0AB1: call @keyPress 2 key 32 time 250 wait 10000 end end :keyPress if 0AA2: 2@ = load_library "User32.dll" then if 0AA4: 2@ = get_proc_address "keybd_event" library 2@ then 0AA5: call 2@ num_params 4 pop 0 0 0 0 0@ wait 1@ 0AA5: call 2@ num_params 4 pop 0 0 0x02 0 0@ end end 0AB2: ret 0
Activate on K.
{$CLEO .cs}
0000: NOP
0662: "PopandauL"
wait 0
1@ = 0
while true
wait 0
if and
1@ == 0
0AB0: 75
then
1@ = 1
0ACD: show_text_highpriority "SpaceBarPress ~g~enabled~w~!" time 500
wait 500
else
if and
1@ == 1
0AB0: 75
then
1@ = 0
0ACD: show_text_highpriority "SpaceBarPress ~r~disabled~w~!" time 500
wait 500
end
end
if 1@ == 1 then
0AB1: @FAKE_KEYPRESS 1 _OFFSET_KEY_ 0x20
wait 10000
end
end
:FAKE_KEYPRESS
1@ = 0xB73458
005A: 1@ += 0@
0A8C: write_memory 1@ size 1 value 255 virtual_protect 0
0AB2: ret 0