Old Proxomitron Forums
July 29, 2014, 08:57:45 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: No activity here! This forum is read-only. Go to http://prxbx.com/forums/index.php.
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Q: Automatically "press" a button on a form?  (Read 3603 times)
Moshi
Newbie
*
Posts: 2


View Profile WWW Email
« on: November 11, 2001, 02:28:05 PM »


Is there any way for Proxomitron to automatically "press" a button on a form? (example: simulate a click on the submit button for me)

(the form uses POST method and no Javascript)


Thanks


 
Logged

 
Arne

Administrator
Hero Member
*****
Posts: 778

1448105 aflaaten arneflaa
View Profile WWW Email
« Reply #1 on: November 11, 2001, 02:51:36 PM »

Can you explain why this would be useful, please?


Best wishes
Arne
Imici username: Arne
Logged

Best wishes
Arne
Imici username= Arne
Moshi
Newbie
*
Posts: 2


View Profile WWW Email
« Reply #2 on: November 13, 2001, 01:49:01 PM »

Right now, I'm using Proxomitron to fill out some form values for me. (eg. login pages, preference pages) And I wanted Proxo to automatically submit it for me each time I visit the page.

(I'm not asking for a new feature, just asking if it's possible as is.)
Logged

 
Arne

Administrator
Hero Member
*****
Posts: 778

1448105 aflaaten arneflaa
View Profile WWW Email
« Reply #3 on: November 13, 2001, 02:55:10 PM »

Now I get it. I will check around and see if there is one like you ask for, and also try to figure it out myself. Maybe it can be done with javascript - not sure yet.



Best wishes
Arne
Imici username: Arne
Logged

Best wishes
Arne
Imici username= Arne
Jor

Sr. Member
****
Posts: 421

10401286 jor otf jor_otf
View Profile WWW Email
« Reply #4 on: November 13, 2001, 05:04:19 PM »

Just a thought...

If you can write a filter that will capture the form name (as in <FORM NAME="myform">), you could use the filter to add this Javascript to the page:
<SCRIPT LANGUAGE="JavaScript"><!--
setTimeout('document.myForm.submit()',5000);
//--></SCRIPT>
Replace 5000 with the number of microseconds you want to have before submittal.
Note: this probably only works in Internet Explorer.

Unfortunately my attempts at writing this filter failed...

EDIT:
if the form does use the name myForm (I found many actually do!), you could use the filter below:

Name = "Form autosubmit - TESTING"
Active = TRUE
Limit = 1024
Match = "</form>"
Replace = "</form>
<script language="JavaScript"><!--
setTimeout 'document.myForm.submit()',5000);
//--></script>
"

Feel free to put a better version here

Edited by - Jor on 13 Nov 2001  17:07:40
Logged

 
sidki3003

Moderator
Sr. Member
*****
Posts: 476


View Profile WWW Email
« Reply #5 on: March 20, 2002, 10:20:51 PM »

Well you can give the form name manually!
Here is my login filter for the Windows Commander Board:

Name = "WinCom Form Filler"
Active = TRUE
URL = "home.no.net/wincmd/"
Limit = 2048
Match = "<form1"
        "name="username"2 name="cookielength" size="7" maxlength="4" value="360"3 name="passwrd"4 name="cookieneverexp" tabindex="4" checked"
        "5</form>"
Replace = "<form name="MyForm"1"
          "name="username" value="myusername"2 name="cookielength" size="7" maxlength="4" value="0"3 name="passwrd" value="mypassword"4 name="cookieneverexp" tabindex="4""
          "5</form>
<!--/setTimeout/--><script language="JavaScript"> setTimeout('document.MyForm.submit()',5000); </script>
"
          "$STOP()"

I know it's a little late for a reply


 
Logged

 
Arne

Administrator
Hero Member
*****
Posts: 778

1448105 aflaaten arneflaa
View Profile WWW Email
« Reply #6 on: March 20, 2002, 10:34:16 PM »

Hi

Cool! It is never too late.



Best wishes
Arne
Imici username: Arne
Logged

Best wishes
Arne
Imici username= Arne
Bes
Newbie
*
Posts: 29


