Close

Results 1 to 15 of 15
  1. #1
    DF VIP Member rids's Avatar
    Join Date
    Oct 2007
    Location
    here
    Posts
    1,225
    Thanks
    395
    Thanked:        187
    Karma Level
    263

    Help auto text program

    what im after is a program i can run and all it dose is type a word or sentence.

    i was watching a pod cast about a awesome button that when you hit it it typed diffident words that meant the same as awesome. i thought maybe there would be a program that i can run that will do some thing similar but cant find one.

    i thought it cant be much different to the hello world program. but sadly that was as far as i went with c+ about 20 years ago (maybe a bit less)

    so can some on help or do it for me
    it need to me an exe so i can fun it from my fav buttons on my keyboard
    i need to be able to open it up and change the word/sentence it types (i suppose note pad would be nice).
    it needs to just type the words and then vanish

    i hope i have put this in the right thread
    and this is for my own use

    thanks for reading this any help will be appreciated

  2. #2
    DF VIP Member rIKmAN's Avatar
    Join Date
    Mar 2002
    Location
    Stafford
    Posts
    6,502
    Thanks
    1,061
    Thanked:        645
    Karma Level
    636

    Default Re: auto text program

    I'm not sure exactly what you mean mate?
    When you say "it needs to type the words and then vanish"...do you mean display them in a window for a set time...then close?

    Also what words...or do you want to be able to specify the word and then the variations of it based off the contents of a text file that you edit yourself?

    If you can nail down what you want I'll give it go for you.

  3. #3
    DF VIP Member tom999's Avatar
    Join Date
    Nov 2000
    Location
    My house
    Posts
    849
    Thanks
    9
    Thanked:        9
    Karma Level
    335

    Default

    Sounds like something you could do with autohotkey, give it a google
    -= tom999 =-
    tonight the milky bars are on me

    __________________

  4. #4
    DF VIP Member rids's Avatar
    Join Date
    Oct 2007
    Location
    here
    Posts
    1,225
    Thanks
    395
    Thanked:        187
    Karma Level
    263

    Default Re: auto text program

    http://blog.makezine.com/archive/201...me-button.html

    basicly that is what i want to do but using the 5 favourite keys on my keyboard (each one can be set to a program)
    so if i hit button 1 i can have it say a rude word or if i hit 2 it will be a polite word.
    i used visual basic and wrote a spammer using bits from tube that sort of did it but i had to open it up and close it then i couldn't get it to random pic different words.
    basicly i have no idea when it come to programming.

  5. #5
    DF VIP Member rIKmAN's Avatar
    Join Date
    Mar 2002
    Location
    Stafford
    Posts
    6,502
    Thanks
    1,061
    Thanked:        645
    Karma Level
    636

    Default Re: auto text program

    Ah OK I understand now...you want to press a button and have it paste into whatever program you are using so you don;t use the same word all the time.

    The problem with this is that you would need to know the HWnd (Window Handle) of the program you want to paste the text into, which is pretty much impossible as it might be MSN, Skype, Notepad, Word, Open Office, Wordpad, IE etc...far too many possibilties to make it worth the effort.

    Why not just have 2 text files (1=rude,2=polite) linked to the buttons and pick one from the list.

    I could write you a program to randomly pick one from a text file, but you'd have to copy and paste it yourself (or at least paste into the program your using) as like I say above it's too much hassle otherwise.

    The video you showed above gets round all this as the teensy is used as a keyboard HID device so a simple button press emulates ctrl-v like you pressed it on the keyboard, so you don't need to find the HWnd etc as it will simply paste straight to whatever you have open like a keyboard would without opening any other windows and taking away focus etc.

  6. #6
    DF VIP Member Possy_99's Avatar
    Join Date
    Dec 2003
    Location
    UK
    Posts
    2,082
    Thanks
    15
    Thanked:        11
    Karma Level
    388

    Default Re: auto text program

    here's my shot..

    rikman is right about the window losing focus, so what I've come up with is a script which you could load via a hotkey but then you have to click the (already open) window of the application you want the text to go to..

    source: (autoit script)
    Code:
    $string="neat,cool,incredible,excellent,crack,exceptional,fantastic,fabulous,fine,first-rate,marvelous,super,tremendous,wonderful,brilliant,superb,keen,laudable,worthy,rad,sweet,fresh,dope,fly,nifty,astonishing,awe-inspiring,beautiful,breathtaking,grand,impressive,magnificent,majestic,mind-blowing,striking,stunning"
     $Array=StringSplit($string,",")
    GUICreate("hidden", "hidden", 1,1)
    WinActivate("hidden")
     WinWaitNotActive("hidden")
     $i=Random(1,UBound($Array)-1,1)
     Send($Array[$i]&" ")
    exe download:
    MEGAUPLOAD - The leading online storage and file delivery service
    (megaupload.com/?d=FQND2ALX)



    ..so download the exe, setup your keyboard hotkey to load the exe.. when hotkey pressed you will see the autoit icon in your system tray, click on the area/program you want to send the text to (must already be open) and the text will be applied and script will close..

    ..tested on win7 x86.
    Sent from my PC using a keyboard

  7. #7
    DF VIP Member rIKmAN's Avatar
    Join Date
    Mar 2002
    Location
    Stafford
    Posts
    6,502
    Thanks
    1,061
    Thanked:        645
    Karma Level
    636

    Default Re: auto text program

    Ah sweet, didn't even know about autoit, I was thinking from a completely coding point of view.
    Will have a look at that program, seems handy, nice one possy.

  8. #8
    DF VIP Member Possy_99's Avatar
    Join Date
    Dec 2003
    Location
    UK
    Posts
    2,082
    Thanks
    15
    Thanked:        11
    Karma Level
    388

    Default Re: auto text program

    no probs rikman, autoit is very easy to use and very robust.. I've done alot with it

    so I kinda misread the request and just duplicated the example.. I've reworked it and now have 2 executables, one good, one bad.. create two text documents in the same folder as the exe's (good.txt & bad.txt) and set hotkeys up for both exe's.. the scripts will read their corresponding txt files and randomly use a word from the files.. seperate each word with a comma in the txt files.. ie.. "neat,cool,incredible,excellent,crack"

    same method as earlier.. set hotkey (for both) once script is launched click area/window you want text applied (must already be open)

    source: (autoit script)

    Code:
     $file = FileRead("good.txt")
     $Array=StringSplit($file,",")
     GUICreate("hidden", "hidden", 1,1)
    WinActivate("hidden")
     WinWaitNotActive("hidden")
     $i=Random(1,UBound($Array)-1,1)
     Send($Array[$i]&" ")
    (source for bad exe is identical appart from obviously reading bad.txt instead)


    exe download:
    MEGAUPLOAD - The leading online storage and file delivery service
    (megaupload.com/?d=PDELCV0B)
    Last edited by Possy_99; 19th April 2011 at 02:06 PM.
    Sent from my PC using a keyboard

  9. #9
    DF VIP Member rids's Avatar
    Join Date
    Oct 2007
    Location
    here
    Posts
    1,225
    Thanks
    395
    Thanked:        187
    Karma Level
    263

    Default Re: auto text program

    Quote Originally Posted by Possy_99 View Post
    no probs rikman, autoit is very easy to use and very robust.. I've done alot with it

    so I kinda misread the request and just duplicated the example.. I've reworked it and now have 2 executables, one good, one bad.. create two text documents in the same folder as the exe's (good.txt & bad.txt) and set hotkeys up for both exe's.. the scripts will read their corresponding txt files and randomly use a word from the files.. seperate each word with a comma in the txt files.. ie.. "neat,cool,incredible,excellent,crack"

    same method as earlier.. set hotkey (for both) once script is launched click area/window you want text applied (must already be open)

    source: (autoit script)

    Code:
     $file = FileRead("good.txt")
     $Array=StringSplit($file,",")
     GUICreate("hidden", "hidden", 1,1)
    WinActivate("hidden")
     WinWaitNotActive("hidden")
     $i=Random(1,UBound($Array)-1,1)
     Send($Array[$i]&" ")
    (source for bad exe is identical appart from obviously reading bad.txt instead)


    exe download:
    MEGAUPLOAD - The leading online storage and file delivery service
    (megaupload.com/?d=PDELCV0B)
    mate thats amzing thank you very much i realy nead to learn some kind of programming
    but as a roofer i dont realy come across a big need in my job it dont help me at women much LOL
    if i was to take up some kind of programming (the most i remember is wrighting out loads of basic on a Sinclair ZX81) and the fact i cant spell for shit (dyslexia) would you recommend an easer language as there seem to be more and more about the more you look ?

    but again big thanks guys very much appreciated.

  10. #10
    DF VIP Member rids's Avatar
    Join Date
    Oct 2007
    Location
    here
    Posts
    1,225
    Thanks
    395
    Thanked:        187
    Karma Level
    263

    Default Re: auto text program

    ok so that program works great just a small problem i dont know why but when its auto run from my hot key is just types 1 which is strange as it works if i click it (aprt from it typing the odd space (think my last word shouldn't have a commer after it.

  11. #11
    DF VIP Member Possy_99's Avatar
    Join Date
    Dec 2003
    Location
    UK
    Posts
    2,082
    Thanks
    15
    Thanked:        11
    Karma Level
    388

    Default Re: auto text program

    if it's only typing 1 then it can't find the txt files..

    revised source:
    Code:
    $file = FileRead(@ScriptDir&"\good.txt")
    exe download:
    MEGAUPLOAD - The leading online storage and file delivery service
    (megaupload.com/?d=BHC3QXIM)
    Sent from my PC using a keyboard

  12. #12
    DF VIP Member rIKmAN's Avatar
    Join Date
    Mar 2002
    Location
    Stafford
    Posts
    6,502
    Thanks
    1,061
    Thanked:        645
    Karma Level
    636

    Default Re: auto text program

    What sort of stuff do you want to code rids, apps, little utilities, games?

  13. #13
    DF VIP Member rids's Avatar
    Join Date
    Oct 2007
    Location
    here
    Posts
    1,225
    Thanks
    395
    Thanked:        187
    Karma Level
    263

    Default Re: auto text program

    Quote Originally Posted by Possy_99 View Post
    if it's only typing 1 then it can't find the txt files..

    revised source:
    Code:
    $file = FileRead(@ScriptDir&"\good.txt")
    exe download:
    MEGAUPLOAD - The leading online storage and file delivery service
    (megaupload.com/?d=BHC3QXIM)
    man thats awesome that works so well i am so great full

    is it because you tell it where to check ?

    can u explain as to why that line makes it read it ?

  14. #14
    DF VIP Member rids's Avatar
    Join Date
    Oct 2007
    Location
    here
    Posts
    1,225
    Thanks
    395
    Thanked:        187
    Karma Level
    263

    Default Re: auto text program

    Quote Originally Posted by rIKmAN View Post
    What sort of stuff do you want to code rids, apps, little utilities, games?
    just little useful things like this i suppose

  15. #15
    DF VIP Member Possy_99's Avatar
    Join Date
    Dec 2003
    Location
    UK
    Posts
    2,082
    Thanks
    15
    Thanked:        11
    Karma Level
    388

    Default Re: auto text program

    yeah, was a bit sloppy of me 1st time round.. such problems can arise when using shortcuts to the exe's etc.. (which your hotkey app may be doing) the script will check the location where the shortcut/hot key app is located instead of the exe location.. adding the @ScriptDir macro is far a far more accurate method of making sure it looks in the right place.

    can't reccomend autoit enough.. I started on good ol' bbc's and spectrums too - i find it difficult to learn vb too. Autoit has an excellent help file though.. gives you info on all the commands and if you download scite it has syntax checking so you usually know exactly where any errors are occuring.. not to mention the forum.. I've used autoit for a wide variety of purposes now
    Last edited by Possy_99; 19th April 2011 at 11:37 PM.
    Sent from my PC using a keyboard

Similar Threads

  1. Free Text Guaranteed
    By drew1982 in forum Hall Of Shame
    Replies: 11
    Last Post: 16th April 2003, 10:30 PM
  2. auto read cds
    By {film_man} in forum PC Problems
    Replies: 7
    Last Post: 17th September 2002, 05:36 PM
  3. Sky text messenger
    By carrot girl in forum Digital Satellite TV
    Replies: 3
    Last Post: 5th September 2002, 05:48 PM
  4. AUTO MODELLISTA NTSC/JAP - This is a great game
    By alvarotg in forum Sony Consoles
    Replies: 4
    Last Post: 31st August 2002, 07:51 PM
  5. The best Program ever...
    By Mr E Nigma in forum Cars & Motorbikes
    Replies: 9
    Last Post: 30th August 2002, 03:06 AM

Social Networking Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •