Jump to content

opens notepad, on m hotkeyset


Recommended Posts

Now it is. I just created the code.

here it is

HotKeySet( "m", "_notepadm")

while 1

sleep(999999)

wend

Func _notepadm ()

run("notepad.exe")

winwaitactive("Untitled - Notepad")

sleep(50)

send("{shiftdown}{capslock}{m}{shiftup}{capslock}")

EndFunc;==>_Open

eventually I hope to create multi while 1

wend statemends in a single script

should be possible

post to this if you wanna help write codes like this one, that I just sharred with you.

I will include the notepadm.zip file if anyone wants it.

anybody can use this code.

I use some of your guys codes too.

feel free to change it even to create your own programs.

Link to comment
Share on other sites

Who ever loses must Donate $5 to the website!

I Agree...this is a very simple script...and is in the examples..it is fairly useless....

no acually i think it is a good start, because lets say that there is a script going that requires a letter to be typed, however that letter is set as a hotkey. it could be usefull.

Link to comment
Share on other sites

Wanna See A Script? Amp 3. 1500 Lines Of Coding.

This Script Is Exetremely Simple, And Is Not Of Any Need To The AutoIt Community.

Sorry.

--Swift :D

I relise my code sucks, i just thought you may be able to use it. All autoit code sucks, untill you put a hole page of code together. then you got something. thats what i've been trying to tell you guys that you can do with this.

Link to comment
Share on other sites

Ok, Instead Of Discussing This Through Posts, Please PM Me With You Concerns. We Are Both Sort Of Spamming This Forum. AutoIt Doesnt Suck. I Have A Code 1 Line Long That Is Extremely Useful.

MsgBox(0, "IP", @IPADDRESS1 & "")

^^Most Useful Code I've Ever Created, (Thats One Line Long)

--Swift :D

Edited by Swift
Link to comment
Share on other sites

I relise my code sucks, i just thought you may be able to use it. All autoit code sucks, untill you put a hole page of code together. then you got something. thats what i've been trying to tell you guys that you can do with this.

I beg to differ. But what "Package"(UDF) were you even thinking about creating with this waste of a code that isn't even in wrapped with a code / autoit tag. We know what we can do , you posting bum a$$ code in no way informed anyone that they can create their own UDFs.

Link to comment
Share on other sites

Wait, now i'm looking at the code in detail.

You seriously made a function that opens notepad and types m... when you type m.

Because you obviously want Notepad opening when you type "My code is useless" so you don't accidently type it into the reply box.

I really don't understand the point of this script.

Link to comment
Share on other sites

So.. You Want To Be Able To Press 'M' And It Starts Notepad And Sends 'M' To Notepad?..

If Thats The Case The.. Here Ya Go :D

Call ("_Start") ; Opens Function _Start

Func _Start () ; Makes A Function Named _Start
While 1 ; Starts Loop
HotKeySet ("{m}", "_Notepad") ; Sets 'M' To Start Function _Notepad 
HotKeySet ("!{esc}", "_Exit") ; Sets 'Alt' + 'Esc' To Start Function _Exit 
WEnd ; Re-Starts Loop
EndFunc ; Ends Function _Start 

Func _Notepad () ; Makes A Function Named _Notepad
Run ("Notepad.exe") ; Runs Notepad
WinWaitActive ("Untitled - Notepad") ; Waits Till Notepad Is Open
Send ("M") ; Sends 'M' To Notepad
Call ("_Start") ; Gos Back To _Start
EndFunc ; Ends Function _Notepad 

Func _Exit () ; Makes A Function Named _Exit
Exit ; Exits The Program / Script
EndFunc ; Ends Function _Exit

As You Can Tell I Like To Explain My Scripts.. So Don't Take The ' ;s ' The Wrong Way :3

Edited by John2006

Latest Projects :- New & Improved TCP Chat

Link to comment
Share on other sites

So.. You Want To Be Able To Press 'M' And It Starts Notepad And Sends 'M' To Notepad?..

If Thats The Case The.. Here Ya Go :P

