General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
Pages: Previous12
Current Page: 2 of 2
Re: mht test-testers needed..
Posted by: disrupted
Date: May 10, 2009 07:53PM

thank you james for all your trouble.. wscript still gives me the same error @line 75, it could be a problem on my system cause of certain restrictions i have for vbs and vba.. hopefully it works for others.

the thing about not saving all content in mht files like images etc is normal..even when saved from ie.. i'm not sure how it works.. sometimes it does save all the images inside the mht file and sometimes not and needs to fetch them from the website.. i think it could be related to the href address for the image.

for example if image href is internal in the site
href="/img/pic.jpg" then the image is saved internally
but if href="www.otherwebsite.com/ads/banner.jpg" then the image is excluded from the mht file but with a placeholder for it to get it from the specified site.



Options: ReplyQuote
Re: mht test-testers needed..
Posted by: JamesD
Date: May 10, 2009 08:38PM

@ disrupted

Line 75 is the call from vbs to execute gmht.exe.
Set oExec    = WshShell.Exec(strAwasuProgDir & strGMHTExe & " " & strURL & " 0")
The "strAwasuProgDir & strGMHTExe" is the path to the exe file. What is passed seems to be a space, the URL, a space and a 0.

It is working for me with the gmht.exe in the tools folder. I get no error.

Options: ReplyQuote
Re: mht test-testers needed..
Posted by: JamesD
Date: May 11, 2009 02:45PM

Quote
disrupted
i have no idea why it doesn't work on some systems.. but it seems to be related with the sit's url. if the url doesn't have www, the mht call fails and the error comes up. the 'www' could be easily added to the parameter inside the script if it's non-existent from the address but this can cause more problems.

I did this thread's page which does not have a www in the URL. It worked just fine.

I now have three mht save systems running. Do you have a specific page or situation that I should test? Most pages that I have tried so far seem to save the same in each system. Bit of a pain to have to unplug the DSL for each test, but results are different if I don't. Have been loading each mht into a tab in IE. I wonder if there is any crossover doing it that way? Perhaps do one mht, clear the cache, and then do another?

Options: ReplyQuote
Re: mht test-testers needed..
Posted by: disrupted
Date: May 11, 2009 03:37PM

this one is always giving soccerfan an error:
http://www.wilderssecurity.com/index.php
i think it will give same error when saving with systems that get the script error with autoit(ie object calls)
i can save it fine
http://kmeleon.holaservers.com/disrupted/wildersec.mht
but the main idea is trying to understand why it works with some and not with others.. the mysteries of ie and windows.

Options: ReplyQuote
Re: mht test-testers needed..
Posted by: disrupted
Date: May 11, 2009 04:05PM

i was working on something to automatically disconnect the nic from within k-meleon, i found a very good script from autoit forums but the problem i faced is getting the nic name especially when more than one nic is installed(i have 2 and it was very painful directing autoit to the right nic) and i figured it isn't that essential so i postponed working on it.

the script is there:
http://kmeleon.swiftfree.net/scripts/niccontrol.au3

to make it work on your pc, you need to change the red part to your connection/nic name and either compile or run directly with autoit

; Disable and Enable a Network card using 'Shell.Application'
;
; See also: blog.mvpcn.net/icuc88/articles/244.aspx
;
; To do: Rewrite this into a UDF. Parameters: $oLanConnection and $bEnabled


$oLanConnection = "Local Area Connection"; Change this to the name of the adapter to be disabled !
$bEnable = true ; Change this to 'false' to DISABLE the network adapter(toggle discconect/connect)

if @OSType<>"WIN32_NT" then
Msgbox(0,"","This script requires Windows 2000 or higher.")
exit
endif


if @OSVersion="WIN_2000" then
$strFolderName = "Network and Dial-up Connections"
else
$strFolderName = "Network Connections"; Windows XP
endif

Select
Case StringInStr("0409,0809,0c09,1009,1409,1809,1c09,2009,_
2409,2809,2c09,3009,3409", @OSLang) ; English (United States)
$strEnableVerb = "En&able"
$strDisableVerb = "Disa&ble"

; Add here the correct Verbs for your Operating System Language
EndSelect


;Virtual folder containing icons for the Control Panel applications. (value = 3)
Const $ssfCONTROLS = 3

$ShellApp = ObjCreate("Shell.Application")
$oControlPanel = $shellApp.Namespace($ssfCONTROLS)


; Find 'Network connections' control panel item
$oNetConnections=""

For $FolderItem in $oControlPanel.Items
If $FolderItem.Name = $strFolderName then
$oNetConnections = $FolderItem.GetFolder
Exitloop
Endif
Next


If not IsObj($oNetConnections) Then
MsgBox(0,"Error","Couldn't find " & $strFolderName & " folder."
Exit
EndIf


For $FolderItem In $oNetConnections.Items
If StringLower($FolderItem.Name) = StringLower($oLanConnection) Then
$oLanConnection = $FolderItem
Exitloop
EndIf
Next

If not IsObj($oLanConnection) Then
MsgBox(0,"Error","Couldn't find " & $oLanConnection & " Item."
Exit
EndIf

$oEnableVerb=""
$oDisableVerb=""

For $Verb In $oLanConnection.Verbs
If $Verb.Name = $strEnableVerb Then
$oEnableVerb = $Verb
EndIf
If $Verb.Name = $strDisableVerb Then
$oDisableVerb = $Verb
EndIf
Next

If $bEnable then
If IsObj($oEnableVerb) Then $oEnableVerb.DoIt ; Enable network card
Endif

If not $bEnable then
If IsObj($oDisableVerb) Then $oDisableVerb.DoIt; Disable network card
EndIf

Sleep(1000)


Options: ReplyQuote
Re: mht test-testers needed..
Posted by: JamesD
Date: May 11, 2009 04:51PM

I did a save of the [www.wilderssecurity.com] page and had no errors. Does your error come during the save or the display in IE?

I think it just as easy to pull the power plug on the Linksys network hub as to do a software disable of the card, but thanks for that effort.

Options: ReplyQuote
Re: mht test-testers needed..
Posted by: disrupted(unlogged)
Date: May 11, 2009 07:09PM

i don't have problems saving/reading but using iecalls soem systems do..soccerfan, arrow, mouse and dark4link so..it means that others might experience same problem...and i found others complaining about the autoit mht in russian forum.

i can't figure what is the cause..and compiling mht is like an underground secret..i found other delphi scripts but aside from the delphi commands they are identical to the auit using same ie object calls.. and opera has included mht since version 9 but using different calls ofcourse but naturally they don't reveal their top secret sourcecode..another program i found that uses own calls for mht is winmht or something but shareware..so no sourcecode... i'm giving up on mht.

if you don't have problems with the autoitscript you can use mhtsave normally or james macro/script for gmht.exe

Options: ReplyQuote
Re: mht test-testers needed..
Posted by: JamesD
Date: May 11, 2009 11:46PM

Just thought I would ask if anyone had errors using either of the macro/programs that I posted. One uses SavePage.exe and the other uses gmht.exe.

Options: ReplyQuote
Pages: Previous12
Current Page: 2 of 2


K-Meleon forum is powered by Phorum.