Sign in to follow this  
Followers 0
bobheart

Just for giggles

9 posts in this topic

How would you do this in autoit :

SetKeyDelay 90

InputBox, OutputVar, Enter your e-mail address.

MsgBox You entered %OutputVar%.

!z::Send,{AltUp}{Alt}%OutputVar%

This was done in autohotkey .

Or is it the same ?

Share this post


Link to post
Share on other sites



SendKeyDelay(90)
$OutputVar = InputBox("", "Enter your e-mail address.")
MsgBox(0,"","You entered " & $OutputVar & ".")

I am not sure about that last line. Look at the autoit help file for more info. Nearly every question you want answered is there.


Who else would I be?

Share this post


Link to post
Share on other sites

first line error

---------------------------

AutoIt Error

---------------------------

Line 1 (File "C:\Documents and Settings\bob\My Documents\email_key.au3"):

SendKeyDelay(90)

^ ERROR

Error: Unknown function name.

Share this post


Link to post
Share on other sites

first line error

---------------------------

AutoIt Error

---------------------------

Line 1  (File "C:\Documents and Settings\bob\My Documents\email_key.au3"):

SendKeyDelay(90)

^ ERROR

Error: Unknown function name.

<{POST_SNAPBACK}>

Opt("SendKeyDelay", 90)

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I guess this-is-me should look in that help file . lol

And it is still not sending the email address to the window .

This suppost to send the email address to a window so you don't have to copy and paste it over and over again so it needs to seit in the system tray and work and it does not . :ph34r:

Edited by bobheart

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

sry. I threw it together at the last minute.

Edited by this-is-me

Who else would I be?

Share this post


Link to post
Share on other sites

Hey n/p ") I can still do it with the autohotkey .

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Well the code equivalent is this:

Opt("SendKeyDelay", 90)
$OutputVar = InputBox("", "Enter your e-mail address.")
MsgBox(0,"","You entered " & $OutputVar & ".")

; Set the hotkey
HotKeySet("!z", "SendEmail")

; Just wait around for the user to press a key
While 1
    Sleep(1000)
WEnd

; The function that performs the Send
Func SendEmail()
    Send($OutputVar)
EndFunc

But it doesn't quite work correctly as the send function gets confused that the alt key is already held down (from the hotkey). I'll see if there is any easy fix.

Edited by Jon

Share this post


Link to post
Share on other sites

If you add the SendAttachMode option the script works:

Opt("SendKeyDelay", 90)
Opt("SendAttachMode", 1)
$OutputVar = InputBox("", "Enter your e-mail address.")
MsgBox(0,"","You entered " & $OutputVar & ".")

; Set the hotkey
HotKeySet("!z", "SendEmail")

; Just wait around for the user to press a key
While 1
    Sleep(1000)
WEnd

; The function that performs the Send
Func SendEmail()
    Send($OutputVar)
EndFunc

For those that don't know, the SendAttachMode option causes AutoIt to "attach" to the window it is sending too which allows much better detection of if the user is already holding keys down (like in this case the user will be holding down Alt+Z when the send begins).

This mode used to be the default but there are a couple of drawbacks when using the {... down} and {... up} send modes. I actually thought I'd left it as the default and might change it back as the up/down modes are only useful to gamer types anyway :ph34r:

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