Call ("_Start") ; Opens Function _Start

Func _Start () ; Makes A Function Named _Start
While 1 ; Starts Loop
HotKeySet ("{m}", "_Notepad") ; Sets 'M' To Start Function _Notepad 
HotKeySet ("!{esc}", "_Exit") ; Sets 'Alt' + 'Esc' To Start Function _Exit 
WEnd ; Re-Starts Loop
EndFunc ; Ends Function _Start 

Func _Notepad () ; Makes A Function Named _Notepad
Run ("Notepad.exe") ; Runs Notepad
WinWaitActive ("Untitled - Notepad") ; Waits Till Notepad Is Open
Send ("M") ; Sends 'M' To Notepad
Call ("_Start") ; Gos Back To _Start
EndFunc ; Ends Function _Notepad 

Func _Exit () ; Makes A Function Named _Exit
Exit ; Exits The Program / Script
EndFunc ; Ends Function _Exit

As You Can Tell I Like To Explain My Scripts.. So Don't Take The ' ;s ' The Wrong Way :3

ERROR! No offense but that's probably the most redundant thing I've ever seen on this forum. It's constantly setting the hotkeys which causes it to use 100% CPU usage... Try this:

HotKeySet ("M", "_Notepad"); Sets 'M' To Start Function _Notepad
HotKeySet ("!{esc}", "_Exit"); Sets 'Alt' + 'Esc' To Start Function _Exit

While 1; Starts Loop
    Sleep(200)
WEnd; Re-Starts Loop

Func _Notepad (); Makes A Function Named _Notepad
    HotkeySet('M')
    Run ("Notepad.exe"); Runs Notepad
    WinWaitActive ("Untitled - Notepad"); Waits Till Notepad Is Open
    Send ("M"); Sends 'M' To Notepad
    HotKeySet ("M", "_Notepad")
EndFunc; Ends Function _Notepad

Func _Exit (); Makes A Function Named _Exit
    Exit; Exits The Program / Script
EndFunc; Ends Function _Exit

Edit: Your code didn't even work by the way.... :D

Edited by Piano_Man
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

ERROR! No offense but that's probably the most redundant thing I've ever seen on this forum. It's constantly setting the hotkeys which causes it to use 100% CPU usage... Try this:

HotKeySet ("M", "_Notepad"); Sets 'M' To Start Function _Notepad
HotKeySet ("!{esc}", "_Exit"); Sets 'Alt' + 'Esc' To Start Function _Exit

While 1; Starts Loop
    Sleep(200)
WEnd; Re-Starts Loop

Func _Notepad (); Makes A Function Named _Notepad
    HotkeySet('M')
    Run ("Notepad.exe"); Runs Notepad
    WinWaitActive ("Untitled - Notepad"); Waits Till Notepad Is Open
    Send ("M"); Sends 'M' To Notepad
    HotKeySet ("M", "_Notepad")
EndFunc; Ends Function _Notepad

Func _Exit (); Makes A Function Named _Exit
    Exit; Exits The Program / Script
EndFunc; Ends Function _Exit

Edit: Your code didn't even work by the way.... :D

I promise you that my code works

Link to comment
Share on other sites

So, his code isn't very good.. But be nice guys. I know you tried to help him, *thinks of the i542 stuff* and he didn't listen *thinks of Ashley and his English* and he will more than likely create so many of the same but slightly different *Justin...* programs.. Play nice!

p_b, if you had presented your topic, neater, better English, grammar and spelling then these people wouldn't be so bad now.

Just my two pennys worth!

Link to comment
Share on other sites

Who ever loses must Donate $5 to the website!

I Agree...this is a very simple script...and is in the examples..it is fairly useless....

You owe the AutoIt website $5.

I understand what the general problem is now... The OP had a hotkey but he wanted to send the same key into notepad. This:

send("{shiftdown}{capslock}{m}{shiftup}{capslock}")
Seems to of solved the problem... So when program_builder said this:

I wanted lower case and the send("m") would have opened notepad again.

He was right.... I explained in a prior post how to unset a hotkey...
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
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...