AutoHotkey Community

It is currently May 24th, 2012, 2:51 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 44 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: NEEDS HELP: AUTOTALKER
PostPosted: January 14th, 2007, 3:01 pm 
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 :D
but i want too that if i press f2, the auto-talker stops...
how can i do that???????????
plz help me!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 14th, 2007, 5:12 pm 
Offline

Joined: December 11th, 2006, 4:11 pm
Posts: 242
Location: Orlando, FL
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 :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 15th, 2007, 1:38 am 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
Um... why use a timer? :?

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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 15th, 2007, 5:19 pm 
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??


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 15th, 2007, 5:38 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5346
Location: UK
Jero3n wrote:
did you know a good tutorial about autohotkey scripting??
Quick-start Tutorial...

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 15th, 2007, 5:46 pm 
Another thread which might be of interest for gamesters: NEEDS HELP: AUTOTHINKER :wink:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 15th, 2007, 6:12 pm 
Titan wrote:
Jero3n wrote:
did you know a good tutorial about autohotkey scripting??
Quick-start Tutorial...

that tut is not very good..


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 15th, 2007, 7:25 pm 
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. :x


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 15th, 2007, 9:48 pm 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Try this
PostPosted: January 15th, 2007, 11:59 pm 
Offline

Joined: October 30th, 2006, 10:17 pm
Posts: 43
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 :)

_________________
Tex© Click here to mail me


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 16th, 2007, 6:48 pm 
if i then click at F2, it dont stop. how can that????


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 19th, 2007, 4:12 pm 
plz give me an answer :P


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 19th, 2007, 4:38 pm 
Offline

Joined: June 6th, 2006, 3:19 pm
Posts: 1654
Location: Denmark
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 19th, 2007, 9:08 pm 
thx now it works :D


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2007, 10:09 am 
Offline

Joined: January 19th, 2007, 9:09 pm
Posts: 147
this is what i made from it (i zip it :D)

http://www.autohotkey.net/~Jero3n/WinAce.zip


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 44 posts ]  Go to page 1, 2, 3  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: azure, jyloup, Pulover and 13 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group