PDA

View Full Version : Aprire un file .url in Explorer come scheda


Slash23
29-07-2016, 19:31
Salve

come browser predefinito ho Chrome ma sto cercando di creare un file .url che apra un determinato sito in Explorer invece e come scheda non come finestra
sono arrivato a scrivere:
"C:\Program Files (x86)\Internet Explorer\iexplore.exe" https://www.sito.com
ma ogni volta che lo clicco non me lo trovo come nuova scheda di explorer che sto gia usando ma come nuova finestra
nelle opzioni del link non c'è apri come scheda ma solo come finestra ingrandita o ridotta a icona

c'è qualche comando da aggiungere?

Grazie mille

x_Master_x
29-07-2016, 21:40
Prova questo VBS

' x_Master_x
Const OpenInNewTab = &H0800
Const OpenInBackgroundTab = &H1000

Dim oIE

Site1 = "https:\\www.google.com"
Site2 = "http:\\www.hwupgrade.it"

Set oIE = CreateObject("InternetExplorer.Application")
oIE.Visible = True
oIE.Navigate2 Site1
oIE.Navigate2 Site2,OpenInBackgroundTab

Set oIE = Nothing
WScript.Quit

Oppure questa versione per agganciare ad una finestra di IE precedentemente aperta

' x_Master_x
Const OpenInNewTab = &H0800
Const OpenInBackgroundTab = &H1000

Site = "https:\\www.google.com"

Dim oIE
Dim objShell
Dim objWindows

Set objShell = CreateObject("Shell.Application")

For Each objWindows In objShell.Windows
If LCase(Right(objWindows.FullName, 12)) = "iexplore.exe" Then
Set oIE = objWindows
Exit For
End If
Next

If TypeName(oIE) = "Nothing" Or TypeName(oIE) = "Empty" Then
Set oIE = CreateObject("InternetExplorer.Application")
oIE.Visible = True
oIE.Navigate2 Site
Else
oIE.Visible = True
oIE.Navigate2 Site,OpenInBackgroundTab
End If

Set oIE = Nothing
Set objShell = Nothing
Set objWindows = Nothing
WScript.Quit

Slash23
29-07-2016, 22:36
perfetto!

Grazie mille