AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

NEEDS HELP: AUTOTALKER
Goto page 1, 2, 3  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
jero3n
Guest





PostPosted: Sun Jan 14, 2007 2:01 pm    Post subject: NEEDS HELP: AUTOTALKER Reply with quote

i made this auto-talker:

Code:

Gui, Color, red
Gui, Font, S8 Cwhite w600, Arial ;*******
Gui, Add, Text, x120 y5 w110,Auto Talker
Gui, Add, Text, x15 y53,De tekst: ; p = previous
Gui, Add, Text, xp y77 wp,Pauze(in milliseconden):
Gui, Font, S8 Cred w600, Arial ;*********
Gui, Add, Edit, Text x130 y50 w150 vtext,
Gui, Add, Edit, number x130 y80 w150 vduration,
Gui, Add, Button, Default x80 y146 w56 galgud,&OK
Gui, Add, Button, x150 y146 w56 gquit,&Sluit
Gui, Show, Center w300 h190
Return

algud:
Gui, Submit, Nohide
Hotkey, F1, DoThis
RETURN

DoThis:
Loop 
{
    if GetKeyState("z")
        break

    else
        Sleep, %duration%
        Send, %text% {ENTER}
}
Return

Quit:
ExitApp
Return


i want that if i press f1, the auto-talker start. that works Very Happy
but i want too that if i press f2, the auto-talker stops...
how can i do that???????????
plz help me!
Back to top
Jaytech



Joined: 11 Dec 2006
Posts: 242
Location: Orlando, FL

PostPosted: Sun Jan 14, 2007 4:12 pm    Post subject: Reply with quote

Code:

SetTimer, CheckforF2, 1


F1::
   Run, "%A_Desktop%\AutoHotkey.exe" "%A_ScriptDir%\AutoTalker.txt"", , , AutoTalker ;Replace first parameter with your autohotkey directory and the second parameter with your script directory and name
   RETURN


CheckforF2:
   GetKeyState, X, F2
   IfEqual, X, D
      Process, close, %AutoTalker%
   RETURN

Hope that helps Smile
Back to top
View user's profile Send private message
jonny



Joined: 13 Nov 2004
Posts: 2951
Location: Minnesota

PostPosted: Mon Jan 15, 2007 12:38 am    Post subject: Reply with quote

Um... why use a timer? Confused

Code:
DetectHiddenWindows,on
return

F1::Run,"%A_ProgramFiles%\AutoHotkey\AutoHotkey.exe" "%A_ScriptDir%\AutoTalker.ahk",,,AutoTalker
F2::WinClose,ahk_pid %AutoTalker%


Also, using Process,close leaves the killed script's tray icon sitting there until you hover over it with your mouse.
Back to top
View user's profile Send private message
Jero3n
Guest





PostPosted: Mon Jan 15, 2007 4:19 pm    Post subject: Reply with quote

can you give me the full code jonny?? with that code of you? (i'm not really good in autohotkey scripting)

and then i have a second question: did you know a good tutorial about autohotkey scripting??
Back to top
polyethene



Joined: 11 Aug 2004
Posts: 5248
Location: UK

PostPosted: Mon Jan 15, 2007 4:38 pm    Post subject: Reply with quote

Jero3n wrote:
did you know a good tutorial about autohotkey scripting??
Quick-start Tutorial...
_________________
GitHubScriptsIronAHK Contact by email not private message.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
BoBo
Guest





PostPosted: Mon Jan 15, 2007 4:46 pm    Post subject: Reply with quote

Another thread which might be of interest for gamesters: NEEDS HELP: AUTOTHINKER Wink
Back to top
Jero3n
Guest





PostPosted: Mon Jan 15, 2007 5:12 pm    Post subject: Reply with quote

Titan wrote:
Jero3n wrote:
did you know a good tutorial about autohotkey scripting??
Quick-start Tutorial...

that tut is not very good..
Back to top
BoBo
Guest





PostPosted: Mon Jan 15, 2007 6:25 pm    Post subject: Reply with quote

Quote:
that tut is not very good..
Indeed, it doesn't cover the standard expectation of most gamesters, to deliver instant scripts without that they've to invest any personal effort.
So, you're damn right, life stinks. Mad
Back to top
jonny



Joined: 13 Nov 2004
Posts: 2951
Location: Minnesota

PostPosted: Mon Jan 15, 2007 8:48 pm    Post subject: Reply with quote

Quote:
can you give me the full code jonny??


What full code? That's all I wrote. I only made it to demonstrate how to start and stop a script from another script. You need DetectHiddenWindows,on in the auto-execute, the line assigned to F1 to start it, and the line assigned to F2 to stop it.
Back to top
View user's profile Send private message
Justineo14



Joined: 30 Oct 2006
Posts: 43

PostPosted: Mon Jan 15, 2007 10:59 pm    Post subject: Try this Reply with quote

Code:
Gui, Color, red
Gui, Font, S8 Cwhite w600, Arial ;*******
Gui, Add, Text, x120 y5 w110,Auto Talker
Gui, Add, Text, x15 y53,De tekst: ; p = previous
Gui, Add, Text, xp y77 wp,Pauze(in milliseconden):
Gui, Font, S8 Cred w600, Arial ;*********
Gui, Add, Edit, Text x130 y50 w150 vtext,
Gui, Add, Edit, number x130 y80 w150 vduration,
Gui, Add, Button, Default x80 y146 w56 galgud,&OK
Gui, Add, Button, x150 y146 w56 gquit,&Sluit
Gui, Show, Center w300 h190
Return

algud:
Gui, Submit, Nohide
Hotkey, F1, DoThis
RETURN





DoThis:
Loop
{
    if GetKeyState("F2")
        break

    else
        Sleep, %duration%
        Send, %text% {ENTER}
}
Return

Quit:
ExitApp
Return



Hope that helps Smile
_________________
Tex© Click here to mail me
Back to top
View user's profile Send private message MSN Messenger
Jero3n
Guest





PostPosted: Tue Jan 16, 2007 5:48 pm    Post subject: Reply with quote

if i then click at F2, it dont stop. how can that????
Back to top
Jero3n
Guest





PostPosted: Fri Jan 19, 2007 3:12 pm    Post subject: Reply with quote

plz give me an answer Razz
Back to top
tonne



Joined: 06 Jun 2006
Posts: 1651
Location: Denmark

PostPosted: Fri Jan 19, 2007 3:38 pm    Post subject: Reply with quote

GetKeyState checks if the key is down when it's called.
If F2 is pressed and released during the sleep your test fails.

You could make F2 a hotkey that stops the loop:
Code:
DoThis:
stopped = 0
Hotkey, F2, StopIt
Loop
{
  Sleep, %duration%

  if stopped = 1
    break
  else
    Send, %text% {ENTER}
}
Hotkey, F2, off
Return

StopIt:
  Critical, On
  stopped = 1
Return

_________________
RegEx Powered Dynamic Hotstrings
COM
AutoHotkey 2
Back to top
View user's profile Send private message
Jero3n
Guest





PostPosted: Fri Jan 19, 2007 8:08 pm    Post subject: Reply with quote

thx now it works Very Happy
Back to top
Jero3n



Joined: 19 Jan 2007
Posts: 147

PostPosted: Sat Jan 20, 2007 9:09 am    Post subject: Reply with quote

this is what i made from it (i zip it Very Happy)

http://www.autohotkey.net/~Jero3n/WinAce.zip
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group