Home
Download
Screenshots

Wiki
Plugins
Translations
Developers
Donate

Forums/Help
Contact Us

StrokeIt

How to open current webpage in Fx with IE9

Posted by pgpayton 
How to open current webpage in Fx with IE9
October 19, 2011 08:30AM
Hi, all
I'm new to use strokeit. It is a awesome program and I really love it. I have a question about how to open the current page (which I was viewed in Fx) with IE9 because the Firegesture can do it. Thanks in advance for your help.
mhe
Re: How to open current webpage in Fx with IE9
October 19, 2011 12:46PM
It can be done with this autohotkey code, compiled to an exe and ran with strokeit would work.

sData:=FF_RetrievePageName()
Loop,Parse,sData,CSV
   {
   If A_Index = 1
      sURL := A_LoopField
   Else If A_Index = 2
      sTitle := A_LoopField
   }

FF_RetrievePageName()
   {
   DllCall("DdeInitializeW","UPtrP",idInst,"Uint",0,"Uint",0,"Uint",0)

   ; CP_WINANSI = 1004   CP_WINUNICODE = 1200
   hServer := DllCall("DdeCreateStringHandleW","UPtr",idInst,"Str","firefox","int",1200)
   hTopic  := DllCall("DdeCreateStringHandleW","UPtr",idInst,"Str","WWW_GetWindowInfo","int",1200)
   hItem   := DllCall("DdeCreateStringHandleW","UPtr",idInst,"Str","0xFFFFFFFF","int",1200)

   hConv := DllCall("DdeConnect","UPtr",idInst,"UPtr",hServer,"UPtr",hTopic,"Uint",0)
   ; CF_TEXT = 1      CF_UNICODETEXT = 13
   hData := DllCall("DdeClientTransaction","Uint",0,"Uint",0,"UPtr",hConv,"UPtr",hItem,"UInt",1,"Uint",0x20B0,"Uint",10000,"UPtrP",nResult)
   sData := DllCall("DdeAccessData","Uint",hData,"Uint",0,"str")

   DllCall("DdeFreeStringHandle","UPtr",idInst,"UPtr",hServer)
   DllCall("DdeFreeStringHandle","UPtr",idInst,"UPtr",hTopic)
   DllCall("DdeFreeStringHandle","UPtr",idInst,"UPtr",hItem)
   DllCall("DdeUnaccessData","UPtr",hData)
   DllCall("DdeFreeDataHandle","UPtr",hData)
   DllCall("DdeDisconnect","UPtr",hConv)
   DllCall("DdeUninitialize","UPtr",idInst)
   result:=StrGet(&sData,"cp0")
   return result
   }

run, iexplore.exe %sURL%
Re: How to open current webpage in Fx with IE9
October 19, 2011 02:13PM
Sorry, I don't quite understand. How do I compile the scripts to an exe files? Just change the file extension name to exe or? And after I compile it to an exe, how to implement it on strokeit? Could you please give me more about the details? Thank you.
Re: How to open current webpage in Fx with IE9
October 20, 2011 03:40AM
While the AHK solution is more preferable and works (at least it should work) in every case and in any app, there are more straightforward StrokeIt-only methods.
You have to create an action that is triggered in FF. Add a command Key - Send Keystrokes. It should contain this:
[F6][CTRL_DOWN]ac[CTRL_UP]
Replace [F6] with key that makes address bar active. CTRL + ac makes it all to be selected (just to be sure) and puts it on the clipboard.
Then comes a command Run - Run Program with something like 'C:\Program Files\Internet Explorer\iexplore.exe' in File.
Then another command Windows - Activate Window with 'IEFrame' as class and let's say, about 5000 msec to wait for window to exist.
And finally another Key - Send Keystrokes, this time
[F6][CTRL_DOWN]v[CTRL_UP][ENTER]
to make address bar active, paste the contents of the clipboard into it and press ENTER.

Depending on your version of Windows and FF the key to make address bar and the path and window class of Internet explorer may differ, but you should be able to figure those out.
mhe
Re: How to open current webpage in Fx with IE9
October 20, 2011 06:20AM
You need to have autohotkey installed to compile it to an exe, i did it for you, here you go:
http://www.filedropper.com/getfirefoxadress

Only tested it on my Win7 x64 machine though, to use it with strokeit, add a gesture and use the run program command, direct it to the exe file.
Re: How to open current webpage in Fx with IE9
October 21, 2011 01:31PM
Thanks mhe and gemisigo. Both of you are very kind :) For gemisigo's method, the shortcut key to active firefox address bar is Alt + D. I try both of your methods and they all work well. Thanks again for your help. :p
Re: How to open current webpage in Fx with IE9
October 21, 2011 01:41PM
You're welcome ;) The AHK method has the "side-effect" of not ruining the clipboard in case you want to preserve its content. By the way, thanks for the feedback on FF hotkey.
Author:

Your Email:


Subject:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 16 plus 7?
Message: