Author Topic: I am stuck  (Read 4282 times)

Jor

  • Sr. Member
  • ****
  • Posts: 421
    • ICQ Messenger - 10401286
    • AOL Instant Messenger - jor otf
    • Yahoo Instant Messenger - jor_otf
    • View Profile
    • http://members.outpost10f.com/~jor/
    • Email
I am stuck
« Reply #15 on: June 09, 2002, 08:18:59 PM »
I've been looking into adding a submenu on MSIE's rightclick menu, I don't think submenus can be done without registering a ClassID (since MSIE is really the same as Windows Explorer when it comes to this, and for Windows Explorer this is the rule).

In Opera, I use custom buttons for all Prox commands, because I registered my copy I have a lot of space left for the eight buttons you can add.
If anyone is interested, I can post that section of my buttons.ini here.

Addition: all submenu entries are linked to .dll files, so I think this DLL handdles the actual entries. Alas my programming skills are not good enough to do this myself.

Edited by - Jor on 09 Jun 2002  21:47:39
 

meitemark

  • Newbie
  • *
  • Posts: 3
    • ICQ Messenger -
    • AOL Instant Messenger -
    • Yahoo Instant Messenger -
    • View Profile
I am stuck
« Reply #16 on: June 09, 2002, 08:27:03 PM »
its odd, but i cant get it to work...

my so far two tested reg files:
1- dbug.reg

REGEDIT4

[HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMenuExtdbug]
"contexts"="01"
@="c:\Security Files\Proxomitron Naoko-4\dbug.htm"

2- dbug2.reg

REGEDIT4

[HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMenuExtdbug2]
"contexts"="01"
@="c:\windows\web\dbug.htm"

my dbug.htm file:
<html>
<body>
<script language="JavaScript" defer>
<!--
open("http://PREFIXdbug.." + external.menuArguments.NoLocation.href);
// -->
</script>
</body>
</html>

i get the items on menu... starts a new ie, then goes to a fairly big page.. cnn.com..
right click, selects:
dbug (dbug.reg) NOTHINGS happens..
dbug2 (dbug2.reg) a small windows pops up a split secon on the middle of the screen, then vanishes

im using windows xp with ie 6...
of course im also using Proxo
any realy good ideas?

meitemark



Edited by - meitemark on 09 Jun 2002  21:28:54
 

Arne

  • Administrator
  • Hero Member
  • *****
  • Posts: 778
    • ICQ Messenger - 1448105
    • AOL Instant Messenger - aflaaten
    • Yahoo Instant Messenger - arneflaa
    • View Profile
    • http://
    • Email
I am stuck
« Reply #17 on: June 09, 2002, 08:30:23 PM »
Remember to turn off Proxomitron when you are reading filters here. You have got a filter that is written correct here, but you see a filter that Proxomitron has changed before you see it -> menuArguments.NoLocation.href is what you got, and the colored text should not be there

Best wishes
Arne
Imici username: Arne
Best wishes
Arne
Imici username= Arne

Arne

  • Administrator
  • Hero Member
  • *****
  • Posts: 778
    • ICQ Messenger - 1448105
    • AOL Instant Messenger - aflaaten
    • Yahoo Instant Messenger - arneflaa
    • View Profile
    • http://
    • Email
I am stuck
« Reply #18 on: June 09, 2002, 08:47:10 PM »
This is the thing I am trying to explain :-)



Best wishes
Arne
Imici username: Arne
Best wishes
Arne
Imici username= Arne

Jor

  • Sr. Member
  • ****
  • Posts: 421
    • ICQ Messenger - 10401286
    • AOL Instant Messenger - jor otf
    • Yahoo Instant Messenger - jor_otf
    • View Profile
    • http://members.outpost10f.com/~jor/
    • Email
I am stuck
« Reply #19 on: June 09, 2002, 08:49:20 PM »
I understood that, Arne *L*

Submenus appear to be done by external dll files, so I don't think this is easy to do for non-Windows programmers.

 
 

sidki3003

  • Sr. Member
  • ****
  • Posts: 476
    • ICQ Messenger -
    • AOL Instant Messenger -
    • Yahoo Instant Messenger -
    • View Profile
    • http://
    • Email
I am stuck
« Reply #20 on: June 09, 2002, 08:55:02 PM »
I think we got you right, Arne
PostID 2022 above has a link to the MS techpaper,
and they don't mention a submenu option.


 
 

Arne

  • Administrator
  • Hero Member
  • *****
  • Posts: 778
    • ICQ Messenger - 1448105
    • AOL Instant Messenger - aflaaten
    • Yahoo Instant Messenger - arneflaa
    • View Profile
    • http://
    • Email
I am stuck
« Reply #21 on: June 09, 2002, 08:58:58 PM »
Nice - that you understood me. I did not know what it is called in English and then it is kind of hard to explain LOL. I read that article too, and find nothing about it there or other places, so I guess I will have to settle with the first way of doing it.

Talking about bookmarklets. I came across one today that is good. I always forget my passwords on different sites. I see the stars but had to use a program to see what was behind the stars. Here is a bookmarklet that revieals what the stars are hiding:

javascript:x = document.getElementsByTagName("input"); s = "Passwords in forms on this page:
"; for (i=0; i<x.length; ++i) { if (x.type.toLowerCase() == "password") s += "* " + x.value + "
"; } alert(s);

Best wishes
Arne
Imici username: Arne
Best wishes
Arne
Imici username= Arne

Jor

  • Sr. Member
  • ****
  • Posts: 421
    • ICQ Messenger - 10401286
    • AOL Instant Messenger - jor otf
    • Yahoo Instant Messenger - jor_otf
    • View Profile
    • http://members.outpost10f.com/~jor/
    • Email
I am stuck
« Reply #22 on: June 09, 2002, 09:10:27 PM »
Another way to do this is to use a form filter

This should do the trick:
[Patterns]
Name = "Display passwords"
Active = TRUE
Multi = TRUE
URL = "$TYPE(htm)"
Bounds = "<input*>"
Limit = 1024
Match = "1 type="password" 2"
Replace = "1 type="text" 2"


 
 

TEggHead

  • Jr. Member
  • **
  • Posts: 93
    • ICQ Messenger - 21893433
    • AOL Instant Messenger -
    • Yahoo Instant Messenger - eljarec
    • View Profile
    • Email
I am stuck
« Reply #23 on: June 14, 2002, 12:08:32 AM »
quote:
I think we got you right, Arne
PostID 2022 above has a link to the MS techpaper,
and they don't mention a submenu option.


Howzabout faking one with one of them dhmtl menus like that link redirector that got posted on Y!G? It should not be to difficult instead of calling the function directly to have the script popup a menu with the various options to choose from? (event.x and event.y will give you near enough to context menu)

Just an idea, untested...

JarC

 
 

sidki3003

  • Sr. Member
  • ****
  • Posts: 476
    • ICQ Messenger -
    • AOL Instant Messenger -
    • Yahoo Instant Messenger -
    • View Profile
    • http://
    • Email
I am stuck
« Reply #24 on: June 14, 2002, 02:20:10 AM »
I'm testing it since about a week, mostly as a bottom toolbar,
but i'm not satisfied with the flyover positioning.
Did you look at the source?

edit: The question is already answered in above post.
Too late for me yesterday


Edited by - sidki3003 on 14 Jun 2002  12:19:25
 

Arne

  • Administrator
  • Hero Member
  • *****
  • Posts: 778
    • ICQ Messenger - 1448105
    • AOL Instant Messenger - aflaaten
    • Yahoo Instant Messenger - arneflaa
    • View Profile
    • http://
    • Email
I am stuck
« Reply #25 on: June 14, 2002, 11:25:59 AM »
quote:

Howzabout faking one with one of them dhmtl menus like that link redirector that got posted on Y!G?  



I have looked at it, and The ones I have tried did not work for me. It also has been changed so often that I have not really understood this filter(set). I guess there is something I have misunderstodd or don't understand at all. I would appreciate if you, or someone, posted it here and explained how it works though. I have not posted it here for the same reason (= I don't understand it)

Best wishes
Arne
Imici username= Arne
Best wishes
Arne
Imici username= Arne

TEggHead

  • Jr. Member
  • **
  • Posts: 93
    • ICQ Messenger - 21893433
    • AOL Instant Messenger -
    • Yahoo Instant Messenger - eljarec
    • View Profile
    • Email
I am stuck
« Reply #26 on: June 14, 2002, 01:02:12 PM »
Ok, that's what I get from diving into a topic on the 2nd page ;) I thought you wanted just to have the contextitem popup the window and have it show the same URL but in dbug...which you already managed I read...

but to be on the safe side, here's a version that uses substring

<SCRIPT defer>
var loc   = external.menuArguments.location;
open("http://dbug.."+loc.href.substring(7));
</SCRIPT>

there's only one thing...haven't  been able to get this working AND insert the prefix variable without IE thinking it's some escaped code and destroying the url...same for the popup version...

Now this is a very crude popup, did not go as far as to make it close the popup if clicked outside it...

To fake a submenu by producing a popup does hide contextmenu after popup appears though...hope this survives the posting, I have intentionally not wrapped any lines and each statement ends in a semicolon, so if wrapping seems to occur, just unwrap so each statement is on a single line and it will be ok I hope.

Put the script into a html file (no need to add page body or tags...just copy paste the below...assuming you have set up a regkey already, just modify that key to point to the correct file.


<script defer>
var parentwin       = external.menuArguments;
var d         = parentwin.document;
var baseref      = window.location.href;
baseref         = baseref.substring(0,baseref.lastIndexOf("/")+1);

// utility functions to retrieve clickposition
function getX(e) { return e.x + d.body.scrollLeft; }
function getY(e) { return e.y + d.body.scrollTop; }

// the popup gets embedded into the DOM of the current active page.
// consequently, it only has to be created once...and hidden after use
if(!d.getElementById('scrollmenu'))
{
var menuItems   = new Array(
   new Array("javascript:open('http://dbug..'+document.location.href.substring(7));document.getElementById('scrollmenu').style.visibility='hidden';void(0);","Debug"),
   new Array("javascript:open('http://src..'+document.location.href.substring(7));document.getElementById('scrollmenu').style.visibility='hidden';void(0);","Source"),
   new Array("javascript:open('http://bweb..'+document.location.href.substring(7));document.getElementById('scrollmenu').style.visibility='hidden';void(0);","Bypass Web"),
   new Array("javascript:open('http://bin..'+document.location.href.substring(7));document.getElementById('scrollmenu').style.visibility='hidden';void(0);","Bypass Hdr In"),
   new Array("javascript:open('http://bout..'+document.location.href.substring(7));document.getElementById('scrollmenu').style.visibility='hidden';void(0);","Bypass Hdr Out"),
   new Array("javascript:open('http://bypass..'+document.location.href.substring(7));document.getElementById('scrollmenu').style.visibility='hidden';void(0);","Bypass All"),
   new Array("javascript:document.getElementById('scrollmenu').style.visibility='hidden';void(0);","Cancel")
   );
d.createStyleSheet(baseref +"menu.css");
var span = "<span id="scrollmenu" onclick2="this.style.visibility='hidden'" class=PRX "+"style=""+"top:"+ getY(parentwin.event,d) +";"+"left:"+ getX(parentwin.event,d) +";"+"">";
for (i=0;i<menuItems.length;i++)
{
   var item = menuItems;
   if (item[0] != "")
      span += "<div class=PRX onmouseover="this.className='PRX-mouseover';" onmouseout="this.className='PRX';"><a href=""+ item[0] +"" class=PRX>"+ item[1] +"</a></div>";
   else
      span += "<div align=center>"+ item[1] +"</div>";
}
span +=    "</span>";
d.body.insertAdjacentHTML("BeforeEnd",span);
}
d.getElementById('scrollmenu').style.top = getY(parentwin.event,d);
d.getElementById('scrollmenu').style.left = getX(parentwin.event,d);
d.getElementById('scrollmenu').style.visibility='visible';
</script>


As you can see in the code, there is also a stylesheet embedded into the current page's DOM, so you have an easier way to modify the look of the popup and bring it more into line with your current menu colors...copy paste the below and save to a file named menu.css and place it in same folder as above htmlfile


DIV.PRX
{
   border-top : 1px solid #666666;
   border-bottom : 1px solid #FFFFF0;
   width : 100%;
   padding : 2 1 2 1;
   background-color : Gainsboro;
}

DIV.PRX-mouseover
{
   border-top : 1px solid white;
   border-bottom : 1px solid white;
   width : 100%;
   background-color: white;
   color: black;
   padding : 2 1 2 1;
}
SPAN.PRX
{
   color: black;
   font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
   font-size : 12px;
   font-weight : bold;
   border: 1px outset;
   position:absolute;
   visibility: visible;
   background-color:white;
   padding: 0 0 0 0;
   width: 150px;
}



HTH
JarC



Edited by - TEggHead on 14 Jun 2002  14:54:44
 

Arne

  • Administrator
  • Hero Member
  • *****
  • Posts: 778
    • ICQ Messenger - 1448105
    • AOL Instant Messenger - aflaaten
    • Yahoo Instant Messenger - arneflaa
    • View Profile
    • http://
    • Email
I am stuck
« Reply #27 on: June 14, 2002, 01:20:28 PM »
I have got that working just fine with the earlier posted code. And I can add all the things to it too. But problem arised when the menu gets higher and higher and I wanted to have a submenu on it. So far I assume it is not possible, or at least nobody has found any info about making such a submenu on it.

It also functions just fine with the prefix.

Best wishes
Arne
Imici username= Arne
Best wishes
Arne
Imici username= Arne

TEggHead

  • Jr. Member
  • **
  • Posts: 93
    • ICQ Messenger - 21893433
    • AOL Instant Messenger -
    • Yahoo Instant Messenger - eljarec
    • View Profile
    • Email
I am stuck
« Reply #28 on: June 14, 2002, 03:45:42 PM »
Invoking a submenu from a contextmenu item does require some bit of coding. But I wonder, since scriptlets can be 'registered' just like an object, maybe it's possbile thru that route, never tried tho.

However, the popup I posted can be used from the context menu...so you could use it to shorten your current version.

HTH
JarC

 
 

sidki3003

  • Sr. Member
  • ****
  • Posts: 476
    • ICQ Messenger -
    • AOL Instant Messenger -
    • Yahoo Instant Messenger -
    • View Profile
    • http://
    • Email
I am stuck
« Reply #29 on: June 14, 2002, 08:50:24 PM »
quote:

Howzabout faking one with one of them dhmtl menus like that link redirector that got posted on Y!G? It should not be to difficult instead of calling the function directly to have the script popup a menu with the various options to choose from? (event.x and event.y will give you near enough to context menu)

Just an idea, untested...

JarC



I got an idea for the positioning problem, just two offset variables . It's here:
http://asp.flaaten.dk/pforum/topic.asp?ARCHIVE=&TOPIC_ID=628

sidki