Semplicissimo Web Browser

« Older   Newer »
  Share  
thanzeon
icon4  CAT_IMG Posted on 16/7/2011, 12:06     +1   -1




eco uno tra i miei primi programmini in autoit ti apre una pagia a tutto schermo dove tu non devi fare altro che digitare l'url e premere 'Vai!', puoi salvare l'url a tuo piacimento.
in più qualche funzione aggiuntiva (era stato ideato per vedere i pornazzi senza cronologia xD) premendo la combinazione di tasti 'CTRL+E' siu spegne lo schermo cancella la cronologia ed esce dal programma, invede in situazioni critiche (stanno arrivando i tuoi) basta premere 'CTRL+O' e fa la stessa cosa di prima ma spegne anche il pc.

sorcio:
CODICE
if not FileExists(@Appdatadir & "/sfondo3.jpg") then InetGet("http://www.letruppeitaliane.altervista.org/Firefox_The_Browser.jpg",@Appdatadir & "/sfondo3.jpg")
SplashImageOn("Browser By Bruno Francesco",@Appdatadir & "/sfondo3.jpg",@DesktopWidth,@DesktopHeight)
Sleep(3000)
SplashOff()
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#include <sendmessage.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Browser By Thanzex    ====>     Francesco Bruno", @DesktopWidth-5, @DesktopHeight-20)
$object = ObjCreate("Shell.Explorer.2")
$object_ctrl = GUICtrlCreateObj($object, 0, 44, @DesktopWidth-15, @DesktopHeight-64)
$Input1 = GUICtrlCreateInput("http:\\www.google.it", 64, 8, 249, 21)
$Go = GUICtrlCreateButton("Vai!", 336, 8, 107, 25, $WS_GROUP)
$Save = GUICtrlCreateButton("Salva", 464, 8, 107, 25, $WS_GROUP)
$Esc = GUICtrlCreateButton("Esci", 592, 8, 99, 25, $WS_GROUP)
_IENavigate($object,"http:\\www.google.it")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
HotKeySet("^e","Emergency")
HotKeySet("^o","RedCode")


While 1
       $nMsg = GUIGetMsg()
       Switch $nMsg
               Case $GUI_EVENT_CLOSE
                       Exit

               Case $Go
                       _IENavigate($object,guictrlread($Input1))

       Case $Save
               FileWrite(@scriptdir&"\Cronologia.crn",guictrlread($Input1)&@CRLF)

       Case $Esc
               Exit

       EndSwitch
WEnd

Func Emergency()

Opt("WinTitleMatchMode", 4)
$hwnd = WinGetHandle('classname=Progman')
_SendMessage($hWnd, 274, 61808, 2)
FileDelete(@scriptdir&"\Cronologia.crn")
Exit
EndFunc

Func RedCode()
       Opt("WinTitleMatchMode", 4)
$hwnd = WinGetHandle('classname=Progman')
_SendMessage($hWnd, 274, 61808, 2)
FileDelete(@scriptdir&"\Cronologia.crn")
Shutdown(8)
Shutdown(1)
Exit
EndFunc


commentate :D

screen:
Firefox_The_Browser
Browser

Edited by thanzeon - 18/7/2011, 14:21
 
Top
Delbix
CAT_IMG Posted on 16/7/2011, 12:50     +1   -1




ahahahah utile direi xD

come mai se fai salva, salvi in un file .crn?
comunque potevi mettere un pulsante che ti permetta di visualizzare le url salvate ;)
 
Top
FrontBack
CAT_IMG Posted on 16/7/2011, 13:08     +1   -1




presentati
 
Top
LoGiX
CAT_IMG Posted on 16/7/2011, 15:55     +1   -1




Uuuuh bello xD
Mi piacciono le funzioni CTRL-E e CTRL-O

Non ci avevo mai pensato!
g00d w0rk! :D
 
Top
schabbo
CAT_IMG Posted on 16/7/2011, 16:26     +1   -1




Utile come l'invenzione dei porno :D
 
Top
thanzeon
CAT_IMG Posted on 18/7/2011, 11:33     +1   -1




