View previous topic :: View next topic |
Author |
Message |
Firered Cheater Reputation: 0
Joined: 22 May 2012 Posts: 26
|
Posted: Wed May 23, 2012 11:15 am Post subject: run by entering |
|
|
I know that has relation with this function:
Code: | funcion CEbuttonClick(sender)
control_setCaption...
hkey=createHotkey("CEbuttonClick",VK_1) |
Last edited by Firered on Wed May 23, 2012 7:00 pm; edited 1 time in total |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25295 Location: The netherlands
|
Posted: Wed May 23, 2012 11:25 am Post subject: |
|
|
do you wish to let ce press the "1" key constantly? (doKeyPress(VK_1) in a timer )
Or do you wish to execute the same function over and over ? (t=createTimer(nil) /timer_onTimer(t,function) )
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Firered Cheater Reputation: 0
Joined: 22 May 2012 Posts: 26
|
Posted: Wed May 23, 2012 10:16 pm Post subject: |
|
|
I managed to do, but I need to do something else:
Code: | stringtotype={}
stringtotype[0]=VK_1
currentChar=0;
function typer()
keyDown(stringtotype[currentChar])
sleep(2000)
keyUp(stringtotype[currentChar])
currentChar=(currentChar + 1);
if (stringtotype[currentChar] == nil) then
currentChar=0
end
end
t=createTimer(nil, false)
timer_setInterval(t, 100)
timer_onTimer(t, typer)
timer_setEnabled(t, true) |
wanted to stop the repetition with a hotkey 2.
When pressing the hotkey 1 again starts to a Continuously repeat the number 1111 ...
When click the hotkey 2, it stops, this rhythm.
help me dark byte
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25295 Location: The netherlands
|
Posted: Thu May 24, 2012 3:43 am Post subject: |
|
|
Just use createHotkey
Code: |
stringtotype={}
stringtotype[0]=VK_1
currentChar=0;
function typer()
keyDown(stringtotype[currentChar])
sleep(2000)
keyUp(stringtotype[currentChar])
currentChar=(currentChar + 1);
if (stringtotype[currentChar] == nil) then
currentChar=0
end
end
stringtotype={}
function startTimer(sender)
t=createTimer(nil, false)
timer_setInterval(t, 100)
timer_onTimer(t, typer)
timer_setEnabled(t, true)
end
function stopTimer(sender)
object_destroy(t)
end
createHotkey(startTimer, VK_1)
createHotkey(stopTimer, VK_2)
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Firered Cheater Reputation: 0
Joined: 22 May 2012 Posts: 26
|
Posted: Thu May 24, 2012 11:52 am Post subject: |
|
|
did not work .. something is wrong
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25295 Location: The netherlands
|
Posted: Thu May 24, 2012 12:38 pm Post subject: |
|
|
what doesn't work. I am assuming that the typer script you posted works without a problem (note that that sleep(2000) will basically freeze ce)
anyhow, first remove the second "stringtotype={} " line
and put a nil check for t in startTimer and set t to nil in stopTimer
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Firered Cheater Reputation: 0
Joined: 22 May 2012 Posts: 26
|
Posted: Thu May 24, 2012 8:30 pm Post subject: |
|
|
so? no longer works, I do not understand what you said.
Code: | stringtotype={}
stringtotype[0]=VK_1
currentChar=0;
function typer()
keyDown(stringtotype[currentChar])
sleep(2000)
keyUp(stringtotype[currentChar])
currentChar=(currentChar + 1);
if (stringtotype[currentChar] == nil) then
currentChar=0
end
end
function startTimer(sender)
startTimer(nil, t)
t=createTimer(nil, false)
timer_setInterval(t, 100)
timer_onTimer(t, typer)
timer_setEnabled(t, true)
end
function stopTimer(sender)
stopTimer(nil, t)
object_destroy(t)
end
createHotkey(startTimer, VK_1)
createHotkey(stopTimer, VK_2) |
Last edited by Firered on Thu May 24, 2012 8:38 pm; edited 1 time in total |
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25295 Location: The netherlands
|
Posted: Thu May 24, 2012 8:38 pm Post subject: |
|
|
here is a script that should work:
Code: |
stringtotype={}
stringtotype[0]=VK_1
currentChar=0;
function typer()
doKeyPress(stringtotype[currentChar])
currentChar=(currentChar + 1);
if (stringtotype[currentChar] == nil) then
currentChar=0
end
end
function startTimer()
if (t==nil) then
t=createTimer(nil, false)
timer_setInterval(t, 100)
timer_onTimer(t, typer)
timer_setEnabled(t, true)
end
end
function stopTimer()
object_destroy(t)
t=nil
end
createHotkey(startTimer, VK_1)
createHotkey(stopTimer, VK_2)
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Firered Cheater Reputation: 0
Joined: 22 May 2012 Posts: 26
|
Posted: Thu May 24, 2012 8:52 pm Post subject: |
|
|
also does not work, this is strange
|
|
Back to top |
|
|
Firered Cheater Reputation: 0
Joined: 22 May 2012 Posts: 26
|
Posted: Fri May 25, 2012 9:43 am Post subject: |
|
|
why not working? the script is right ..
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25295 Location: The netherlands
|
Posted: Fri May 25, 2012 11:15 am Post subject: |
|
|
define not working. When you try it on notepad, doesn't it write 1 constantly?
If you mean in a game, not all games support this type of key input
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Firered Cheater Reputation: 0
Joined: 22 May 2012 Posts: 26
|
Posted: Fri May 25, 2012 4:16 pm Post subject: |
|
|
yes, he did not write 1 constantly..
anyway thanks for the strength
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25295 Location: The netherlands
|
Posted: Fri May 25, 2012 4:33 pm Post subject: |
|
|
Weird, this script works for me. If I press 1 ce will constantly type '1'
You are using CE 6.2 right? (6.1 has a small bug in createHotkey where you need to put the functionname in quotes)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Firered Cheater Reputation: 0
Joined: 22 May 2012 Posts: 26
|
Posted: Fri May 25, 2012 7:41 pm Post subject: |
|
|
this is my error. thx
|
|
Back to top |
|
|
|