bobheart Posted August 19, 2004 Posted August 19, 2004 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 ?
this-is-me Posted August 19, 2004 Posted August 19, 2004 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?
bobheart Posted August 19, 2004 Author Posted August 19, 2004 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.
Josbe Posted August 19, 2004 Posted August 19, 2004 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) AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta
bobheart Posted August 19, 2004 Author Posted August 19, 2004 (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 . Edited August 19, 2004 by bobheart
this-is-me Posted August 19, 2004 Posted August 19, 2004 (edited) sry. I threw it together at the last minute. Edited August 19, 2004 by this-is-me Who else would I be?
bobheart Posted August 20, 2004 Author Posted August 20, 2004 Hey n/p ") I can still do it with the autohotkey .
Administrators Jon Posted August 20, 2004 Administrators Posted August 20, 2004 (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 August 20, 2004 by Jon
Administrators Jon Posted August 20, 2004 Administrators Posted August 20, 2004 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
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