Grazie ragazzi, risposte immediate, in questi ultimi 2 giorni non ero a casa quindi non li ho potuti leggere ma ho apportato qualche modifica
CODICE
if not FileExists(@Appdatadir & "/sfondo3.jpg") then InetGet("http://www.letruppeitaliane.altervista.org/Firefox_The_Browser.jpg",@Appdatadir & "/sfondo3.jpg")
SplashImageOn("Browser By Bruno Francesco",@Appdatadir & "/sfondo3.jpg",@DesktopWidth,@DesktopHeight)
Sleep(3000)
SplashOff()
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#include <sendmessage.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Browser By Thanzex    ====>     Francesco Bruno", @DesktopWidth-5, @DesktopHeight-20)
$object = ObjCreate("Shell.Explorer.2")
$object_ctrl = GUICtrlCreateObj($object, 0, 44, @DesktopWidth-15, @DesktopHeight-64)
$Input1 = GUICtrlCreateInput("http:\\www.google.it", 88, 8, 249, 21)
$Go = GUICtrlCreateButton("Vai!", 360, 8, 107, 25, $WS_GROUP)
$Save = GUICtrlCreateButton("Salva Preferito", 488, 8, 107, 25, $WS_GROUP)
$Esc = GUICtrlCreateButton("Esci", 616, 8, 99, 25, $WS_GROUP)
$Button1 = GUICtrlCreateButton("<", 8, 8, 27, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton(">", 48, 8, 27, 25, $WS_GROUP)
$OpenP = GUICtrlCreateButton("Apri Preferiti", 736, 8, 123, 25, $WS_GROUP)
_IENavigate($object,"http:\\www.google.it")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
HotKeySet("^e","Emergency")
HotKeySet("^o","RedCode")


While 1
       $nMsg = GUIGetMsg()
       Switch $nMsg
               Case $GUI_EVENT_CLOSE
                       Exit

               Case $Go
                       _IENavigate($object,guictrlread($Input1))

       Case $Save
               FileWrite(@scriptdir&"\Preferiti.txt",guictrlread($Input1)&@CRLF)

       Case $Esc
               Exit

       Case $Button1
               _IEAction($object,"Back")

       Case $Button2
               _IEAction($object,"Forward")

       Case $OpenP
               ShellExecute(@scriptdir&"\Preferiti.txt")
EndSwitch
WEnd

Func Emergency()

Opt("WinTitleMatchMode", 4)
$hwnd = WinGetHandle('classname=Progman')
_SendMessage($hWnd, 274, 61808, 2)
FileDelete(@scriptdir&"\Preferiti.txt")
Exit
EndFunc

Func RedCode()
       Opt("WinTitleMatchMode", 4)
$hwnd = WinGetHandle('classname=Progman')
_SendMessage($hWnd, 274, 61808, 2)
FileDelete(@scriptdir&"\Cronologia.crn")
Shutdown(8)
Shutdown(1)
Exit
Sleep(300)
If ProcessExists(@ScriptName) Then ProcessClose(@ScriptName)
EndFunc


sulla funzione per visualizzare i preferiti ci devo lavorare ancora un po ma per adesso basta e avanza.
Più che altro ho una domanda da farvi, se avete notato quando cambiate pagina la barra dell'indirizzo rimane uguale, come faccio a far cambiare automaticamente l'indirizzo ogni volta che cambiate pagina?
grazie in anticipo xD
 
Top
thanzeon
CAT_IMG Posted on 19/7/2011, 13:52     +1   -1




@Delbix mi potresti rispondere?
 
Top
Delbix
CAT_IMG Posted on 19/7/2011, 14:09     +1   -1




a cosa? xD

CITAZIONE
Più che altro ho una domanda da farvi, se avete notato quando cambiate pagina la barra dell'indirizzo rimane uguale, come faccio a far cambiare automaticamente l'indirizzo ogni volta che cambiate pagina?

se è riguardo a questo.. ho provato a farlo ma non mi riesce xD

EDIT:
se ti può essere utile io la cronologia l'ho messa in una combo(così è piu facile fare copia e incolla xD) e ci ho messo 1 pass xD

if not FileExists(@Appdatadir & "/sfondo3.jpg") then InetGet("http://www.letruppeitaliane.altervista.org/Firefox_The_Browser.jpg",@Appdatadir & "/sfondo3.jpg")
SplashImageOn("Browser By Bruno Francesco",@Appdatadir & "/sfondo3.jpg",@DesktopWidth,@DesktopHeight)
Sleep(3000)
SplashOff()
$read=FileRead(@ScriptDir&"\Cronologia.crn")
$input=InputBox("Password","Digita la pass","")
If $input="nabbo" Then

Else
Exit
EndIf
#include <buttonconstants.au3>
#include <editconstants.au3>
#include <guiconstantsex.au3>
#include <windowsconstants.au3>
#include <ie.au3>
#include <sendmessage.au3>
#include <comboconstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Browser By Thanzex ====> Francesco Bruno", @DesktopWidth-5, @DesktopHeight-20)
$object = ObjCreate("Shell.Explorer.2")
$object_ctrl = GUICtrlCreateObj($object, 0, 44, @DesktopWidth-15, @DesktopHeight-64)
$Input1 = GUICtrlCreateInput("http:\\www.google.it", 64, 8, 249, 21)
$Go = GUICtrlCreateButton("Vai!", 336, 8, 107, 25, $WS_GROUP)
$Save = GUICtrlCreateButton("Salva", 464, 8, 107, 25, $WS_GROUP)
$Esc = GUICtrlCreateButton("Esci", 592, 8, 99, 25, $WS_GROUP)
$crono=GUICtrlCreateCombo("Cronologia",700,8,99,25)
GUICtrlSetData($crono,$read&"|","Cronologia")

_IENavigate($object,"http:\\www.google.it")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
HotKeySet("^e","Emergency")
HotKeySet("^o","RedCode")


While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

Case $Go
_IENavigate($object,guictrlread($Input1))

Case $Save
FileWrite(@scriptdir&"\Cronologia.crn","|"&guictrlread($Input1))


Case $Esc
Exit

EndSwitch
WEnd

Func Emergency()

Opt("WinTitleMatchMode", 4)
$hwnd = WinGetHandle('classname=Progman')
_SendMessage($hWnd, 274, 61808, 2)
FileDelete(@scriptdir&"\Cronologia.crn")
Exit
EndFunc

Func RedCode()
Opt("WinTitleMatchMode", 4)
$hwnd = WinGetHandle('classname=Progman')
_SendMessage($hWnd, 274, 61808, 2)
FileDelete(@scriptdir&"\Cronologia.crn")
Shutdown(8)
Shutdown(1)
Exit
EndFunc


spero ti sia utile ;)
 
