Sending to text field in Firefox

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
DUS
Posts: 10
Joined: 10 May 2016, 14:52

Sending to text field in Firefox

10 May 2016, 14:58

I have an abbreviations macro in AHK which doesn't work in a Firefox text field (email address to be specific).
What should I do?
User avatar
kwstas13
Posts: 43
Joined: 19 Mar 2016, 06:26

Re: Sending to text field in Firefox

10 May 2016, 15:09

strange this work for me in firefox.You can try this

Code: Select all

::@@::
send,[email protected]
DUS
Posts: 10
Joined: 10 May 2016, 14:52

Re: Sending to text field in Firefox

10 May 2016, 15:25

Not working, and in notepad i get: send [email protected]
User avatar
kwstas13
Posts: 43
Joined: 19 Mar 2016, 06:26

Re: Sending to text field in Firefox

10 May 2016, 15:34

DUS wrote:Not working, and in notepad i get: send [email protected]
use this

Code: Select all

::@@::
send,[email protected]
Not this this (send,[email protected])
must be under of the line ::@@::

also you can give more info about what version of windows you use and how your script look like try running script as admin.if this isn't working then if you don't care you reinstall firefox to check if the problem is the brower itshelf
DUS
Posts: 10
Joined: 10 May 2016, 14:52

Re: Sending to text field in Firefox

10 May 2016, 16:11

OK, now works in notepad, still not in a text field though.

Win 8.1; Running script as admin produces same results.
I've installed a newer Firefox version (now 30)- but same.
User avatar
kwstas13
Posts: 43
Joined: 19 Mar 2016, 06:26

Re: Sending to text field in Firefox

10 May 2016, 16:30

DUS wrote:OK, now works in notepad, still not in a text field though.

Win 8.1; Running script as admin produces same results.
I've installed a newer Firefox version (now 30)- but same.
So when you press @@ what happens ?
Maybe some line of your code cause this problem.
I had same problem back in time with Firefox
So when I used hotstring like you do it wasn't back spacing the word to correct it. So I tried many hotstring options to fix that. Actually it was back spacing only one letter. Maybe you can try add some delay.
DUS
Posts: 10
Joined: 10 May 2016, 14:52

Re: Sending to text field in Firefox

10 May 2016, 16:57

In text field pressing @@ gives @@. A following space, space then backspace, tab... it still remains @@.
There are only 4-5 other abbreviations ATM in the script, all look like ::ABC::ABCDEF
User avatar
kwstas13
Posts: 43
Joined: 19 Mar 2016, 06:26

Re: Sending to text field in Firefox

10 May 2016, 17:19

DUS wrote:In text field pressing @@ gives @@. A following space, space then backspace, tab... it still remains @@.
There are only 4-5 other abbreviations ATM in the script, all look like ::ABC::ABCDEF
Other abbreviations work for Firefox?
At the moment I'm replying to you using my smartphone and I cannot test any script.
Also try to use these lines of code
#hotstring SE K1
#hotstring SI
Guest

Re: Sending to text field in Firefox

11 May 2016, 01:33

There might be two causes:

1. Make sure you are running AutoHotkey as administrator - see https://autohotkey.com/docs/FAQ.htm#uac (run script as admin)

2. If you security software installed (firewall, av, webroot) turn it off temporarily and try again. If it works one of these programs is block AutoHotkey sending texts to the browser. Webroot is a common cause it seems. You can probably white list AutoHotkey so it is allowed.
DUS
Posts: 10
Joined: 10 May 2016, 14:52

Re: Sending to text field in Firefox

11 May 2016, 02:19

