Du bist nicht angemeldet.

[erledigt] Bot geht ned

1

Sonntag, 8. März 2009, 17:15

Bot geht ned

Hallo,

ich versuche grad einen bot zu erstellen, aber leider klapt das nicht

Global $voice = ObjCreate("Sapi.SpVoice")
Speak("Steine killer bot ", 0.75, 100)
Func Speak($Text, $Rate, $Vol)
$voice.Rate = $Rate
$voice.Volume = $Vol
$voice.Speak ($Text)
Func HotKeySet (" Space " )
HotKeySet (" 1 " )
HotKeySet (" 2 " )
HotKeySet (" y " )

aber leider klapt das nicht wieso???

FirePanther

The Coderz-Master

Beiträge: 4 029

Wohnort: Berlin

Guthaben: 1 903 CC-Euro

  • Private Nachricht senden

2

Sonntag, 8. März 2009, 17:37

hi
Global $voice = ObjCreate("Sapi.SpVoice") Speak("Welcome to The Coderz-Community", 0.75, 100) Func Speak($Text, $Rate, $Vol) $voice.Rate = $Rate $voice.Volume = $Vol $voice.Speak ($Text) EndFunc

AutoIt-Quellcode

 1 
 2 
 3 
 4 
 5 
 6 
 7 
Global $voice = ObjCreate("Sapi.SpVoice")
Speak("Welcome to The Coderz-Community", 0.75, 100)
Func Speak($Text, $Rate, $Vol)
$voice.Rate = $Rate
$voice.Volume = $Vol
$voice.Speak ($Text)
EndFunc


die 2. funktion versteh ich nicht, bei der 1. hast du nur endfunc vergessen und die hotkeys sind alle falsch ^^
[box]Typisch Coderz-Team:
Mein Name ist FirePanther, das L steht für Gefahr...
ProCoder: Da ist kein L vorhanden.
LooCuz: wo isn da ein L
FirePanther: ihr idioten, Gefahr wird auch nicht mit L geschrieben xD[/box]

Neustes Projekt: www.autoit.at

3

Dienstag, 10. März 2009, 16:12

Erstmal möchte ich mich bedanken, das du mir überhaupt geantwortet hast^^

also

Ich will den bot so scripten, dass der 2 funktionen enthält, 1, sprech funktion 2, hotkeys ( naja du weis was ich meine )

FirePanther

The Coderz-Master

Beiträge: 4 029

Wohnort: Berlin

Guthaben: 1 903 CC-Euro

  • Private Nachricht senden

4

Dienstag, 10. März 2009, 16:44

hier ma das neue:
activatehotkey() Global $text="Welcome to the Coderz-Community" Global $voice = ObjCreate("Sapi.SpVoice") While 1 WEnd Func startspeak() $voice.Rate = 0.75 $voice.Volume = 100 $voice.Speak ($text) EndFunc Func settext() deactivatehotkey() $text=InputBox("TCC-Board","Gib hier einen Text ein:",$text,"",250,150) activatehotkey() EndFunc Func close() Exit EndFunc Func activatehotkey() HotKeySet("{numpad1}","startspeak") HotKeySet("{numpad2}","settext") HotKeySet("{numpad3}","close") EndFunc Func deactivatehotkey() HotKeySet("{numpad1}") HotKeySet("{numpad2}") HotKeySet("{numpad3}") EndFunc

AutoIt-Quellcode

 1 
 2 
 3 
 4 
 5 
 6 
 7 
 8 
 9 
 10 
 11 
 12 
 13 
 14 
 15 
 16 
 17 
 18 
 19 
 20 
 21 
 22 
 23 
 24 
 25 
 26 
 27 
 28 
 29 
 30 
 31 
 32 
 33 
 34 
activatehotkey()
Global $text="Welcome to the Coderz-Community"
Global $voice = ObjCreate("Sapi.SpVoice")
 
While 1
WEnd
 
 
Func startspeak()
	$voice.Rate = 0.75
	$voice.Volume = 100
	$voice.Speak ($text)
EndFunc
 