View Profile WWW Email
« Reply #7 on: June 15, 2002, 08:31:27 PM »

Well, When trying this filter on my page, I get a javascript error saying :

Error : Object doesn't support this property or method.
Code : 0

What could be the problem then ?

 
Logged

 
Jor

Sr. Member
****
Posts: 421

10401286 jor otf jor_otf
View Profile WWW Email
« Reply #8 on: June 15, 2002, 08:32:21 PM »

A few questions...

Which of the filters in this thread are you using?
What browser are you using? (And if using Opera, what is it set to ID as?)



Edited by - Jor on 15 Jun 2002  21:33:22
Logged

 
Bes
Newbie
*
Posts: 29


View Profile WWW Email
« Reply #9 on: June 15, 2002, 08:41:28 PM »

Well, this is the filter I use :

----
Name = "MoneyBalls - Click MyFavorites"
Active = TRUE
Multi = TRUE
URL = "moneyballs.com"
Bounds = "<input * >"
Limit = 17240
Match = "<input type="button" value="My favorites" onClick="fillballs()">"
Replace = "<input type="button" value="My favorites" onClick="fillballs()">
"
          "<script language="JavaScript"> setTimeout('fillballs()',2000);
</script>"
          "<script language="JavaScript"> setTimeout('document.ticket.submit()',5000); </script>
"
          "$STOP()"
----
The first part (setTimout ('fillballs......) is working perfectly.
but 5 secs later, when the setTimout ('document.ticket.submit....) part is started, the error pops up.

I'm using IE 6.0

P.S. This is the first line of the form :

<form action="http://moneyballs.com/cgi-bin/lotto/lotto.pl" method="POST" name="ticket" target="_self" onsubmit="return checkpicks()">


Edited by - Bes on 15 Jun 2002  22:03:09
Logged

 
Jor

Sr. Member
****
Posts: 421

10401286 jor otf jor_otf
View Profile WWW Email
« Reply #10 on: June 15, 2002, 09:19:11 PM »

Could you give me a direct link to the page with the form, or post the entire form code? I can't see without live test why it wouldn't work...

 
Logged

 
Bes
Newbie
*
Posts: 29


View Profile WWW Email
« Reply #11 on: June 15, 2002, 09:36:59 PM »

Hi Jor, to not clutter this thread with my problems, I've sent it by PM

 
Logged

 
Jor

Sr. Member
****
Posts: 421

10401286 jor otf jor_otf
View Profile WWW Email
« Reply #12 on: June 15, 2002, 10:22:40 PM »

I'm working on this filter, will get back to you if I find what causes it not to work

 
Logged

 
altosax

Sr. Member
****
Posts: 328


View Profile WWW Email
« Reply #13 on: June 16, 2002, 12:29:05 AM »

hi all guys,
here my suggestions.

1. try to write the script out of the form not in it. so a match and replace like:

Match = "<input type="button" value="My favorites" onClick="fillballs()">"
Replace = "<input type="button" value="My favorites" onClick="fillballs()">
"
"<script language="JavaScript"> setTimeout('fillballs()',2000);
</script>"
"<script language="JavaScript"> setTimeout('document.ticket.submit()',5000); </script>
"
"$STOP()"

could be replaced by:

Match = "<input type="button" value="My favorites" onClick="fillballs()">1</form>"
Replace = "<input type="button" value="My favorites" onClick="fillballs()">1</form>
"
"<script language="JavaScript"> setTimeout('fillballs()',2000);
</script>"
"<script language="JavaScript"> setTimeout('document.ticket.submit()',5000); </script>
"
"$STOP()"

note the 1</form> at the end!

as second suggestion, i think you could use also an array to bypass the name of the form, something like document.form[0].submit

i haven't worked on it, this is only what i'm thinking in this moment Smiley

regards,
altosax.

 
Logged

 
altosax

Sr. Member
****
Posts: 328


View Profile WWW Email
« Reply #14 on: June 16, 2002, 12:34:36 AM »

just thinking,

because you know the url, name of the form and the name of the function to be executed, why don't you simply add javascript at <end> without match anything?

Edited by - altosax on 16 Jun 2002  01:35:59
Logged

 
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!