#39682 - 2003-04-29 05:24 PM
Re: get current web page
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Rocco,
Can't you take the page you are going to and write a value to HKCU\Kixtart and then read that back when you re-open it?
It would then be -
iexplore.exe http://www.site.com
HTH,
Kent
|
|
Top
|
|
|
|
#39693 - 2003-04-29 11:22 PM
Re: get current web page
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
RAS proxy connections are seperate from the LAN settings
therefore LAN can be set to proxy, and the RAS connections can be whatever you need independantly of each other
is this what you need?
|
|
Top
|
|
|
|
#39695 - 2003-04-30 02:07 PM
Re: get current web page
|
Rocco Capra
Hey THIS is FUN
   
Registered: 2002-04-01
Posts: 380
Loc: Mansfield Ohio
|
DOC!, That's what I am doing. Here's the code...
code:
BREAK ON ;---------------------------------------------------------------------------------------- GLOBAL $IEArray, $NSArray ;---------------------------------------------------------------------------------------- $Form=CreateObject('Kixtart.Form') $Form.Caption='ITSoft - Proxy Settings' $Form.Width=450 $Form.Height=250 $Form.SysMenu=1 $Form.BackColor=204,204,204 $Form.FontName='Courier' $Form.FontSize=10 $Form.Center ;---------------------------------------------------------------------------------------- $Logo=$Form.Image(@SCRIPTDIR+'\proxy_title.bmp',-6,0,450,80) $Logo.Border=0 ;---------------------------------------------------------------------------------------- $Frame1=$Form.Frame('',5,80,435,110) ;---------------------------------------------------------------------------------------- $Label1=$Form.Label('NOTE:',15,95) $Label2=$Form.Label('You need to close and re-open your web browser',15,110) $Label3=$Form.Label('in order for the settings to take effect.',15,125) $Label4=$Form.Label('-> The Proxy Settings.',220,156) $EnableY=$Form.OptionButton('Enable ',20,151) $EnableN=$Form.OptionButton('Disable ',120,151) $EnableY.Enabled=1 $EnableY.Value=1 $EnableN.Enabled=1 ;---------------------------------------------------------------------------------------- $Submit=$Form.CommandButton('GO!',285,195,70,22) $Cancel=$Form.CommandButton('Close',365,195,70,22) $Submit.OnClick='Submit_Click()' $Submit.Default=1 $Cancel.OnClick='Cancel_Click()' ;---------------------------------------------------------------------------------------- $Form.Show ;---------------------------------------------------------------------------------------- WHILE $Form.Visible $RC=Execute($Form.DoEvents()) LOOP ;---------------------------------------------------------------------------------------- QUIT(1) ;---------------------------------------------------------------------------------------- Function Cancel_Click() $RC=$Form.Hide EndFunction ;---------------------------------------------------------------------------------------- Function Submit_Click() IF($EnableY.Value=1) SHELL '%COMSPEC% /C '+@SCRIPTDIR+'\pv.exe -e -q iexplore.exe > ie.dat' SHELL '%COMSPEC% /C '+@SCRIPTDIR+'\pv.exe -e -q netsc*.exe > ns.dat' $RC=Open(1,@SCRIPTDIR+'\ie.dat',2) $IEdat=ReadLine(1) $RC=Close(1) IF($IEdat<>'') $IEArray=Split($IEdat,Chr(9)) $IE_exe=$IEArray[3] ENDIF $RC=Open(2,@SCRIPTDIR+'\ns.dat',2) $NSdat=ReadLine(2) $RC=Close(2) IF($NSdat<>'') $NSArray=Split($NSdat,Chr(9)) $NS_exe=$NSArray[3] ENDIF SHELL '%COMSPEC% /C '+@SCRIPTDIR+'\pv.exe -k -f iexplore.exe' SHELL '%COMSPEC% /C '+@SCRIPTDIR+'\pv.exe -k -f netsc*.exe' SELECT ;*-------------------------------------------------------------------- CASE(InGroup('Mansfield')) $RC=WriteValue('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\','ProxyEnable','1','REG_DWORD') $RC=WriteValue('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\','ProxyServer','172.16.0.214:8080','REG_SZ') $RC=WriteValue('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\','ProxyOverride', '*.schoolspecialty.com;*.junebox.com;<local>','REG_SZ') ;*-------------------------------------------------------------------- CASE( (InGroup('Junebox'))OR (InGroup('Cedar Falls'))OR (InGroup('Lyons'))OR (InGroup('Southaven'))OR (InGroup('Sportime'))OR (InGroup('SportimeCS'))OR (InGroup('Appleton'))OR (InGroup('IS Dept'))OR (InGroup('Fresno')) ) $RC=WriteValue('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\','ProxyEnable','1','REG_DWORD') $RC=WriteValue('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\','ProxyServer','10.56.1.214:8080','REG_SZ') $RC=WriteValue('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\','ProxyOverride', '*.schoolspecialty.com;*.junebox.com;<local>','REG_SZ') ;*-------------------------------------------------------------------- CASE 1 ;?'[ WebMarshal ]' ENDSELECT IF($IEdat<>'') RUN $IE_exe ENDIF IF($NSdat<>'') RUN $NS_exe ENDIF $Label5=$Form.Label('Proxy Settings = ON',20,200) ELSE SHELL '%COMSPEC% /C '+@SCRIPTDIR+'\pv.exe -e -q iexplore.exe > ie.dat' SHELL '%COMSPEC% /C '+@SCRIPTDIR+'\pv.exe -e -q netsc*.exe > ns.dat' $RC=Open(1,@SCRIPTDIR+'\ie.dat',2) $IEdat=ReadLine(1) $RC=Close(1) IF($IEdat<>'') $IEArray=Split($IEdat,Chr(9)) $IE_exe=$IEArray[3] ENDIF $RC=Open(2,@SCRIPTDIR+'\ns.dat',2) $NSdat=ReadLine(2) $RC=Close(2) IF($NSdat<>'') $NSArray=Split($NSdat,Chr(9)) $NS_exe=$NSArray[3] ENDIF SHELL '%COMSPEC% /C '+@SCRIPTDIR+'\pv.exe -k -f iexplore.exe' SHELL '%COMSPEC% /C '+@SCRIPTDIR+'\pv.exe -k -f netsc*.exe' $RC=WriteValue('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\','ProxyEnable','0','REG_DWORD') $RC=WriteValue('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\','ProxyServer','0.0.0.0:0000','REG_SZ') $RC=WriteValue('HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\','ProxyOverride', '*.schoolspecialty.com;*.junebox.com;<local>','REG_SZ') IF($IEdat<>'') RUN $IE_exe ENDIF IF($NSdat<>'') RUN $NS_exe ENDIF $Label5=$Form.Label('Proxy Settings = OFF',20,200) ENDIF EndFunction
I use proccesview (http://www.xmlsp.com/pview/prcview.htm) in there. it comes with pv.exe (command line version).
You can see how I check if ie/ns is open then I close it, do the proxy settings, and then re-open it. Now the login script at work will take care of turning it on, so that part will prolly be left off in the final release.
I just thought it would be nice to open ie/ns up back up to the last page they were on.
Feel free to improve this, especially if there is a way to not use any 3rd party addons. Keep in mind there are Win9X users.
Thanks, Rocco
_________________________
I Love this board!!
--------------------
My DEV PC is running
KIX 4.22 WINXP Pro
|
|
Top
|
|
|
|
#39697 - 2003-04-30 02:47 PM
Re: get current web page
|
Rocco Capra
Hey THIS is FUN
   
Registered: 2002-04-01
Posts: 380
Loc: Mansfield Ohio
|
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1452 anonymous users online.
|
|
|