Jump to content

General language help


jensw
 Share

Recommended Posts

Hello

I want to write a program to help me with my bad habit of cussing over the internet.

I figured the best way to do this is to show a popup text message every time a cuss word is typed.

Or maybe have autoit turn of the chatwindow im using, im not sure wich will be most effective.

The program icon need to be hidden when running, or i will instinctly turn the program off.

I have no programming experience so i tried to find some sort of "dictionary" over autoit searching the web.

The best result was the lists on this page, but i wasnt helped much by that, since i dont know what functions im searching for.

Here what my feeble mind came up with

CODE
Do

sleep(100)

If

Send( "shit" )

Then

MsgBox(0, '')

EndIf

$s +=1

Until $s = -1

Im not sure what any of the functions do, that code is just a wild guess..of course it didnt work haha.

So, can someone direct me to a place where i can learn how to write this program, or maybe come up with an idea for a code?

Link to comment
Share on other sites

In order for this to work you'd really need some keylog code then modify it so you might get a little help but I don't think you'll get much. You could just start a swear jar. Believe me when you see $50 in pennies in that thing you'll cut back.

Link to comment
Share on other sites

In order for this to work you'd really need some keylog code then modify it so you might get a little help but I don't think you'll get much. You could just start a swear jar. Believe me when you see $50 in pennies in that thing you'll cut back.

Yea i guess that could work if i didnt live alone. I know i wont put a dime in that thing by myself :)

Link to comment
Share on other sites

You could use HotStrings, check the example for _WinAPI_SetWindowsHookEx() in the helpfile or THIS topic

Hmm i downloaded the zipfile with hotstrings.au3 and those files.

Then i tried exporting the example as an exe file, but the compiler program send an error message saying "Line 3....#include <HotString.au3> Error opening the file"

How do i use the hotstrings files?

Link to comment
Share on other sites

If you're going to do it like #include <file> you have to have it in the autoit includes directory. If it's in the same directory as your script use #include "file.au3" or the full filepath if it's somewhere else.

Link to comment
Share on other sites

Hmm i downloaded the zipfile with hotstrings.au3 and those files.

Then i tried exporting the example as an exe file, but the compiler program send an error message saying "Line 3....#include <HotString.au3> Error opening the file"

How do i use the hotstrings files?

Nevermind about that question, i see that the name of the "include" filename is different from the actual file included.

Link to comment
Share on other sites

You need to have HotString.au3 in either the same folder as the script or where AutoIt's includes are.

Ok, moving on then..I know how to make a textbox but..

what kind of functions should i look into when i want to

1. Close a program, say Opera or MSN or such

2. Make the autoit program keep running after doing its thing...its thing being closing a program or displaying a textbox

3. Hide the autoit "running" icon.

Link to comment
Share on other sites

Ok, so i used the example.au3 and came up with something that works, but not the way i want it to.

With this code, the program kills the opera windows after the word "shit", then the next word must be "crap" for the program to close opera again.

How can i code it so that there is no need for an order in the way the strings are typed for the program to kill opera.

CODE
; Authors: Manadar, LarryDalooza, piccaso

#include <HotStrings.au3>

HotStringSet("shit","e1")

HotStringSet("crap","e2")

While 1

Sleep(100)

WEnd

Func e1()

If ProcessExists( "Opera.exe") Then ProcessClose( "Opera.exe")

EndFunc

Func e2()

If ProcessExists( "Opera.exe") Then ProcessClose( "Opera.exe")

EndFunc

Edited by jensw
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...