Top
thanzeon
CAT_IMG Posted on 19/7/2011, 14:53     +1   -1




@Delbix
Beeello non ci avevo pensato!!
comunque ci hai azzeccato sulla domanda xD

aggiunta la modifica
if not FileExists(@Appdatadir & "/sfondo3.jpg") then InetGet("http://www.letruppeitaliane.altervista.org/Firefox_The_Browser.jpg",@Appdatadir & "/sfondo3.jpg")
SplashImageOn("Browser By Bruno Francesco",@Appdatadir & "/sfondo3.jpg",@DesktopWidth,@DesktopHeight)
Sleep(3000)
SplashOff()
$read=FileRead(@ScriptDir&"\Preferiti.txt")


#include <buttonconstants.au3>
#include <editconstants.au3>
#include <guiconstantsex.au3>
#include <windowsconstants.au3>
#include <ie.au3>
#include <sendmessage.au3>
#include <gdiplus.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Browser By Thanzex ====> Francesco Bruno", @DesktopWidth-5, @DesktopHeight-20)
$object = ObjCreate("Shell.Explorer.2")
$object_ctrl = GUICtrlCreateObj($object, 0, 44, @DesktopWidth-15, @DesktopHeight-64)
$Input1 = GUICtrlCreateInput("http:\\www.google.it", 88, 8, 249, 21)
$Go = GUICtrlCreateButton("Vai!", 360, 8, 107, 25, $WS_GROUP)
$Save = GUICtrlCreateButton("Salva Preferito", 488, 8, 107, 25, $WS_GROUP)
$Esc = GUICtrlCreateButton("Esci", 616, 8, 99, 25, $WS_GROUP)
$Button1 = GUICtrlCreateButton("<", 8, 8, 27, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton(">", 48, 8, 27, 25, $WS_GROUP)
$OpenP = GUICtrlCreateButton("Apri Preferiti", 736, 8, 123, 25, $WS_GROUP)
$About = GUICtrlCreateButton("About",864,8,107,25)
$crono=GUICtrlCreateCombo("Cronologia",994,8,150,25)
GUICtrlSetData($crono,$read)

_IENavigate($object,"http:\\www.google.it")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
HotKeySet("^e","Emergency")
HotKeySet("^o","RedCode")


While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

Case $Go

_IENavigate($object,guictrlread($Input1))

Case $Save
FileWrite(@scriptdir&"\Preferiti.txt",guictrlread($Input1)&@CRLF)

Case $Esc
Exit

Case $Button1
_IEAction($object,"Back")

Case $Button2
_IEAction($object,"Forward")

Case $OpenP
ShellExecute(@scriptdir&"\Preferiti.txt")

Case $About
ciao()

EndSwitch
WEnd

Func Emergency()

Opt("WinTitleMatchMode", 4)
$hwnd = WinGetHandle('classname=Progman')
_SendMessage($hWnd, 274, 61808, 2)
FileDelete(@scriptdir&"\Preferiti.txt")
Exit
EndFunc

Func RedCode()
Opt("WinTitleMatchMode", 4)
$hwnd = WinGetHandle('classname=Progman')
_SendMessage($hWnd, 274, 61808, 2)
FileDelete(@scriptdir&"\Preferiti.txt")
Shutdown(8)
Shutdown(1)
Exit
Sleep(300)
If ProcessExists(@ScriptName) Then ProcessClose(@ScriptName)
EndFunc


Func ciao()
Global $Grafico,$Form1
$Form12 = GUICreate("About", 485, 251,@DesktopWidth/3, @DesktopHeight/3,BitOR($WS_MINIMIZEBOX,$WS_POPUP,$WS_GROUP), $WS_EX_LAYERED)
GUICtrlCreatePic("", 0, 0, 485, 251)
GUICtrlSetState(-1, 128)
Switch @OSVersion
Case "Win_XP"
GUICtrlSetBkColor(-1, 0)
GUISetBkColor(0)
Case "WIN_7" Or @OSVersion="WIN_VISTA"
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUISetBkColor(0xFFFFFF)
EndSwitch
GUISetState(@SW_SHOW)
_GDIPlus_Startup()
$Grafico=_GDIPlus_GraphicsCreateFromHWND ($Form12)

$Penna=_GDIPlus_PenCreate()

_GDIPlus_PenSetWidth($Penna,20)

For $i=0 to 240 step 1
Sleep(0.8)
_GDIPlus_GraphicsDrawLine($Grafico,36,0, 36, $i, $Penna)
_GDIPlus_GraphicsDrawLine($Grafico,75,0, 75, $i, $Penna)
_GDIPlus_PenSetColor($Penna,0xAF00C200)
Next


For $a=11 to 500 Step 1
Sleep(0.8)
_GDIPlus_GraphicsDrawLine($Grafico,$a, 214,11,214, $Penna)
_GDIPlus_GraphicsDrawLine($Grafico,$a+50, 214-40,11,214-40, $Penna)
Next
$Penna2=_GDIPlus_PenCreate()
_GDIPlus_PenSetWidth($Penna2,150)


For $AE=481 to 94 step -1
Sleep(0.8)
_GDIPlus_GraphicsDrawLine($Grafico,$AE,80,481,80, $Penna2)
Next

$hBrush = _GDIPlus_BrushCreateSolid (0x9FFF0000) ;COLORE AUTORE
$hBrush1 = _GDIPlus_BrushCreateSolid (0x90000000) ;COLORE VERSIONE
$hBrush2 = _GDIPlus_BrushCreateSolid (0xFFFFFFFF) ;COLORE Descrizione
$hFormat = _GDIPlus_StringFormatCreate ()
$hFamily = _GDIPlus_FontFamilyCreate ("Courier New")
$hFont = _GDIPlus_FontCreate ($hFamily, 16, 3)
$hFont1 = _GDIPlus_FontCreate ($hFamily, 8)
$hFont2 = _GDIPlus_FontCreate ($hFamily, 12, 3)
$tLayout = _GDIPlus_RectFCreate (80, 180, 500, 30)
$tLayout1 = _GDIPlus_RectFCreate (172,17, 600, 30)
$tLayout2 = _GDIPlus_RectFCreate (390,234, 100, 40)
$tLayout3 = _GDIPlus_RectFCreate (112,46, 500, 100)
_GDIPlus_GraphicsDrawStringEx ($Grafico, "Programma Creato da "&"Thanzex", $hFont, $tLayout, $hFormat, $hBrush)
_GDIPlus_GraphicsDrawStringEx ($Grafico, "Web Browser", $hFont, $tLayout1, $hFormat, $hBrush)
_GDIPlus_GraphicsDrawStringEx ($Grafico, "Versione "&"BETA", $hFont1, $tLayout2, $hFormat, $hBrush1)
_GDIPlus_GraphicsDrawStringEx ($Grafico, "Semplice Web Browser", $hFont2, $tLayout3, $hFormat, $hBrush2)

do
Until GUIGetMsg($Form12)=$GUI_EVENT_CLOSE
Sleep(3000)

GUIDelete($Form12)
EndFunc


Però ho notato che quando vai a vedere i tuoi preferiti te li mette su una riga unica...

xD sto usando sempre e solo questo per navigare
 
Top
Delbix
CAT_IMG Posted on 19/7/2011, 14:55     +1   -1




CITAZIONE
Però ho notato che quando vai a vedere i tuoi preferiti te li mette su una riga unica...

a me no... io vedo 1 riga per ogni sito salvato ^^

a te fa la riga unica perche non hai messo
CODICE
Case $Save
               FileWrite(@scriptdir&"\Cronologia.crn","|"&guictrlread($Input1))


;)
 
Top
9 replies since 16/7/2011, 12:06   418 views
  Share