kwstas13 wrote:
DUS wrote:In text field pressing @@ gives @@. A following space, space then backspace, tab... it still remains @@.
There are only 4-5 other abbreviations ATM in the script, all look like ::ABC::ABCDEF
Other abbreviations work for Firefox?
At the moment I'm replying to you using my smartphone and I cannot test any script.
Also try to use these lines of code
#hotstring SE K1
#hotstring SI
No abbreviations work in Firefox. Hotstring SI doesn't even work in notepad. The code I used for SE (I didn't quite manage to get Kn to work): I run scripts as admin, both AV and firewall (that of windows) turned off.
Guest

Re: Sending to text field in Firefox

11 May 2016, 14:26

Something is blocking ahk, have you tried start Firefox without addons as well? (help menu, restart with addons disabled).
Can you paste content

Code: Select all

::@@::
clipboard:="[email protected]"
send ^v
Return
DUS
Posts: 10
Joined: 10 May 2016, 14:52

Re: Sending to text field in Firefox

11 May 2016, 15:45

Guest wrote:Something is blocking ahk, have you tried start Firefox without addons as well? (help menu, restart with addons disabled).
Can you paste content

Code: Select all

::@@::
clipboard:="[email protected]"
send ^v
Return
Manually I can paste, but the code won't paste in a text field.
[AV off, firewall off, Firefox 30/safe mode, run script as admin]
User avatar
kwstas13
Posts: 43
Joined: 19 Mar 2016, 06:26

Re: Sending to text field in Firefox

11 May 2016, 16:22

Code: Select all

#IfWinActive ahk_class MozillaWindowClass
::@@::
send [email protected]
#IfWinActive
otherwise try this

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#IfWinActive ahk_class MozillaWindowClass
::@@::
SendInput [email protected]
#IfWinActive
Last edited by kwstas13 on 11 May 2016, 16:31, edited 1 time in total.
Guest

Re: Sending to text field in Firefox

11 May 2016, 16:24

This is a very silly question, but are you very sure the text field has focus? You are not just expecting the field to automatically be filled in if you type @@ right? So you've clicked in the text field, they type @@ in the text field?
DUS
Posts: 10
Joined: 10 May 2016, 14:52

Re: Sending to text field in Firefox

11 May 2016, 17:31

@guest, Absolutely not a silly question as I know nothing about coding, but sure do know a thing or two about making silly mistakes. I'm typing @@ in the text field (let's say Gmail's login field for example) if that's what you mean by focus, then spacing, tabbing, spacing-back spacing etc in attempts at "activating" it.

@kwstas, I just copy pasted both of your suggestions as-is, so if you expected me to manipulate them in any way then I didn't quite understand that - please excuse my ignorance. Running both scripts that way didn't work.
User avatar
kwstas13
Posts: 43
Joined: 19 Mar 2016, 06:26

Re: Sending to text field in Firefox

11 May 2016, 17:48

DUS wrote:@guest, Absolutely not a silly question as I know nothing about coding, but sure do know a thing or two about making silly mistakes. I'm typing @@ in the text field (let's say Gmail's login field for example) if that's what you mean by focus, then spacing, tabbing, spacing-back spacing etc in attempts at "activating" it.

@kwstas, I just copy pasted both of your suggestions as-is, so if you expected me to manipulate them in any way then I didn't quite understand that - please excuse my ignorance. Running both scripts that way didn't work.
You have to test these scripts I suggested you. The first is a bit different from the other. Try the first one and if it's not working test the second. These are different scripts and you mustn't run then together they are different codes so create a script with the first code I gave you and if not work make another script with the second code I gave and try again. Run only one script at time
DUS
Posts: 10
Joined: 10 May 2016, 14:52

Re: Sending to text field in Firefox

12 May 2016, 01:28

@kwstas, I ran them each separately, with the same results. Sorry for not being clear about that.
DUS
Posts: 10
Joined: 10 May 2016, 14:52

Re: Sending to text field in Firefox

13 May 2016, 01:23

Eureka. It was a little program that I had running in the background called KeyScrammbler that was messing it up. Sorry for the trouble and thanks for the help.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Decar, doodles333, mikeyww and 226 guests