jensw Posted September 29, 2008 Posted September 29, 2008 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 CODEDo 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?
dbzfanatic Posted September 29, 2008 Posted September 29, 2008 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. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote]
AdmiralAlkex Posted September 29, 2008 Posted September 29, 2008 You could use HotStrings, check the example for _WinAPI_SetWindowsHookEx() in the helpfile or THIS topic .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
jensw Posted September 29, 2008 Author Posted September 29, 2008 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
jensw Posted September 29, 2008 Author Posted September 29, 2008 You could use HotStrings, check the example for _WinAPI_SetWindowsHookEx() in the helpfile or THIS topicHmm 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?
dbzfanatic Posted September 29, 2008 Posted September 29, 2008 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. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote]
AdmiralAlkex Posted September 29, 2008 Posted September 29, 2008 You need to have HotString.au3 in either the same folder as the script or where AutoIt's includes are. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
jensw Posted September 29, 2008 Author Posted September 29, 2008 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.
jensw Posted September 29, 2008 Author Posted September 29, 2008 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 to1. Close a program, say Opera or MSN or such2. Make the autoit program keep running after doing its thing...its thing being closing a program or displaying a textbox3. Hide the autoit "running" icon.
dbzfanatic Posted September 29, 2008 Posted September 29, 2008 Opt(), While/WEnd, and ProcessClose() in reverse order. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote]
AdmiralAlkex Posted September 29, 2008 Posted September 29, 2008 @dbzfanatic & @jensw I believe #NoTrayIcon would look cleaner .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
dbzfanatic Posted September 29, 2008 Posted September 29, 2008 True, I forgot about that. I usually set it in Opt(), thanks for pointing that out. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote]
jensw Posted September 29, 2008 Author Posted September 29, 2008 (edited) 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 September 30, 2008 by jensw
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