Opening Mozillas Scratchpad (Shift-F4) you can paste javascript and execute it.
Its not very sophisticated but it works well.
Code: Select all
txt:= "alert('hallo world')"
scratchpad(txt)
return
scratchpad(code){
Sleeptime:=200
;translate this if you are not using a german Firefox
scratchpadtitle:="JavaScript-Umgebung"
closingpadtitel:="Änderungen nicht gespeichert"
IfWinExist , ahk_class MozillaWindowClass
{
x:=Clipboard
clipboard:=code
WinActivate , ahk_class MozillaWindowClass
send, +{F4}
WinWaitActive, %scratchpadtitle%
WinHide, %scratchpadtitle%
WinMinimize
BlockInput, on
SendInput,^v
Sleep,%Sleeptime%
SendInput,^r
Sleep,%Sleeptime%
SendInput,^w
WinWaitActive, %closingpadtitel%
WinHide, %closingpadtitel%
send,!n
BlockInput, Off
clipboard:=x
}
return
}