Jump to content

Just for giggles


Recommended Posts

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 ?

Link to comment
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?
Link to comment
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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • Administrators

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
Link to comment
Share on other sites

  • Administrators

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:

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