Func settext()
	deactivatehotkey()
	$text=InputBox("TCC-Board","Gib hier einen Text ein:",$text,"",250,150)
	activatehotkey()
EndFunc
 
Func close()
	Exit
EndFunc
 
Func activatehotkey()
	HotKeySet("{numpad1}","startspeak")
	HotKeySet("{numpad2}","settext")
	HotKeySet("{numpad3}","close")
EndFunc
Func deactivatehotkey()
	HotKeySet("{numpad1}")
	HotKeySet("{numpad2}")
	HotKeySet("{numpad3}")
EndFunc
[box]Typisch Coderz-Team:
Mein Name ist FirePanther, das L steht für Gefahr...
ProCoder: Da ist kein L vorhanden.
LooCuz: wo isn da ein L
FirePanther: ihr idioten, Gefahr wird auch nicht mit L geschrieben xD[/box]

Neustes Projekt: www.autoit.at

5

Mittwoch, 11. März 2009, 15:16

Jhuhuuuuuuuu 1000000000000000 maaaal dankeee...

aber ich höre irgend wie nichts :(

FirePanther

The Coderz-Master

Beiträge: 4 029

Wohnort: Berlin

Guthaben: 1 903 CC-Euro

  • Private Nachricht senden

6

Mittwoch, 11. März 2009, 15:34

du musst die 1 beim numpad drücken
schau auch dass num locked is
mit num 2 kannst du dein text ändern und num 3 ist zum beenden
bei mir klappts
[box]Typisch Coderz-Team:
Mein Name ist FirePanther, das L steht für Gefahr...
ProCoder: Da ist kein L vorhanden.
LooCuz: wo isn da ein L
FirePanther: ihr idioten, Gefahr wird auch nicht mit L geschrieben xD[/box]

Neustes Projekt: www.autoit.at

7

Mittwoch, 11. März 2009, 20:12

Okay danke aber ich will eig. des so machen, das der auf die tasten Y + LeerTaste+ 1+ 2 drückt .. wie mach ich des???
Also der soll erst reden, dann die tasten drücken! wie geht des?

FirePanther

The Coderz-Master

Beiträge: 4 029

Wohnort: Berlin

Guthaben: 1 903 CC-Euro

  • Private Nachricht senden

8

Mittwoch, 11. März 2009, 20:18

das geht mit send...
hotkey ist nur dass wir auf ne taste drücken
tastensimulation geht mit send
also
send("y{space}12")

AutoIt-Quellcode

 1 
send("y{space}12")

siehe dafür noch die hilfe (klicke dafür einfach oben in der autoitbox auf send um die deutsche hilfe zu lesen)
[box]Typisch Coderz-Team:
Mein Name ist FirePanther, das L steht für Gefahr...
ProCoder: Da ist kein L vorhanden.
LooCuz: wo isn da ein L
FirePanther: ihr idioten, Gefahr wird auch nicht mit L geschrieben xD[/box]

Neustes Projekt: www.autoit.at

9

Mittwoch, 11. März 2009, 20:28

Also so?

activatehotkey() Global $text="Welcome to the Coderz-Community" Global $voice = ObjCreate("Sapi.SpVoice") While 1 WEnd Func startspeak() $voice.Rate = 0.75 $voice.Volume = 100 $voice.Speak ($text) EndFunc Func settext() deactivatehotkey() $text=InputBox("TCC-Board","Gib hier einen Text ein:",$text,"",250,150) activatehotkey() EndFunc Func close() Exit EndFunc Func activatehotkey() HotKeySet("{numpad1}","startspeak") HotKeySet("{numpad2}","settext") HotKeySet("{numpad3}","close") send("y{space}12") send("1{1}12") send("2{1}12") EndFunc Func deactivatehotkey() HotKeySet("{numpad1}") HotKeySet("{numpad2}") HotKeySet("{numpad3}") EndFunczz

AutoIt-Quellcode

 1 
 2 
 3 
 4 
 5 
 6 
 7 
 8 
 9 
 10 
 11 
 12 
 13 
 14 
 15 
 16 
 17 
 18 
 19 
 20 
 21 
 22 
 23 
 24 
 25 
 26 
 27 
 28 
 29 
 30 
 31 
 32 
 33 
 34 
 35 
 36 
 37 
activatehotkey()
Global $text="Welcome to the Coderz-Community"
Global $voice = ObjCreate("Sapi.SpVoice")
 
While 1
WEnd
 
 
Func startspeak()
	$voice.Rate = 0.75
	$voice.Volume = 100
	$voice.Speak ($text)
EndFunc
 
Func settext()
	deactivatehotkey()
	$text=InputBox("TCC-Board","Gib hier einen Text ein:",$text,"",250,150)
	activatehotkey()
EndFunc
 
Func close()
	Exit
EndFunc
 
Func activatehotkey()
	HotKeySet("{numpad1}","startspeak")
	HotKeySet("{numpad2}","settext")
	HotKeySet("{numpad3}","close")
	send("y{space}12")
	send("1{1}12")
	send("2{1}12")
EndFunc
Func deactivatehotkey()
	HotKeySet("{numpad1}")
	HotKeySet("{numpad2}")
	HotKeySet("{numpad3}")
EndFunczz

FirePanther

The Coderz-Master

Beiträge: 4 029

Wohnort: Berlin

Guthaben: 1 903 CC-Euro

  • Private Nachricht senden

10

Mittwoch, 11. März 2009, 20:51

[infobox]Automessage: Die Frage wurde beantwortet von diesem Beitrag.[/infobox]
activatehotkey() Global $text="Welcome to the Coderz-Community" Global $voice = ObjCreate("Sapi.SpVoice") While 1 WEnd Func startspeak() $voice.Rate = 0.75 $voice.Volume = 100 $voice.Speak ($text) EndFunc Func settext() deactivatehotkey() send("y{space}12") ; space heisst leertaste... hier wird y leertaste 1 2 gedrückt $text=InputBox("TCC-Board","Gib hier einen Text ein:",$text,"",250,150) activatehotkey() EndFunc Func close() Exit EndFunc Func activatehotkey() HotKeySet("{numpad1}","startspeak") HotKeySet("{numpad2}","settext") HotKeySet("{numpad3}","close") EndFunc Func deactivatehotkey() HotKeySet("{numpad1}") HotKeySet("{numpad2}") HotKeySet("{numpad3}") EndFunc

AutoIt-Quellcode

 1 
 2 
 3 
 4 
 5 
 6 
 7 
 8 
 9 
 10 
 11 
 12 
 13 
 14 
 15 
 16 
 17 
 18 
 19 
 20 
 21 
 22 
 23 
 24 
 25 
 26 
 27 
 28 
 29 
 30 
 31 
 32 
 33 
 34 
 35 
activatehotkey()
Global $text="Welcome to the Coderz-Community"
Global $voice = ObjCreate("Sapi.SpVoice")
 
While 1
WEnd
 
 
Func startspeak()
	$voice.Rate = 0.75
	$voice.Volume = 100
	$voice.Speak ($text)
EndFunc
 
Func settext()
	deactivatehotkey()
	send("y{space}12") ; space heisst leertaste... hier wird y leertaste 1 2 gedrückt
	$text=InputBox("TCC-Board","Gib hier einen Text ein:",$text,"",250,150)
	activatehotkey()
EndFunc
 
Func close()
	Exit
EndFunc
 
Func activatehotkey()
	HotKeySet("{numpad1}","startspeak")
	HotKeySet("{numpad2}","settext")
	HotKeySet("{numpad3}","close")
EndFunc
Func deactivatehotkey()
	HotKeySet("{numpad1}")
	HotKeySet("{numpad2}")
	HotKeySet("{numpad3}")
EndFunc
[box]Typisch Coderz-Team:
Mein Name ist FirePanther, das L steht für Gefahr...
ProCoder: Da ist kein L vorhanden.
LooCuz: wo isn da ein L
FirePanther: ihr idioten, Gefahr wird auch nicht mit L geschrieben xD[/box]

Neustes Projekt: www.autoit.at

Ähnliche Themen