newb2007 Posted November 4, 2007 Posted November 4, 2007 hi.. i tried sending text with a press of a key #Include <Misc.au3> if _IsPressed('61') then Send("{a 1}") ;Sends 1 'h' characters Send("{a 1}") ;Sends 5 'e' characters Send("{a 1}") ;Sends 5 'j' characters endfunc can anyone help me :S?
Nahuel Posted November 4, 2007 Posted November 4, 2007 #Include <Misc.au3> if _IsPressed('61') then Send("{a 1}") ;Sends 1 'h' 1 a characters Send("{a 1}") ;Sends 5 'e' 1 a characters Send("{a 1}") ;Sends 5 'j' 1 a characters endfunc This script will run and exit immediately. Include a loop so it checks continuously. But maybe using HotKeySet() is better..? expandcollapse popup;Set hotkeys: HotKeySet("{numpad1}", "a") HotKeySet("{numpad2}", "e") HotKeySet("{numpad3}", "i") HotKeySet("{numpad4}", "o") HotKeySet("{numpad5}", "u") HotKeySet("{ESC}", "_Quit") ;Idle around While 1 Sleep(50) WEnd ;Functions Func a() Send("a") EndFunc ;==>a Func e() Send("e") EndFunc ;==>e Func i() Send("i") EndFunc ;==>i Func o() Send("o") EndFunc ;==>o Func u() Send("u") EndFunc ;==>u Func _Quit() Exit EndFunc ;==>_Quit
newb2007 Posted November 4, 2007 Author Posted November 4, 2007 This script will run and exit immediately. Include a loop so it checks continuously. But maybe using HotKeySet() is better..? expandcollapse popup;Set hotkeys: HotKeySet("{numpad1}", "a") HotKeySet("{numpad2}", "e") HotKeySet("{numpad3}", "i") HotKeySet("{numpad4}", "o") HotKeySet("{numpad5}", "u") HotKeySet("{ESC}", "_Quit") ;Idle around While 1 Sleep(50) WEnd ;Functions Func a() Send("a") EndFunc ;==>a Func e() Send("e") EndFunc ;==>e Func i() Send("i") EndFunc ;==>i Func o() Send("o") EndFunc ;==>o Func u() Send("u") EndFunc ;==>u Func _Quit() Exit EndFunc ;==>_Quit thx for your time i tried modify the code and i want it to write text not just letters, it wont work :/
Nahuel Posted November 4, 2007 Posted November 4, 2007 ? Just change Send("a") with Send("your text") It HAS to work.
newb2007 Posted November 4, 2007 Author Posted November 4, 2007 (edited) ?Just change Send("a") with Send("your text")It HAS to work.No ;/ Works fine if i dont use enter, I want spaces between the words ERROR :Func hej neger()Error badly formatted "func" statementCode :;Set hotkeys:HotKeySet("{numpad1}", "hej neger")HotKeySet("{numpad2}", "e")HotKeySet("{numpad3}", "i")HotKeySet("{numpad4}", "o")HotKeySet("{numpad5}", "u")HotKeySet("{ESC}", "_Quit");Idle aroundWhile 1 Sleep(50)WEnd;FunctionsFunc hej neger() Send("hej neger")EndFunc ;==>hej negerFunc e() Send("e")EndFunc ;==>eFunc i() Send("i")EndFunc ;==>iFunc o() Send("o")EndFunc ;==>oFunc u() Send("u")EndFunc ;==>uFunc _Quit() ExitEndFunc ;==>_Quit Edited November 4, 2007 by newb2007
Nahuel Posted November 4, 2007 Posted November 4, 2007 You can't use spaces in a function name, dude...
newb2007 Posted November 4, 2007 Author Posted November 4, 2007 (edited) You can't use spaces in a function name, dude...look at my name dude hmm, is there any other way?If you load a txt file automatic, take the first line copy that and have a hotkey for paste? Edited November 4, 2007 by newb2007
Nahuel Posted November 4, 2007 Posted November 4, 2007 look at my name dude hmm, is there any other way?Well... don't use spaces Use a _ instead.
newb2007 Posted November 4, 2007 Author Posted November 4, 2007 Well... don't use spaces Use a _ instead.If there is no other none complicated way (for you) than this will work more than fine thx again..
Nahuel Posted November 4, 2007 Posted November 4, 2007 If there is no other none complicated way (for you) than this will work more than fine thx again..What?
newb2007 Posted November 4, 2007 Author Posted November 4, 2007 (edited) What? I meant, for me pretty much anything is complicated. If i only say complicated i refer to what i belive is complicated.LOL..Nnevermind thx man Edited November 4, 2007 by newb2007
Nevin Posted November 4, 2007 Posted November 4, 2007 LOL this thread is hilarious. Maybe it's the beer talking. There's no way to avoid spaces, though. Either you have to use those annoying underscores --> "_" or you can leave spaces out and WriteLikeThis
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now