Sign in to follow this  
Followers 0
program builder

opens notepad, on m hotkeyset

32 posts in this topic

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.

Share this post


Link to post
Share on other sites



Wtf?

{shiftdown}{capslock}{m}{shiftup}{capslock}?

If you're hitting Shift and Capslock, it will produce the exact same result as

Send("m")

If you want an uppercase M,

Send("M")

Share this post


Link to post
Share on other sites

Wtf?

{shiftdown}{capslock}{m}{shiftup}{capslock}?

If you're hitting Shift and Capslock, it will produce the exact same result as

Send("m")

If you want an uppercase M,

Send("M")

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

Share this post


Link to post
Share on other sites

No It Wouldnt Of :D

Share this post


Link to post
Share on other sites

No It Wouldnt Of :D

It does swift trust me. if you wanna bet me I will put $5 on the line.

Share this post


Link to post
Share on other sites

It does swift trust me. if you wanna bet me I will put $5 on the line.

Doesn't matter if it does or doesn't. I know you are thinking hey I want to show what I just did. But please , useless scripts like these that do not benefit the community in any way please do not post them.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

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....

Edited by Swift

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

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]

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

I promise you that my code works

I was talking about the code John2006 put... Your's works but you want to look at mine to see how hotkeys can be turned off instead of pressing shift and capslock...

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
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!

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

Oh lord.

Func HotKetUnset($sKey)
    Return HotKeySet($sKey)
EndFunc

I had to go there :D

Share this post


Link to post
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
Sign in to follow this  
Followers 0