Sign in to follow this  
Followers 0
MetalSpongebob

Firefox vs InternetExplorer

6 posts in this topic

Hello everybody,i done a little program to manage firefox and internet explorer

When using an old/slow computer,browser take too much time to get started,with that script you can run your browser directly to the page you want to surf

Added the search with google and yahoo search engines

The code is clean,and i've seen and correct it but i got an error when go to page(maybe input fails and returns 4102 ...WTF??

Here the code

#include <GUIConstants.au3>
#include <ie.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("FF VS IE", 164, 97, 220, 168)
$ButtonFF = GUICtrlCreateButton("Firefox", 8, 56, 59, 25, 0)
$ButtonIE = GUICtrlCreateButton("IE", 96, 56, 59, 25, 0)
$Icon1 = GUICtrlCreateIcon("C:\Documents and Settings\utente\Desktop\firefox_0.ico", 0, 24, 16, 32, 32)
$Icon2 = GUICtrlCreateIcon("C:\Documents and Settings\utente\Desktop\IEXPLORE_32528.ico", 0, 104, 16,32, 32)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $ButtonFF
            #Region ### START Koda GUI section ### Form=d:\cartella dio\miei programmi\form fatti da me\form browser mozilla-ie(secondario).kxf
            $Form1_1 = GUICreate("Frontend Firefox", 569, 88, 68, 198)
            $Input1FF = GUICtrlCreateInput("URL", 8, 16, 225, 21)
            $Button1FF = GUICtrlCreateButton("Go", 248, 16, 51, 25, 0)
            $Input2FF = GUICtrlCreateInput("Search with Google", 336, 16, 121, 21)
            $Button2FF = GUICtrlCreateButton("Google", 464, 16, 91, 25, 0)
            $Input3FF = GUICtrlCreateInput("search with Yahoo", 336, 48, 121, 21)
            $Button3FF = GUICtrlCreateButton("Yahoo", 464, 48, 91, 25, 0)
            GUISetState(@SW_SHOW)
            #EndRegion ### END Koda GUI section ###
            While 1
            $nMsg = GUIGetMsg()
            Switch $nMsg
            Case $GUI_EVENT_CLOSE
                Exit
            Case $Button1FF
                Run ( @ProgramFilesDir & "\Mozilla Firefox\firefox.exe " & $Input1FF)
            Case $Button2FF
                $googleFF="http://www.google.it/search?hl=it&q="&$Input2FF&"&btnG=Cerca+con+Google&meta="
                Run ( @ProgramFilesDir & "\Mozilla Firefox\firefox.exe " & $googleFF)
            Case $Button3FF
                $yahooFF="http://search.yahoo.com/search?p="&$Input3FF&"&fr=yfp-t-501&toggle=1&cop=mss&ei=UTF-8&vc=&fp_ip=IT"
                Run ( @ProgramFilesDir & "\Mozilla Firefox\firefox.exe " & $yahooFF)                
                EndSwitch
            WEnd
        Case $ButtonIE
            #Region ### START Koda GUI section ### Form=d:\cartella dio\miei programmi\form fatti da me\form browser mozilla-ie(secondario).kxf
            $Form1_1 = GUICreate("Frontend InternetExplorer", 569, 88, 68, 198)
            $Input1IE = GUICtrlCreateInput("URL", 8, 16, 225, 21)
            $Button1IE = GUICtrlCreateButton("Go", 248, 16, 51, 25, 0)
            $Input2IE = GUICtrlCreateInput("Search with Google", 336, 16, 121, 21)
            $Button2IE = GUICtrlCreateButton("Google", 464, 16, 91, 25, 0)
            $Input3IE = GUICtrlCreateInput("Search with Yahoo", 336, 48, 121, 21)
            $Button3IE = GUICtrlCreateButton("Yahoo", 464, 48, 91, 25, 0)
            GUISetState(@SW_SHOW)
            #EndRegion ### END Koda GUI section ###
            While 1
            $nMsg = GUIGetMsg()
            Switch $nMsg
            Case $GUI_EVENT_CLOSE
                Exit
            Case $Button1IE
                $oie= _IECreate($Input1IE)
            Case $Button2IE
                $oieg= _IECreate("http://www.google.it/search?hl=it&q="&$Input2IE&"&btnG=Cerca+con+Google&meta=")
            Case $Button3IE
                $oiey= _IECreate("http://search.yahoo.com/search?p="&$Input3IE&"&fr=yfp-t-501&toggle=1&cop=mss&ei=UTF-8&vc=&fp_ip=IT")
                EndSwitch
            WEnd
    EndSwitch
WEnd

Noob but ethical

Share this post


Link to post
Share on other sites



Try it and give me a response...hope can fix error :D


Noob but ethical

Share this post


Link to post
Share on other sites

to fix: if you close the child window, the whole program closes

Share this post


Link to post
Share on other sites

You know, users could have these programs installed to locations other than the default. You might try looking it up in the registry.

You could also just ShellExecute the URL and let the system open it with the user's selected default program.

Share this post


Link to post
Share on other sites

Hi,

You need to use GUICtrlRead() to get the text of what's typed into the input boxes ..

Run ( @ProgramFilesDir & "\Mozilla Firefox\firefox.exe " & GUICtrlRead($Input1FF))oÝ÷ ÚƦyú+±æ«r®¶­sbb33c¶vöövÆTdcÒgV÷C¶GG¢ò÷wwrævöövÆRæB÷6V&6öÃÖBf×·ÒgV÷C²fײuT7G&Å&VBb33c´çWC$dbfײgV÷C²f׶'FäsÔ6W&6¶6öâ´vöövÆRf׶ÖWFÒgV÷C°

Share this post


Link to post
Share on other sites

Guys thanks for response

I know,my knowledge of autoit and english is noobish

This is my first script for the forum,thanks for the help,I hope I will do a better work next time :D


Noob but ethical

Share this post


Link to post
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
Sign in to follow this  
Followers 0